HTTP API of the pipeline service¶
The requests accepted by the service started with python -m juturna serve. For a
guided tour, see Run pipelines behind an HTTP service.
Authentication¶
Every request needs the service token, as Authorization: Bearer <token>.
The token is checked before anything else: a request without it is answered
401 whatever its path and its body, and this includes the generated
documentation pages (/docs, /redoc, /openapi.json). A request body
larger than 1 MiB is answered 413.
The token is the value of the JUTURNA_SERVICE_TOKEN environment variable
of the service or, when that is not set, the random one the service prints
at startup. With --no-auth no token is needed.
Requests¶
Request bodies are JSON. {id} is the id the service gave the pipeline.
Request |
What it does |
|---|---|
|
Version of Juturna and the values of some of its constants. |
|
The node types installed on the service, each with its |
|
The status of every pipeline, as |
|
Checks a configuration as |
|
Creates a pipeline from a configuration. Its id is in
|
|
Creates, warms up and starts a pipeline, and answers with its status
(the id is |
|
Lifecycle calls. They answer with the status, when the call is over. |
|
Destroys the pipeline; |
|
Name, creation time, folder and status of the pipeline, and status
and |
|
The configuration the pipeline was created with, plus the |
|
The files in the pipeline folder: |
|
The content of one of those files, always as a download. Only files inside the pipeline folder can be read. |
|
The last 1000 log records of the pipeline and of its nodes;
|
|
The telemetry records of the pipeline, if its configuration turns telemetry on. |
Errors¶
Errors of the service carry a message (the 401 and 413 answers
carry a detail instead):
404: no pipeline with that id, or no such file in its folder;409: the call is not allowed in the current status of the pipeline, another lifecycle call is in progress, or the telemetry is requested from a pipeline that has none;403: the configuration reads an environment variable that is neither in the environment file of the service nor allowed by it;422: the configuration is refused (the body says which part), or a warmup or start failed because of a node. In the second case the body also hasoperationandnode, and the message says what the node raised, for example a node type that is not installed;500: anything else, with the details in the service log.
A configuration is refused when it has no nodes, when a link names a node
that does not exist or is repeated, when a warped node has no
warp_configuration, or when version is empty.