slo
Create an SLO
You must have all privileges for the SLOs feature in the Observability section of the Kibana feature privileges.
post/s/{spaceId}/api/observability/slos
Path parameters
spaceIdstring required
Example:default
An identifier for the space. If /s/ and the identifier are omitted from the path, the default space is used.
Headers
kbn-xsrfstring required
Cross-site request forgery protection
Request body
Example request
{
"budgetingMethod": "occurrences",
"id": "my-super-slo-id",
"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"
},
"objective": {
"target": 0.99,
"timesliceTarget": 0.995,
"timesliceWindow": "5m"
},
"settings": {
"frequency": "5m",
"preventCrossProjectSearch": true,
"preventInitialBackfill": true,
"syncDelay": "5m",
"syncField": "event.ingested"
},
"timeWindow": {
"duration": "30d",
"type": "rolling"
}
}Response
Successful request
Example response
{
"id": "8853df00-ae2e-11ed-90af-09bb6422b258"
}