Service-level objectives API - PUT an SLO

Service-level Objectives API

This is the Service-level Objectives API classic. For more information on Service-level Objectives API, see SLO Service Public API reference.

Updates service-level objective (SLO) parameters.

The request consumes an application/json payload.

PUTSaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/slo/{id}
Environment ActiveGateCluster ActiveGatehttps://{your-activegate-domain}:9999/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

ParameterTypeDescriptionInRequired
idstring

The ID of the required SLO.

pathrequired
bodySloConfigItemDtoImpl

The JSON body of the request. Contains the updated parameters of the SLO.

bodyrequired

Request body objects

The SloConfigItemDtoImpl object

ElementTypeDescriptionRequired
descriptionstring

The description of the SLO.

optional
enabledboolean

The SLO is enabled (true) or disabled (false).

If not defined, the SLO is disabled by default.

optional
errorBudgetBurnRateSloBurnRateConfig

Error budget burn rate configuration of a service-level objective (SLO).

optional
evaluationTypestring

The evaluation type of the SLO.

  • AGGREGATE
required
filterstring

The entity filter for the SLO evaluation. The total length of the entitySelector string in SLOs is limited to 1,000 characters. Use the syntax of entity selector.

optional
metricDenominatorstring

DEPRECATED

The total count metric (the denominator in rate calculation).

Required when the useRateMetric is set to false.

optional
metricExpressionstring

The percentage-based metric expression for the calculation of the SLO.

optional
metricNamestring

The name that is used to create SLO func metrics keys. Once created, metric name cannot be changed.

optional
metricNumeratorstring

DEPRECATED

The metric for the count of successes (the numerator in rate calculation).

Required when the useRateMetric is set to false.

optional
metricRatestring

DEPRECATED

The percentage-based metric for the calculation of the SLO.

Required when the useRateMetric is set to true.

optional
namestring

The name of the SLO.

required
targetnumber

The target value of the SLO.

required
timeframestring

The timeframe for the SLO evaluation. Use the syntax of the global timeframe selector.

required
useRateMetricboolean

DEPRECATED

The type of the metric to use for SLO calculation:

  • true: An existing percentage-based metric.
  • false: A ratio of two metrics.

For a list of available metrics, see Built-in metric page or try the GET metrics API call.

optional
warningnumber

The warning value of the SLO.

At warning state the SLO is still fulfilled but is getting close to failure.

required

The SloBurnRateConfig object

Error budget burn rate configuration of a service-level objective (SLO).

ElementTypeDescriptionRequired
burnRateVisualizationEnabledboolean

The error budget burn rate calculation is enabled (true) or disabled (false).

In case of false, no calculated values will be present here.

If not defined, the error budget burn rate calculation is disabled by default.

optional
fastBurnThresholdnumber

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.

{
"description": "Rate of successful payments per week",
"enabled": true,
"errorBudgetBurnRate": {
"burnRateVisualizationEnabled": true,
"fastBurnThreshold": 1.5
},
"evaluationType": "AGGREGATE",
"filter": "type(\"SERVICE\")",
"metricDenominator": "builtin:service.requestCount.server",
"metricExpression": "(100)*(builtin:service.errors.server.successCount:splitBy())/(builtin:service.requestCount.server:splitBy())",
"metricName": "payment_service_availability",
"metricNumerator": "builtin:service.errors.server.successCount",
"metricRate": "builtin:service.successes.server.rate",
"name": "Payment service availability",
"target": 95,
"timeframe": "-1d",
"useRateMetric": true,
"warning": 97.5
}

Response

Response codes

CodeTypeDescription
200-

Success

400ErrorEnvelope

Failed. The input is invalid.

404-

Failed. The requested resource doesn't exist.

500ErrorEnvelope

Internal server error.

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.