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

POST /api/observability/slos/_bulk_delete

Spaces method and path for this operation:

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

Refer to Spaces for more information.

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 authorization] Route required privileges: slo_write.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • list array[string] Required

    An array of SLO definition IDs

    Minimum length of each is 8, maximum length of each is 48. Format of each should match the following pattern: ^[a-z0-9-_]+$.

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • taskId string Required

      The taskId of the bulk delete 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_delete
curl \
 --request POST 'https://<KIBANA_URL>/api/observability/slos/_bulk_delete' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{
  "list": [
    "8853df00-ae2e-11ed-90af-09bb6422b258",
    "d077e940-1515-11ee-9c50-9d096392f520"
  ]
}'
Request example
{
  "list": [
    "8853df00-ae2e-11ed-90af-09bb6422b258",
    "d077e940-1515-11ee-9c50-9d096392f520"
  ]
}
Response examples (200)
{
  "taskId": "d08506b7-f0e8-4f8b-a06a-a83940f4db91"
}
Response examples (400)
{
  "error": "Bad Request",
  "message": "[\n  {\n    \"expected\": \"array\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"list\"\n    ],\n    \"message\": \"Invalid input: expected array, received string\"\n  }\n]",
  "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_delete] is unauthorized for user, this action is granted by the Kibana privileges [slo_write]",
  "statusCode": 403
}