pipes

get_pipeline_names: names of all loaded pipelines

MethodPath
GET/api/v1/pipes/list

Examples

cURL

curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/pipes/list

Output

["simple"]

add_pipeline: upload pipeline YAML definition

MethodPath
POST/api/v1/pipes/add/new:bool

Params

ParamType
newbool

Examples

cURL

curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/pipes/add/true --data-binary '@simple.yml'

sites_with_pipeline: all targets that use this pipeline

MethodPath
GET/api/v1/pipes/targets/name:String

Params

ParamType
nameString

Examples

cURL

curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/pipes/targets/simple

Output

- ["0"]

get_pipeline_rendered: get the raw or rendered pipeline definition

MethodPath
GET/api/v1/pipes/show

Body Fields

FieldType
jsonbool
pipeString
target (optional)String

Examples

the plain pipe definition without context expansions

cURL

curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/pipes/show -d '{
  "json": false,
  "pipe": "simple"
}'

Output

name: simple
context:
  interval: '2s'
input:
  exec:
    command: uptime
    interval: '{{interval}}'
actions:
  - extract:
      input-field: _raw
      remove: true
      pattern: 'load average: (\S+), (\S+), (\S+)'
      output-fields: [m1, m5, m15]
  - convert:
      - m1: num
      - m5: num
      - m15: num
output:
  exec:
    command: cat

the pipe definition after target-specific context expansions

cURL

curl -X GET -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/pipes/show -d '{
  "json": false,
  "pipe": "simple",
  "target_id": "0"
}'

remove_pipeline: remove pipe from system

MethodPath
POST/api/v1/pipes/remove/pipe:String

Params

ParamType
pipeString

Examples

cURL

curl -X POST -H 'Content-Type: application/json' -H "Authorization: $JWT" \
$URL/api/v1/pipes/remove/simple

add_all_pipelines: bulk pipe upload in YAML

MethodPath
POST/api/v1/pipes/add-all

add_pipeline_file: upload a file associated with a pipe

MethodPath
POST/api/v1/pipes/add-file/pipe:String/fname:String/target:String/perm:u32

Params

ParamType
pipeString
fnameString
targetString
permu32

update_pipelines_all: add or remove a global pipe

MethodPath
POST/api/v1/pipes/update-global