Batch delete rollup and summary data

POST /api/observability/slos/_bulk_purge_rollup

Spaces method and path for this operation:

post /s/{space_id}/api/observability/slos/_bulk_purge_rollup

Refer to Spaces for more information.

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.

[Required authorization] Route required privileges: slo_write.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • force boolean
  • list array[string] Required

    An array of SLO IDs

  • purgePolicy object Required

    Policy that dictates which SLI documents to purge based on age

    One of:

Responses

  • 200 application/json

    Successful request

    Hide response attribute Show response attribute object
    • taskId string

      The task ID of the purge operation

  • 400 application/json

    Bad request

    Hide response attributes Show response attributes object
    • error string Required
    • message string Required
    • statusCode number Required
  • 401 application/json

    Unauthorized response

    Hide response attributes Show response attributes object
    • error string Required
    • message string Required
    • statusCode number Required
  • 403 application/json

    Forbidden response

    Hide response attributes Show response attributes object
    • error string Required
    • message string Required
    • statusCode number Required
POST /api/observability/slos/_bulk_purge_rollup
curl \
 --request POST 'https://<KIBANA_URL>/api/observability/slos/_bulk_purge_rollup' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{
  "list": [
    "8853df00-ae2e-11ed-90af-09bb6422b258"
  ],
  "purgePolicy": {
    "age": "7d",
    "purgeType": "fixed_age"
  }
}'
Request examples
{
  "list": [
    "8853df00-ae2e-11ed-90af-09bb6422b258"
  ],
  "purgePolicy": {
    "age": "7d",
    "purgeType": "fixed_age"
  }
}
{
  "list": [
    "8853df00-ae2e-11ed-90af-09bb6422b258",
    "d077e940-1515-11ee-9c50-9d096392f520"
  ],
  "purgePolicy": {
    "purgeType": "fixed_time",
    "timestamp": "2024-12-31T00:00:00.000Z"
  }
}
Response examples (200)
{
  "taskId": "-sOV3daHSeqIWgQLNaKYtw:35832"
}
Response examples (400)
{
  "error": "Bad Request",
  "message": "[\n  {\n    \"code\": \"invalid_union\",\n    \"errors\": [],\n    \"note\": \"No matching discriminator\",\n    \"discriminator\": \"purgeType\",\n    \"options\": [\n      \"fixed_age\",\n      \"fixed_time\"\n    ],\n    \"path\": [\n      \"purgePolicy\",\n      \"purgeType\"\n    ],\n    \"message\": \"Invalid discriminator value. Expected 'fixed_age' | 'fixed_time'\"\n  }\n]",
  "statusCode": 400
}
{
  "error": "Bad Request",
  "message": "The provided purge policy is invalid. At least one SLO has a time window that is longer than the provided purge policy.",
  "statusCode": 400
}
Response examples (401)
{
  "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
}
Response examples (403)
{
  "error": "Forbidden",
  "message": "API [POST /api/observability/slos/_bulk_purge_rollup] is unauthorized for user, this action is granted by the Kibana privileges [slo_write]",
  "statusCode": 403
}