Batch delete SLO instances

POST /api/observability/slos/_delete_instances

Spaces method and path for this operation:

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

Refer to Spaces for more information.

The deletion occurs for the specified list of sloId and instanceId. 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

  • list array[object] Required

    An array of slo id and instance id

    Hide list attributes Show list attributes object
    • excludeRollup boolean
    • instanceId string Required

      The SLO instance identifier

    • sloId string Required

      The identifier of the SLO.

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

Responses

  • 204

    Successful request

  • 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/_delete_instances
curl \
 --request POST 'https://<KIBANA_URL>/api/observability/slos/_delete_instances' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{
  "list": [
    {
      "instanceId": "host-abc123",
      "sloId": "8853df00-ae2e-11ed-90af-09bb6422b258"
    },
    {
      "instanceId": "host-def456",
      "sloId": "8853df00-ae2e-11ed-90af-09bb6422b258"
    }
  ]
}'
Request example
{
  "list": [
    {
      "instanceId": "host-abc123",
      "sloId": "8853df00-ae2e-11ed-90af-09bb6422b258"
    },
    {
      "instanceId": "host-def456",
      "sloId": "8853df00-ae2e-11ed-90af-09bb6422b258"
    }
  ]
}
Response examples (400)
{
  "error": "Bad Request",
  "message": "Invalid value 'foo' supplied to: list/0/sloId",
  "statusCode": 400
}
Response examples (401)
{
  "error": "Unauthorized",
  "message": "security_exception: unable to authenticate user for REST request [/api/observability/slos]",
  "statusCode": 401
}
Response examples (403)
{
  "error": "Forbidden",
  "message": "security_exception: action [slo_write] is unauthorized for user",
  "statusCode": 403
}