Skip to content
POST
/pipeline/create
curl --request POST \
--url https://example.com/api/v0/pipeline/create \
--header 'Content-Type: application/json' \
--header 'X-Tenzir-Token: <X-Tenzir-Token>' \
--data '{ "definition": "export | where foo | publish /bar", "name": "zeek-monitoring-pipeline", "hidden": false }'

Creates a pipeline.

If autostart.created is true, Tenzir sends the response after the pipeline starts successfully. If startup fails, Tenzir discards the pipeline and returns the observed diagnostics.

Pipeline creation request.

Media type application/json
object
id

The pipeline ID. If omitted, Tenzir generates a random ID.

string
definition
required

The pipeline definition.

string
name

The human-readable name of the pipeline.

string
default: [an auto-generated id]
hidden

Whether this pipeline is hidden. Hidden pipelines start automatically, are not persisted, and are omitted from the /pipeline/list response.

boolean
ttl

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 defined if the hidden parameter is true.

string
nullable
autostart

Flags that specify on which state to restart the pipeline.

object
created

Autostart the pipeline upon creation.

boolean
completed

Autostart the pipeline upon completion.

boolean
failed

Autostart the pipeline upon failure.

boolean
autodelete

Flags that specify on which state to delete the pipeline.

object
completed

Autodelete the pipeline upon completion.

boolean
failed

Autodelete the pipeline upon failure.

boolean
stopped

Autodelete the pipeline when it stops before completing.

boolean
retry_delay

A duration string specifying the minimum time between automatic restarts of a pipeline when an error occurs. Takes no effect if restarting on failure is disabled.

string
default: 1min
unstoppable

Whether this pipeline is unstoppable. Unstoppable pipelines start automatically, fail when they complete, and can’t be paused or stopped manually.

boolean
Example
{
"definition": "export | where foo | publish /bar",
"name": "zeek-monitoring-pipeline",
"hidden": false
}

The pipeline was created.

Media type application/json
object
id
required

The id of the successfully created pipeline.

string
Example
{
"id": "4c7f2b11-6169-4d1b-89b4-4fc0a68b3d4a"
}

Invalid arguments or invalid pipeline.

Media type application/json
object
error
required

The error message.

string
diagnostics
Array<object>
object
severity
string
Allowed values: error warning note
message
string
annotation
Array<object>
object
primary
boolean
text

A potentially empty label.

string
source

A region in the source code, defined by byte offsets.

object
begin
number
end
number
notes
Array<object>
object
kind
string
Allowed values: note usage hint docs
message
string
rendered
string
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"
}
]
}