---
type: api
title: Batch delete rollup and summary data
description: The deletion occurs for the specified list of `sloId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-deleterollupdataop
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-deleterollupdataop
products:
  - Kibana
---

# Batch delete rollup and summary data

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

## Paths

- `POST` `/s/{spaceId}/api/observability/slos/_bulk_purge_rollup`

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

#### Path Parameters

- `spaceId` (string)
  An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.

## Description

The deletion occurs for the specified list of `sloId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.

## Request Body

`application/json`

- `list` ([] string) — required
  An array of slo ids
- `purgePolicy` (union oneOf) — required
  Policy that dictates which SLI documents to purge based on age
  - **purgeType: fixed-age**
    - `age` (string) — optional
      The duration to determine which documents to purge, formatted as {duration}{unit}. This value should be greater than or equal to the time window of every SLO provided.
    - `purgeType` (enum) — optional
      Specifies whether documents will be purged based on a specific age or on a timestamp
      Values: `fixed-age`
  - **purgeType: fixed-time**
    - `purgeType` (enum) — optional
      Specifies whether documents will be purged based on a specific age or on a timestamp
      Values: `fixed-time`
    - `timestamp` (string) — optional
      The timestamp to determine which documents to purge, formatted in ISO. This value should be older than the applicable time window of every SLO provided.

## Responses

#### `200`

Successful request

`application/json`

- `taskId` (string)
  The task id of the purge 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 /s/{spaceId}/api/observability/slos/_bulk_purge_rollup
{
  "list": [
    "8853df00-ae2e-11ed-90af-09bb6422b258"
  ],
  "purgePolicy": {
    "age": "7d",
    "purgeType": "fixed-age"
  }
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/s/{spaceId}/api/observability/slos/_bulk_purge_rollup" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "list": [
    "8853df00-ae2e-11ed-90af-09bb6422b258"
  ],
  "purgePolicy": {
    "age": "7d",
    "purgeType": "fixed-age"
  }
}'
```

## Response Examples

#### Bulk purge response with task ID

```json
{
  "taskId": "8853df00-ae2e-11ed-90af-09bb6422b258"
}
```

#### Bad request

```json
{
  "error": "Bad Request",
  "message": "Invalid value \u0027foo\u0027 supplied to: purgePolicy/purgeType",
  "statusCode": 400
}
```

#### Unauthorized

```json
{
  "error": "Unauthorized",
  "message": "security_exception: unable to authenticate user for REST request [/api/observability/slos]",
  "statusCode": 401
}
```

#### Forbidden

```json
{
  "error": "Forbidden",
  "message": "security_exception: action [slo_write] is unauthorized for user",
  "statusCode": 403
}
```

