Upsert query stream settings Technical Preview

PUT /api/streams/{name}/_query

Spaces method and path for this operation:

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

Refer to Spaces for more information.

Upserts the query settings of a query 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

  • field_descriptions object
    Hide field_descriptions attribute Show field_descriptions attribute object
    • * string Additional properties
  • query object Required

    Additional properties are NOT allowed.

    Hide query attribute Show query attribute object
    • esql string Required
PUT /api/streams/{name}/_query
curl \
 --request PUT 'https://<KIBANA_URL>/api/streams/{name}/_query' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"query":{"esql":"FROM logs* | WHERE log.level == \"error\" | KEEP @timestamp, message, host.name, log.level"}}'
Request example
{
  "query": {
    "esql": "FROM logs* | WHERE log.level == \"error\" | KEEP @timestamp, message, host.name, log.level"
  }
}