Get an SLO
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. -
An identifier for the slo.
Query parameters
-
instanceId string
the specific instanceId used by the summary calculation
Responses
-
200 application/json; Elastic-Api-Version=2023-10-31
Successful request
-
400 application/json; Elastic-Api-Version=2023-10-31
Bad request
-
401 application/json; Elastic-Api-Version=2023-10-31
Unauthorized response
-
403 application/json; Elastic-Api-Version=2023-10-31
Unauthorized response
-
404 application/json; Elastic-Api-Version=2023-10-31
Not found response
GET
/s/{spaceId}/api/observability/slos/{sloId}
curl \
-X GET https://localhost:5601/s/default/api/observability/slos/9c235211-6834-11ea-a78c-6feb38a34414 \
-H "kbn-xsrf: string"
Response examples (200)
{
"budgetingMethod": "occurrences",
"createdAt": "2023-01-12T10:03:19.000Z",
"description": "My SLO description",
"enabled": true,
"groupBy": [
[
"service.name"
],
"service.name",
[
"service.name",
"service.environment"
]
],
"id": "8853df00-ae2e-11ed-90af-09bb6422b258",
"indicator": {
"params": {
"dataViewId": "03b80ab3-003d-498b-881c-3beedbaf1162",
"filter": "field.environment : \"production\" and service.name : \"my-service\"",
"good": "request.latency <= 150 and request.status_code : \"2xx\"",
"index": "my-service-*",
"timestampField": "timestamp",
"total": "field.environment : \"production\" and service.name : \"my-service\""
},
"type": "sli.kql.custom"
},
"instanceId": "host-abcde",
"name": "My Service SLO",
"objective": {
"target": 0.99,
"timesliceTarget": 0.995,
"timesliceWindow": "5m"
},
"revision": 2,
"settings": {
"frequency": "5m",
"preventInitialBackfill": true,
"syncDelay": "5m"
},
"summary": {
"errorBudget": {
"consumed": 0.8,
"initial": 0.02,
"isEstimated": true,
"remaining": 0.2
},
"sliValue": 0.9836,
"status": "HEALTHY"
},
"tags": [
"string"
],
"timeWindow": {
"duration": "30d",
"type": "rolling"
},
"updatedAt": "2023-01-12T10:03:19.000Z",
"version": 2
}
Response examples (400)
{
"error": "Bad Request",
"message": "Invalid value 'foo' supplied to: [...]",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]",
"statusCode": 401
}
Response examples (403)
{
"error": "Unauthorized",
"message": "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]",
"statusCode": 403
}
Response examples (404)
{
"error": "Not Found",
"message": "SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found",
"statusCode": 404
}