You must have the read privileges for the SLOs feature in the Observability section of the Kibana feature privileges.
Path parameters
-
An identifier for the space. If
/s/and the identifier are omitted from the path, the default space is used.
Query parameters
-
A valid kql query to filter the SLO with
-
The page size to use for cursor-based pagination, must be greater or equal than 1
Default value is
1. -
The cursor to use for fetching the results from, when using a cursor-base pagination.
-
The page to use for pagination, must be greater or equal than 1
Default value is
1. -
Number of SLOs returned by page
Maximum value is
5000. Default value is25. -
Sort by field
Values are
sli_value,status,error_budget_consumed, orerror_budget_remaining. Default value isstatus. -
Sort order
Values are
ascordesc. Default value isasc. -
Hide stale SLOs from the list as defined by stale SLO threshold in SLO settings
curl \
--request GET 'https://<KIBANA_URL>/s/default/api/observability/slos' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: string"
{
"page": 1,
"total": 42,
"perPage": 25,
"results": [
{
"id": "8853df00-ae2e-11ed-90af-09bb6422b258",
"name": "My Service Availability",
"tags": [
"production",
"web-service"
],
"enabled": true,
"groupBy": "*",
"summary": {
"status": "HEALTHY",
"sliValue": 0.9983,
"errorBudget": {
"initial": 0.01,
"consumed": 0.17,
"remaining": 0.83,
"isEstimated": false
}
},
"version": 2,
"revision": 1,
"settings": {
"frequency": "5m",
"syncDelay": "5m"
},
"createdAt": "2025-01-12T10:03:19.000Z",
"indicator": {
"type": "sli.kql.custom",
"params": {
"good": "request.status_code : \"2xx\"",
"index": "logs-*",
"total": "request.status_code : *",
"filter": "field.environment : \"production\" and service.name : \"my-service\"",
"timestampField": "@timestamp"
}
},
"objective": {
"target": 0.99
},
"updatedAt": "2025-01-12T10:03:19.000Z",
"instanceId": "*",
"timeWindow": {
"type": "rolling",
"duration": "30d"
},
"description": "Availability of my web service",
"budgetingMethod": "occurrences"
}
]
}
{
"error": "Bad Request",
"message": "Invalid value 'invalid' supplied to: sortBy",
"statusCode": 400
}
{
"error": "Unauthorized",
"message": "security_exception: unable to authenticate user for REST request [/api/observability/slos]",
"statusCode": 401
}
{
"error": "Forbidden",
"message": "security_exception: action [slo_read] is unauthorized for user",
"statusCode": 403
}
{
"error": "Not Found",
"message": "SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found",
"statusCode": 404
}