Create or update a stream Technical Preview

PUT /api/streams/{name}

Creates or updates a stream definition. Classic streams can not be created through this API, only updated

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body object

Any of:
PUT /api/streams/{name}
curl \
 --request PUT 'https://localhost:5601/api/streams/{name}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"dashboards":["string"],"stream":{"ingest":{"lifecycle":{"dsl":{"data_retention":"string"}},"processing":[{"date":{"description":"string","if":{"field":"string","operator":"exists"},"ignore_failure":true,"field":"string","formats":["string"],"locale":"string","output_format":"string","target_field":"string","timezone":"string"}}],"wired":{"fields":{},"routing":[{"destination":"string","if":{"field":"string","operator":"exists"}}]}}}}'
Request examples
# Headers
kbn-xsrf: true

# Payload
{
  "dashboards": [
    "string"
  ],
  "stream": {
    "ingest": {
      "lifecycle": {
        "dsl": {
          "data_retention": "string"
        }
      },
      "processing": [
        {
          "date": {
            "description": "string",
            "if": {
              "field": "string",
              "operator": "exists"
            },
            "ignore_failure": true,
            "field": "string",
            "formats": [
              "string"
            ],
            "locale": "string",
            "output_format": "string",
            "target_field": "string",
            "timezone": "string"
          }
        }
      ],
      "wired": {
        "fields": {},
        "routing": [
          {
            "destination": "string",
            "if": {
              "field": "string",
              "operator": "exists"
            }
          }
        ]
      }
    }
  }
}
# Headers
kbn-xsrf: true

# Payload
{
  "dashboards": [
    "string"
  ],
  "stream": {
    "ingest": {
      "lifecycle": {
        "dsl": {
          "data_retention": "string"
        }
      },
      "processing": [
        {
          "date": {
            "description": "string",
            "if": {
              "field": "string",
              "operator": "exists"
            },
            "ignore_failure": true,
            "field": "string",
            "formats": [
              "string"
            ],
            "locale": "string",
            "output_format": "string",
            "target_field": "string",
            "timezone": "string"
          }
        }
      ],
      "unwired": {}
    }
  }
}
# Headers
kbn-xsrf: true

# Payload
{
  "dashboards": [
    "string"
  ],
  "stream": {
    "group": {
      "description": "string",
      "members": [
        "string"
      ]
    }
  }
}