Pipeline output
Read pipeline output
Changed onReads events from an existing pipeline output stream. By default, the endpoint uses long polling (timeout: 5s) and returns as soon as at least one event is available (min_events: 1).
post/serve
Request
- Base URLhttps://tenzir.com/api/v0
- AuthAPI key in header X-Tenzir-Token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"serve_id": "query-1",
"continuation_token": "340ce2j",
"max_events": 1024,
"min_events": 1,
"timeout": "200ms",
"schema": "exact"
}Response
Events are available, the timeout was reached, or the pipeline reached a terminal state.
Example response
{
"next_continuation_token": "340ce2j",
"state": "running",
"schemas": [
{
"schema_id": "c631d301e4b18f4",
"definition": {
"name": "tenzir.summarize",
"kind": "record",
"attributes": [],
"state": {
"fields": [
{
"name": "severity",
"type": {
"name": null,
"kind": "string",
"attributes": [],
"state": null
}
},
{
"name": "pipeline_id",
"type": {
"name": null,
"kind": "string",
"attributes": [],
"state": null
}
}
]
}
}
}
],
"events": [
{
"schema_id": "c631d301e4b18f4",
"data": {
"timestamp": "2023-04-26T12:00:00Z",
"schema": "zeek.conn",
"schema_id": "ab2371bas235f1",
"events": 50
}
},
{
"schema_id": "c631d301e4b18f4",
"data": {
"timestamp": "2023-04-26T12:05:00Z",
"schema": "suricata.dns",
"schema_id": "cd4771bas235f1",
"events": 50
}
}
]
}Changes
- info
added the new
name_and_typeenum value to the request property - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- breaking
removed the enum value
legacyof the request property - info
the
request property default value changed fromlegacytoexact
- breaking