---
type: api
title: Bulk delete SLO definitions and their associated summary and rollup data.
description: Bulk delete SLO definitions and their associated summary and rollup data. This endpoint initiates a bulk deletion operation for SLOs, which may take some time to complete. The status of the operation can be checked using the `GET /api/observability/slos/_bulk_delete/{taskId}` endpoint.<br/><br/>[Required authorization] Route required privileges: slo_write.
url: https://www.elastic.co/elastic/docs-builder/docs/4843/api/doc/kibana-serverless/operation/operation-bulkdeleteop
resource: https://www.elastic.co/elastic/docs-builder/docs/4843/api/doc/kibana-serverless/operation/operation-bulkdeleteop
products:
  - Kibana
---

# Bulk delete SLO definitions and their associated summary and rollup data.

Authentication: required

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

## Paths

- `POST` `/api/observability/slos/_bulk_delete`
- `POST` `/s/{space_id}/api/observability/slos/_bulk_delete`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## Description

Bulk delete SLO definitions and their associated summary and rollup data. This endpoint initiates a bulk deletion operation for SLOs, which may take some time to complete. The status of the operation can be checked using the `GET /api/observability/slos/_bulk_delete/{taskId}` endpoint.

## Required privileges

- Privileges: `slo_write`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `list` (string[]) — required
  An array of SLO Definition id

## Responses

#### `200`

Successful response

`application/json`

- `taskId` (string)
  The taskId of the bulk delete operation
#### `400`

Bad request

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
#### `401`

Unauthorized response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
#### `403`

Forbidden response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
## Code examples

#### Console

```console
POST kbn:/api/observability/slos/_bulk_delete
{
  "list": [
    "8853df00-ae2e-11ed-90af-09bb6422b258",
    "d077e940-1515-11ee-9c50-9d096392f520"
  ]
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/observability/slos/_bulk_delete" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "list": [
      "8853df00-ae2e-11ed-90af-09bb6422b258",
      "d077e940-1515-11ee-9c50-9d096392f520"
    ]
  }'
```

## Response examples

#### Bulk delete response with task ID

`application/json`

```json
{
  "taskId": "d08506b7-f0e8-4f8b-a06a-a83940f4db91"
}
```

#### Invalid request body

`application/json`

```json
{
  "error": "Bad Request",
  "message": "[\n  {\n    \u0022expected\u0022: \u0022array\u0022,\n    \u0022code\u0022: \u0022invalid_type\u0022,\n    \u0022path\u0022: [\n      \u0022list\u0022\n    ],\n    \u0022message\u0022: \u0022Invalid input: expected array, received string\u0022\n  }\n]",
  "statusCode": 400
}
```

#### Unauthorized

`application/json`

```json
{
  "error": "Unauthorized",
  "message": "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
  "statusCode": 401
}
```

#### Forbidden

`application/json`

```json
{
  "error": "Forbidden",
  "message": "API [POST /api/observability/slos/_bulk_delete] is unauthorized for user, this action is granted by the Kibana privileges [slo_write]",
  "statusCode": 403
}
```

