Bulk update queries Technical Preview

POST /api/streams/{name}/queries/_bulk

Bulk update queries of a stream. Can add new queries and delete existing ones.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

application/json

Body

  • operations array[object] Required
    Any of:
    Hide attribute Show attribute
    • index object Required
      Hide index attributes Show index attributes object
      • id string Required

        Minimum length is 1.

      • title string Required

        Minimum length is 1.

      • kql object Required

        Additional properties are NOT allowed.

        Hide kql attribute Show kql attribute object
        • query string Required

          Minimum length is 1.

POST /api/streams/{name}/queries/_bulk
curl \
 --request POST 'https://localhost:5601/api/streams/{name}/queries/_bulk' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"operations":[{"index":{"id":"string","title":"string","kql":{"query":"string"}}}]}'
Request examples
# Headers
kbn-xsrf: true

# Payload
{
  "operations": [
    {
      "index": {
        "id": "string",
        "title": "string",
        "kql": {
          "query": "string"
        }
      }
    }
  ]
}