Update ingest stream settings Technical Preview; added in 9.1.0

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

    The name of the stream.

application/json

Body

Responses

  • 200

    The ingest settings were updated successfully.

PUT /api/streams/{name}/_ingest
curl \
 --request PUT 'https://localhost:5601/api/streams/{name}/_ingest' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"ingest":{"failure_store":{"inherit":{}},"lifecycle":{"inherit":{}},"processing":{"steps":[{"action":"grok","from":"message","ignore_missing":false,"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}|-)"]}]},"settings":{},"wired":{"fields":{"client.ip":{"type":"ip"},"http.method":{"type":"keyword"},"http.response.body.bytes":{"type":"long"},"http.response.status_code":{"type":"long"},"url.original":{"type":"wildcard"}},"routing":[{"destination":"logs.nginx.errors","status":"enabled","where":{"eq":"500","field":"http.response.status_code"}}]}}}'
Request example
{
  "ingest": {
    "failure_store": {
      "inherit": {}
    },
    "lifecycle": {
      "inherit": {}
    },
    "processing": {
      "steps": [
        {
          "action": "grok",
          "from": "message",
          "ignore_missing": false,
          "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}|-)"
          ]
        }
      ]
    },
    "settings": {},
    "wired": {
      "fields": {
        "client.ip": {
          "type": "ip"
        },
        "http.method": {
          "type": "keyword"
        },
        "http.response.body.bytes": {
          "type": "long"
        },
        "http.response.status_code": {
          "type": "long"
        },
        "url.original": {
          "type": "wildcard"
        }
      },
      "routing": [
        {
          "destination": "logs.nginx.errors",
          "status": "enabled",
          "where": {
            "eq": "500",
            "field": "http.response.status_code"
          }
        }
      ]
    }
  }
}