Service-level objectives API - PUT an SLO
Updates service-level objective (SLO) parameters.
The request consumes an application/json
payload.
PUT | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v2/slo/{id} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/slo/{id} | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/v2/slo/{id} |
Authentication
To execute this request, you need an access token with slo.write
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
id | string | The ID of the required SLO. | path | required |
body | Slo | The JSON body of the request. Contains the updated parameters of the SLO. | body | required |
Request body objects
The SloConfigItemDtoImpl
object
Element | Type | Description | Required |
---|---|---|---|
enabled | boolean | The SLO is enabled ( | optional |
name | string | The name of the SLO. | optional |
description | string | The description of the SLO (optional). | optional |
metricName | string | The name for a metric expression | optional |
metricExpression | string | The percentage-based metric expression for the calculation of the SLO. | optional |
boolean | DEPRECATED The type of the metric to use for SLO calculation:
For a list of available metrics, see Built-in metric page or try the GET metrics API call. | optional | |
string | DEPRECATED The percentage-based metric for the calculation of the SLO. Required when the useRateMetric is set to | optional | |
string | DEPRECATED The metric for the count of successes (the numerator in rate calculation). Required when the useRateMetric is set to | optional | |
string | DEPRECATED The total count metric (the denominator in rate calculation). Required when the useRateMetric is set to | optional | |
evaluationType | string | The evaluation type of the SLO. | optional |
filter | string | The entity filter for the SLO evaluation. Use the syntax of entity selector. | optional |
target | number | The target value of the SLO. | optional |
warning | number | The warning value of the SLO. At warning state the SLO is still fulfilled but is getting close to failure. | optional |
errorBudgetBurnRate | Slo | Error budget burn rate configuration of a service-level objective (SLO). | optional |
timeframe | string | The timeframe for the SLO evaluation. Use the syntax of the global timeframe selector. | optional |
The SloBurnRateConfig
object
Error budget burn rate configuration of a service-level objective (SLO).
Element | Type | Description | Required |
---|---|---|---|
burnRateVisualizationEnabled | boolean | The error budget burn rate visualization is enabled ( In case of | optional |
fastBurnThreshold | number | The threshold between a slow and a fast burn rate. | optional |
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{
"enabled": true,
"name": "Payment service availability",
"description": "Rate of successful payments per week",
"metricName": "payment_service_availability",
"metricExpression": "(100)*(builtin:service.errors.server.successCount:splitBy())/(builtin:service.requestCount.server:splitBy())",
"useRateMetric": true,
"metricRate": "builtin:service.successes.server.rate",
"metricNumerator": "builtin:service.errors.server.successCount",
"metricDenominator": "builtin:service.requestCount.server",
"evaluationType": "AGGREGATE",
"filter": "type(\"SERVICE\")",
"target": 95,
"warning": 97.5,
"errorBudgetBurnRate": {
"burnRateVisualizationEnabled": true,
"fastBurnThreshold": 1.5
},
"timeframe": "-1d"
}
Response
Response codes
Code | Type | Description |
---|---|---|
200 | - | Success |
400 | ErrorEnvelope | Failed. The input is invalid. |
404 | Failed. The requested resource doesn't exist. | |
500 | ErrorEnvelope | Internal server error. |