Spaces method and path for this operation:
Refer to Spaces for more information.
You must have the write privileges for the SLOs feature in the Observability section of the Kibana feature privileges.
[Required authorization] Route required privileges: slo_write.
Path parameters
-
The identifier of the SLO.
Minimum length is
8, maximum length is48. Format should match the following pattern:^[a-z0-9-_]+$.
Responses
-
Successful request
Hide response attributes Show response attributes object
-
Links to related assets for the SLO
Additional properties are NOT allowed.
-
The creation date
Maximum length is
128. -
The user who created the SLO.
-
The description of the SLO.
-
Indicate if the SLO is enabled
-
The identifier of the SLO.
Minimum length is
8, maximum length is48. Format should match the following pattern:^[a-z0-9-_]+$. - indicator
object Required The indicator to use to compute the SLI
One of: Defines properties for the APM latency indicator type
Hide attributes Show attributes
-
An object containing the indicator parameters.
Additional properties are NOT allowed.
Hide params attributes Show params attributes object
-
The kibana data view ID to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
- filter
string | object KQL query used for filtering the data
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The index used by APM metrics
-
The latency threshold in milliseconds
-
-
The type of indicator.
Value is
sli.apm.transactionDuration.
Defines properties for the APM availability indicator type
Hide attributes Show attributes
-
An object containing the indicator parameters.
Additional properties are NOT allowed.
Hide params attributes Show params attributes object
-
The kibana data view ID to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
- filter
string | object KQL query used for filtering the data
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The index used by APM metrics
-
-
The type of indicator.
Value is
sli.apm.transactionErrorRate.
Defines properties for a synthetics availability indicator type
Hide attributes Show attributes
-
An object containing the indicator parameters.
Additional properties are NOT allowed.
Hide params attributes Show params attributes object
-
The kibana data view ID to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
- filter
string | object the KQL query to filter the documents with.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The index or index pattern to use
-
The monitors to create the SLO from
-
The projects to filter the monitors by
-
The tags to filter the monitors by
-
-
The type of indicator.
Value is
sli.synthetics.availability.
Defines properties for a custom query indicator type
Hide attributes Show attributes
-
An object containing the indicator parameters.
Additional properties are NOT allowed.
Hide params attributes Show params attributes object
-
The kibana data view ID to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
- filter
string | object the KQL query to filter the documents with.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
- good
string | object Required the KQL query used to define the good events, or an object defining the KQL query and filters.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The index or index pattern to use
-
The timestamp field used in the source indice.
- total
string | object Required the KQL query used to define all events, or an object defining the KQL query and filters.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
-
The type of indicator.
Value is
sli.kql.custom.
Defines properties for a custom metric indicator type
Hide attributes Show attributes
-
An object containing the indicator parameters.
Additional properties are NOT allowed.
Hide params attributes Show params attributes object
-
The kibana data view ID to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
- filter
string | object the KQL query to filter the documents with.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
An object defining the "good" metrics and equation
Additional properties are NOT allowed.
Hide good attributes Show good attributes object
-
The equation to calculate the metric.
-
List of metrics with their name, aggregation type, and field.
Any of: Hide attributes Show attributes
Hide attributes Show attributes
-
-
The index or index pattern to use
-
The timestamp field used in the source indice.
-
An object defining the "total" metrics and equation
Additional properties are NOT allowed.
Hide total attributes Show total attributes object
-
The equation to calculate the metric.
-
List of metrics with their name, aggregation type, and field.
Any of: Hide attributes Show attributes
Hide attributes Show attributes
-
-
-
The type of indicator.
Value is
sli.metric.custom.
Defines properties for a timeslice metric indicator type
Hide attributes Show attributes
-
An object containing the indicator parameters.
Additional properties are NOT allowed.
Hide params attributes Show params attributes object
-
The kibana data view ID to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
- filter
string | object the KQL query to filter the documents with.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The index or index pattern to use
-
An object defining the metrics, equation, and threshold to determine if it's a good slice or not
Additional properties are NOT allowed.
Hide metric attributes Show metric attributes object
-
The comparator to use to compare the equation to the threshold.
Values are
GT,GTE,LT, orLTE. -
The equation to calculate the metric.
-
List of metrics with their name, aggregation type, and field.
Any of: Hide attributes Show attributes
Hide attributes Show attributes
Hide attributes Show attributes
-
The threshold used to determine if the metric is a good slice or not.
-
-
The timestamp field used in the source indice.
-
-
The type of indicator.
Value is
sli.metric.timeslice.
Defines properties for a histogram indicator type
Hide attributes Show attributes
-
An object containing the indicator parameters.
Additional properties are NOT allowed.
Hide params attributes Show params attributes object
-
The kibana data view ID to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
- filter
string | object the KQL query to filter the documents with.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
- good
object Required An object defining the "good" events
Any of: Hide attributes Show attributes
-
The type of aggregation to use.
Value is
value_count. -
The field use to aggregate the good events.
- filter
string | object The filter for events.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
Hide attributes Show attributes
-
The type of aggregation to use.
Value is
range. -
The field use to aggregate the good events.
- filter
string | object The filter for events.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The starting value of the range. Only required for "range" aggregations.
-
The ending value of the range. Only required for "range" aggregations.
-
-
The index or index pattern to use
-
The timestamp field used in the source indice.
- total
object Required An object defining the "total" events
Any of: Hide attributes Show attributes
-
The type of aggregation to use.
Value is
value_count. -
The field use to aggregate the good events.
- filter
string | object The filter for events.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
Hide attributes Show attributes
-
The type of aggregation to use.
Value is
range. -
The field use to aggregate the good events.
- filter
string | object The filter for events.
Any of: the KQL query to filter the documents with.
Defines properties for a filter
Hide attributes Show attributes
-
Defines properties for a filter
Hide filters attributes Show filters attributes object
Defines properties for a filter
-
Defines properties for a filter
Additional properties are NOT allowed.
Hide meta attributes Show meta attributes object
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The starting value of the range. Only required for "range" aggregations.
-
The ending value of the range. Only required for "range" aggregations.
-
-
-
The type of indicator.
Value is
sli.histogram.custom.
-
-
The name of the SLO.
-
Defines properties for the SLO objective
Additional properties are NOT allowed.
Hide objective attributes Show objective attributes object
-
the target objective between 0 and 1 excluded
Minimum value is
0, maximum value is1. -
the target objective for each slice when using a timeslices budgeting method
Minimum value is
0, maximum value is1. -
the duration of each slice when using a timeslices budgeting method, as {duraton}{unit}
Maximum length is
16.
-
-
The SLO revision
-
Defines properties for SLO settings.
Additional properties are NOT allowed.
Hide settings attributes Show settings attributes object
-
The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute.
Maximum length is
16. -
Pin the L1 rollup transform to the local/origin project only, preventing flat-world (cross-linked-project) reads. Only applies on serverless. Default is false, meaning rollup transforms target all linked projects.
-
Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window.
-
ES ProjectRouting expression controlling which linked projects the L1 rollup reads. When set (including null), overrides preventCrossProjectSearch. null and
_alias:_originmean origin only;_alias:*means all linked projects. Subset example_id:p1 AND _id:p2.Maximum length is
8192. -
The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval.
Maximum length is
16. -
The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field.
-
-
List of tags
-
The last update date
Maximum length is
128. -
The user who last updated the SLO.
-
The internal SLO version
-
-
Bad request
-
Unauthorized response
-
Forbidden response
-
Not found response
-
Service unavailable - The operation did not complete within the request deadline
curl \
--request POST 'https://localhost:5601/api/observability/slos/{id}/_reset' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true"
{
"artifacts": {
"dashboards": []
},
"budgetingMethod": "occurrences",
"createdAt": "2025-01-12T10:03:19.000Z",
"createdBy": "elastic",
"description": "Availability of my web service measured by successful HTTP responses",
"enabled": true,
"groupBy": "*",
"id": "8853df00-ae2e-11ed-90af-09bb6422b258",
"indicator": {
"params": {
"filter": "field.environment : \"production\" and service.name : \"my-service\"",
"good": "request.status_code : \"2xx\"",
"index": "logs-*",
"timestampField": "@timestamp",
"total": "request.status_code : *"
},
"type": "sli.kql.custom"
},
"name": "My Service Availability",
"objective": {
"target": 0.99
},
"revision": 2,
"settings": {
"frequency": "5m",
"preventInitialBackfill": false,
"syncDelay": "5m"
},
"tags": [
"production",
"web-service"
],
"timeWindow": {
"duration": "30d",
"type": "rolling"
},
"updatedAt": "2025-03-26T14:30:00.000Z",
"updatedBy": "elastic",
"version": 2
}
{
"error": "Bad Request",
"message": "[\n {\n \"origin\": \"string\",\n \"code\": \"too_small\",\n \"minimum\": 8,\n \"inclusive\": true,\n \"path\": [\n \"id\"\n ],\n \"message\": \"Invalid SLO ID, must be between 8 and 48 characters and contain only letters, numbers, hyphens, and underscores\"\n },\n {\n \"origin\": \"string\",\n \"code\": \"invalid_format\",\n \"format\": \"regex\",\n \"pattern\": \"/^[a-z0-9-_]+$/\",\n \"path\": [\n \"id\"\n ],\n \"message\": \"Invalid SLO ID, must be between 8 and 48 characters and contain only letters, numbers, hyphens, and underscores\"\n }\n]",
"statusCode": 400
}
{
"error": "Unauthorized",
"message": "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
"statusCode": 401
}
{
"error": "Forbidden",
"message": "API [POST /api/observability/slos/8853df00-ae2e-11ed-90af-09bb6422b258/_reset] is unauthorized for user, this action is granted by the Kibana privileges [slo_write]",
"statusCode": 403
}
{
"error": "Not Found",
"message": "SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found",
"statusCode": 404
}
{
"error": "Service Unavailable",
"message": "Operation did not complete within 60000ms",
"statusCode": 503
}