Compute SLO instance summaries in bulk at a point in time Generally available; added in 9.6.0

POST /s/{spaceId}/api/observability/slos/_bulk_snapshot

Compute the summary of multiple SLO instances at a given point in time. The endpoint is synchronous and returns results directly. Each result contains either a summary (on success) or a per-instance error. The list of requests is limited to 100 entries. When instanceId is omitted or set to '*', the API returns a result for each matching instance (up to 1000 per SLO). You must have the read privileges for the SLOs feature in the Observability section of the Kibana feature privileges.

Headers

  • kbn-xsrf string Required

    Cross-site request forgery protection

Path parameters

  • spaceId string Required

    An identifier for the space. If /s/ and the identifier are omitted from the path, the default space is used.

application/json

Body Required

  • at string(date-time) Required

    The point in time at which to compute the SLO instance summaries

  • requests array[object] Required

    The list of SLO instances to compute. Limited to 100 entries.

    Not more than 100 elements.

    Hide requests attributes Show requests attributes object
    • id string Required

      The SLO definition id

    • instanceId string

      The SLO instance ID. Omit this parameter or set it to '*' to return all instances for the SLO (up to 1000). Set a specific value to return that instance only.

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • at string(date-time) Required

      The point in time at which the summaries were computed

    • results array[object] Required

      The per-instance computation results

      Hide results attributes Show results attributes object

      The result of computing an SLO instance summary at a point in time. Contains either a summary (on success) or an error (on failure).

      • error object

        Error information when the computation failed for this SLO instance. Present when the computation failed.

        Hide error attributes Show error attributes object
        • message string Required

          The error message

        • statusCode number Required

          The HTTP status code of the error

      • id string Required

        The SLO definition id

      • instanceId string Required

        The SLO instance id. '*' represents the default (ungrouped) instance.

      • summary object

        The SLO instance summary at the requested point in time. Present when the computation succeeded.

        Hide summary attributes Show summary attributes object
        • errorBudget object Required
          Hide errorBudget attributes Show errorBudget attributes object
          • consumed number | null Required

            The error budget consumed, or null when no data is available

          • initial number Required

            The initial error budget, derived from the SLO objective

          • remaining number | null Required

            The error budget remaining, or null when no data is available

        • good number Required

          The number of good events

        • sliValue number | null Required

          The SLI value at the requested point in time, or null when no data is available

        • status string Required

          The SLO health status

          Values are NO_DATA, HEALTHY, DEGRADING, or VIOLATED.

        • total number Required

          The total number of events

  • 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 /s/{spaceId}/api/observability/slos/_bulk_snapshot
curl \
 --request POST 'https://localhost:5601/s/default/api/observability/slos/_bulk_snapshot' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: string" \
 --data '"{\n  \"at\": \"2025-01-12T10:00:00.000Z\",\n  \"requests\": [\n    {\n      \"id\": \"8853df00-ae2e-11ed-90af-09bb6422b258\",\n      \"instanceId\": \"*\"\n    },\n    {\n      \"id\": \"d077e940-1515-11ee-9c50-9d096392f520\",\n      \"instanceId\": \"host.name:web-01\"\n    }\n  ]\n}"'
Request example
{
  "at": "2025-01-12T10:00:00.000Z",
  "requests": [
    {
      "id": "8853df00-ae2e-11ed-90af-09bb6422b258",
      "instanceId": "*"
    },
    {
      "id": "d077e940-1515-11ee-9c50-9d096392f520",
      "instanceId": "host.name:web-01"
    }
  ]
}
Response examples (200)
{
  "at": "2025-01-12T10:00:00.000Z",
  "results": [
    {
      "id": "8853df00-ae2e-11ed-90af-09bb6422b258",
      "instanceId": "*",
      "summary": {
        "errorBudget": {
          "consumed": 0.24,
          "initial": 0.01,
          "remaining": 0.76
        },
        "good": 9976,
        "sliValue": 0.9976,
        "status": "HEALTHY",
        "total": 10000
      }
    },
    {
      "error": {
        "message": "SLO [d077e940-1515-11ee-9c50-9d096392f520] not found",
        "statusCode": 404
      },
      "id": "d077e940-1515-11ee-9c50-9d096392f520",
      "instanceId": "host.name:web-01"
    }
  ]
}
Response examples (400)
{
  "error": "Bad Request",
  "message": "`requests` is limited to 100 entries",
  "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_read] is unauthorized for user",
  "statusCode": 403
}