Update ingest stream settings Technical Preview

PUT /api/streams/{name}/_ingest

Spaces method and path for this operation:

put /s/{space_id}/api/streams/{name}/_ingest

Refer to Spaces for more information.

Upserts the ingest settings of an ingest stream definition

[Required authorization] Route required privileges: manage_stream.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • name string Required
application/json

Body

PUT /api/streams/{name}/_ingest
curl \
 --request PUT 'https://<KIBANA_URL>/api/streams/{name}/_ingest' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"ingest":{"wired":{"fields":{"client.ip":{"type":"ip"},"http.method":{"type":"keyword"},"url.original":{"type":"wildcard"},"http.response.body.bytes":{"type":"long"},"http.response.status_code":{"type":"long"}},"routing":[{"where":{"eq":"500","field":"http.response.status_code"},"status":"enabled","destination":"logs.nginx.errors"}]},"settings":{},"lifecycle":{"inherit":{}},"processing":{"steps":[{"from":"message","action":"grok","patterns":["%{IPORHOST:client.ip} %{USER:ident} %{USER:auth} \\[%{HTTPDATE:@timestamp}\\] \"%{WORD:http.method} %{DATA:url.original} HTTP/%{NUMBER:http.version}\" %{NUMBER:http.response.status_code:int} (?:%{NUMBER:http.response.body.bytes:int}|-)"],"ignore_missing":false}]},"failure_store":{"inherit":{}}}}'
Request example
{
  "ingest": {
    "wired": {
      "fields": {
        "client.ip": {
          "type": "ip"
        },
        "http.method": {
          "type": "keyword"
        },
        "url.original": {
          "type": "wildcard"
        },
        "http.response.body.bytes": {
          "type": "long"
        },
        "http.response.status_code": {
          "type": "long"
        }
      },
      "routing": [
        {
          "where": {
            "eq": "500",
            "field": "http.response.status_code"
          },
          "status": "enabled",
          "destination": "logs.nginx.errors"
        }
      ]
    },
    "settings": {},
    "lifecycle": {
      "inherit": {}
    },
    "processing": {
      "steps": [
        {
          "from": "message",
          "action": "grok",
          "patterns": [
            "%{IPORHOST:client.ip} %{USER:ident} %{USER:auth} \\[%{HTTPDATE:@timestamp}\\] \"%{WORD:http.method} %{DATA:url.original} HTTP/%{NUMBER:http.version}\" %{NUMBER:http.response.status_code:int} (?:%{NUMBER:http.response.body.bytes:int}|-)"
          ],
          "ignore_missing": false
        }
      ]
    },
    "failure_store": {
      "inherit": {}
    }
  }
}