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-_]+$.
Body
-
Links to related assets for the SLO
Additional properties are NOT allowed.
-
A description for the SLO.
- indicator
object 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.
-
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.
-
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.
-
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
Hide monitorIds attributes Show monitorIds attributes object
-
The projects to filter the monitors by
Hide projects attributes Show projects attributes object
-
The tags to filter the monitors by
Hide tags attributes Show tags attributes object
-
-
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.
-
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.
-
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.
-
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.
-
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
-
The aggregation type of the metric.
Value is
sum. -
The field of the metric.
- filter
string | object The filter to apply to the metric.
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.
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The name of the metric. Only valid options are A-Z
Hide attributes Show attributes
-
The aggregation type of the metric.
Value is
doc_count. - filter
string | object The filter to apply to the metric.
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.
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The name of the metric. Only valid options are A-Z
-
-
-
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
-
The aggregation type of the metric.
Value is
sum. -
The field of the metric.
- filter
string | object The filter to apply to the metric.
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.
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The name of the metric. Only valid options are A-Z
Hide attributes Show attributes
-
The aggregation type of the metric.
Value is
doc_count. - filter
string | object The filter to apply to the metric.
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.
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The name of the metric. Only valid options are A-Z
-
-
-
-
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.
-
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
-
The aggregation type of the metric.
Values are
avg,max,min,sum,cardinality,last_value, orstd_deviation. -
The field of the metric.
- filter
string | object The filter to apply to the metric.
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.
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The name of the metric. Only valid options are A-Z
Hide attributes Show attributes
-
The aggregation type of the metric. Only valid option is "doc_count"
Value is
doc_count. - filter
string | object The filter to apply to the metric.
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.
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The name of the metric. Only valid options are A-Z
Hide attributes Show attributes
-
The aggregation type of the metric. Only valid option is "percentile"
Value is
percentile. -
The field of the metric.
- filter
string | object The filter to apply to the metric.
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.
-
Additional properties are allowed.
-
-
the KQL query to filter the documents with.
-
-
The name of the metric. Only valid options are A-Z
-
The percentile value.
-
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
-
A name for 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
-
the target objective for each slice when using a timeslices budgeting method
-
the duration of each slice when using a timeslices budgeting method, as {duraton}{unit}
Maximum length is
16.
-
-
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
Responses
-
Successful request
Hide response attributes Show response attributes object
-
Links to related assets for the SLO
-
The budgeting method to use when computing the rollup data.
Values are
occurrencesortimeslices. -
The creation date
-
The description of the SLO.
-
Indicate if the SLO is enabled
-
The identifier of the SLO.
-
The SLI indicator. Its
paramsdepend ontype; see theindicatorproperty of the create SLO request body. -
The name of the SLO.
-
Defines properties for the SLO objective
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}
-
-
The SLO revision
-
Defines properties for SLO settings.
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.
Default value is
1m. -
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.
Default value is
false. -
Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window.
Default value is
false. -
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.
Default value is
1m. -
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
-
Defines properties for the SLO time window
Hide timeWindow attributes Show timeWindow attributes object
-
the duration formatted as {duration}{unit}. Accepted values for rolling: 7d, 30d, 90d. Accepted values for calendar aligned: 1w (weekly) or 1M (monthly)
-
Indicates whether the time window is a rolling or a calendar aligned time window.
Values are
rollingorcalendarAligned.
-
-
The last update date
-
The internal SLO version
-
-
Bad request
-
Unauthorized response
-
Forbidden response
-
Not found response
curl \
--request PUT 'https://<KIBANA_URL>/api/observability/slos/{id}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{
"name": "Updated Service Availability",
"tags": [
"production",
"updated"
]
}'
{
"name": "Updated Service Availability",
"tags": [
"production",
"updated"
]
}
{
"objective": {
"target": 0.995
}
}
{
"budgetingMethod": "occurrences",
"createdAt": "2025-01-12T10:03:19.000Z",
"description": "Availability of my web service",
"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": "Updated Service Availability",
"objective": {
"target": 0.99
},
"revision": 2,
"settings": {
"frequency": "5m",
"syncDelay": "5m"
},
"tags": [
"production",
"updated"
],
"timeWindow": {
"duration": "30d",
"type": "rolling"
},
"updatedAt": "2025-03-26T14:30:00.000Z",
"version": 2
}
{
"error": "Bad Request",
"message": "Invalid value 'foo' supplied to: indicator/type",
"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_write] is unauthorized for user",
"statusCode": 403
}
{
"error": "Not Found",
"message": "SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found",
"statusCode": 404
}