Bulk update attachments Technical Preview

View as Markdown
POST /api/streams/{streamName}/attachments/_bulk

Spaces method and path for this operation:

post /s/{space_id}/api/streams/{streamName}/attachments/_bulk

Refer to Spaces for more information.

Bulk update attachments linked to a stream. Can link new attachments and delete existing ones. Supports mixed attachment types in a single request.

[Required authorization] Route required privileges: manage_stream.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • streamName string Required

    The name of the stream

application/json

Body

  • operations array[object] Required
    Any of:

Responses

  • 200 application/json

    Successfully performed bulk operations

POST /api/streams/{streamName}/attachments/_bulk
curl \
 --request POST 'https://localhost:5601/api/streams/{streamName}/attachments/_bulk' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"operations":[{"index":{"id":"dashboard-123","type":"dashboard"}},{"delete":{"id":"rule-456","type":"rule"}}]}'
Request example
{
  "operations": [
    {
      "index": {
        "id": "dashboard-123",
        "type": "dashboard"
      }
    },
    {
      "delete": {
        "id": "rule-456",
        "type": "rule"
      }
    }
  ]
}
Response examples (200)
{
  "acknowledged": true
}