const url = 'https://example.com/api/v0/pipeline/launch';const options = { method: 'POST', headers: {'X-Tenzir-Token': '<X-Tenzir-Token>', 'Content-Type': 'application/json'}, body: '{"definition":"export | where foo","name":"interactive-query","serve_id":"query-1","serve_buffer_size":4000}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v0/pipeline/launch \ --header 'Content-Type: application/json' \ --header 'X-Tenzir-Token: <X-Tenzir-Token>' \ --data '{ "definition": "export | where foo", "name": "interactive-query", "serve_id": "query-1", "serve_buffer_size": 4000 }'Creates a pipeline and prepares it for interactive use. If the pipeline
does not end with a sink, Tenzir adds an implicit output stream and
returns the created pipeline ID. If the pipeline already has a sink,
Tenzir returns deployable: true so the caller can deploy it explicitly.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Pipeline launch request.
object
The pipeline ID. If omitted, Tenzir generates a random ID.
The pipeline definition.
The human-readable name of the pipeline.
Whether this pipeline is hidden.
A duration string specifying the maximum time for this pipeline to
exist. No value means the pipeline is allowed to exist forever.
This parameter must be finite and defined if the hidden parameter is
true.
Flags that specify on which state to restart the pipeline.
object
Autostart the pipeline upon creation.
Autostart the pipeline upon completion.
Autostart the pipeline upon failure.
Flags that specify on which state to delete the pipeline.
object
Autodelete the pipeline upon completion.
Autodelete the pipeline upon failure.
Autodelete the pipeline when it stops before completing.
The minimum time between automatic restarts after a pipeline error.
Whether this pipeline is unstoppable.
The identifier for the cache operator, which is inserted only
when this parameter is provided.
The maximum number of events to keep in the cache operator.
The time to live of the cache. Resets when reading from the cache.
The maximum time to live of the cache. Unlike the cache_read_timeout
parameter, this does not reset when reading from the cache.
The output stream identifier to create for reading events from this pipeline.
The maximum number of events to buffer for the output stream.
Example
{ "definition": "export | where foo", "name": "interactive-query", "serve_id": "query-1", "serve_buffer_size": 4000}Responses
Section titled “ Responses ”The launch request was accepted.
Invalid arguments or invalid pipeline.
object
The error message.
object
object
A potentially empty label.
A region in the source code, defined by byte offsets.
object
object
Example
{ "error": "Invalid arguments", "diagnostics": [ { "severity": "error", "message": "unknown option `--frobnify`", "annotation": [ { "text": "this option does not exist", "source": { "begin": 42, "end": 48 } } ], "notes": [ { "kind": "note", "message": "file <path> [-f|--follow] [-m|--mmap] [-t|--timeout <duration>]" } ], "rendered": "\u001b[1m\u001b[31merror\u001b[39m: unknown option `--frobnify`\u001b[0m\n" } ]}