---
type: api
title: Bulk update attachments
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-post-streams-streamname-attachments-bulk
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-post-streams-streamname-attachments-bulk
products:
  - Kibana
---

# Bulk update attachments

Availability:

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/streams/{streamName}/attachments/_bulk`
- `POST` `/s/{space_id}/api/streams/{streamName}/attachments/_bulk`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/authentication#apikeyauth)

#### Path Parameters

- `streamName` (string · max: 200)
  The name of the stream

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-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.<br/><br/>[Required authorization] Route required privileges: manage_stream.

## Request Body

`application/json`

- `operations` ([] union anyOf · max: 1000) — required
  - **{ index }**
    - `index` (object) — required
      - `id` (string · max: 256) — required
      - `type` (enum) — required
        Values: `dashboard`, `rule`, `slo`
  - **{ delete }**
    - `delete` (object) — required
      - `id` (string · max: 256) — required
      - `type` (enum) — required
        Values: `dashboard`, `rule`, `slo`

## Response

Successfully performed bulk operations

## Code Examples

#### Console

```console
POST /api/streams/{streamName}/attachments/_bulk
{
  "operations": [
    {
      "index": {
        "id": "dashboard-123",
        "type": "dashboard"
      }
    },
    {
      "delete": {
        "id": "rule-456",
        "type": "rule"
      }
    }
  ]
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/streams/{streamName}/attachments/_bulk" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "operations": [
    {
      "index": {
        "id": "dashboard-123",
        "type": "dashboard"
      }
    },
    {
      "delete": {
        "id": "rule-456",
        "type": "rule"
      }
    }
  ]
}'
```

## Response Examples

#### Bulk attachments

```json
{
  "acknowledged": true
}
```

