Service-level objectives API - GET an SLO
Gets the parameter of the specified service-level objective (SLO).
If from and to parameters are provided, the SLO is calculated for that timeframe; otherwise the SLO's own timeframe is used.
The request produces an application/json
payload.
GET | SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/slo/{id} |
Environment ActiveGateCluster ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/slo/{id} |
Authentication
To execute this request, you need an access token with slo.read
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
The start of the requested timeframe.
You can use one of the following formats:
- Timestamp in UTC milliseconds.
- Human-readable format of
2021-01-25T05:57:01.123+01:00
. If no time zone is specified, UTC is used. You can use a space character instead of theT
. Seconds and fractions of a second are optional. - Relative timeframe, back from now. The format is
now-NU/A
, whereN
is the amount of time,U
is the unit of time, andA
is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example,now-1y/w
is one year back, aligned by a week. You can also specify relative timeframe without an alignment:now-NU
. Supported time units for the relative timeframe are:m
: minutesh
: hoursd
: daysw
: weeksM
: monthsy
: years
If not set, the relative timeframe of two weeks is used (now-2w
).
The end of the requested timeframe.
You can use one of the following formats:
- Timestamp in UTC milliseconds.
- Human-readable format of
2021-01-25T05:57:01.123+01:00
. If no time zone is specified, UTC is used. You can use a space character instead of theT
. Seconds and fractions of a second are optional. - Relative timeframe, back from now. The format is
now-NU/A
, whereN
is the amount of time,U
is the unit of time, andA
is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example,now-1y/w
is one year back, aligned by a week. You can also specify relative timeframe without an alignment:now-NU
. Supported time units for the relative timeframe are:m
: minutesh
: hoursd
: daysw
: weeksM
: monthsy
: years
If not set, the current timestamp is used.
The ID of the required SLO.
The timeframe to calculate the SLO values:
CURRENT
: SLO's own timeframe.GTF
: timeframe specified by from and to parameters.
If not set, the CURRENT
value is used.
CURRENT
GTF
Response
Response codes
Response body objects
The SLO
object
Parameters of a service-level objective (SLO).
The key for the SLO's error budget burn rate func metric.
DEPRECATED
The denominator value used to evaluate the SLO when useRateMetric is set to false
.
A short description of the SLO.
The SLO is enabled (true
) or disabled (false
).
The error of the SLO calculation.
If the value differs from NONE
, there is something wrong with the SLO calculation.
The error budget of the calculated SLO.
The error budget is the difference between the calculated and target values. A positive number means all is good; a negative number means trouble.
Has the value of the evaluated error budget or the value of -1
:
- If there is an error with the SLO calculation; in that case check the value of the error property.
- If the evaluate parameter has not been set to
true
; in that case the error property will contain no error.
The key for the SLO's error budget func metric.
The calculated status value of the SLO. Has the value of the evaluated SLO status or the value of -1
:
- If there is an error with the SLO calculation; in that case check the value of the error property.
- If the evaluate parameter has not been set to
true
; in that case the error property will contain no error.
The evaluation type of the SLO.
AGGREGATE
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.
The ID of the SLO
DEPRECATED
The total count metric (the denominator in rate calculation).
Required when the useRateMetric is set to false
.
The percentage-based metric expression for the calculation of the SLO.
The key for the SLO's status func metric.
DEPRECATED
The metric for the count of successes (the numerator in rate calculation).
Required when the useRateMetric is set to false
.
DEPRECATED
The percentage-based metric for the calculation of the SLO.
Required when the useRateMetric is set to true
.
The name of the SLO.
The key for the SLO's normalized error budget func metric.
DEPRECATED
The numerator value used to evaluate the SLO when useRateMetric is set to false
.
DEPRECATED
The entity filter for fetching the number of problems related to an SLO. Auto-generated in case no filter has been added to the SLO.
Number of open problems related to the SLO.
Has the value of -1
if there's an error with fetching SLO related problems.
Total number of problems related to the SLO.
Has the value of -1
if there's an error with fetching SLO related problems.
The status of the calculated SLO.
FAILURE
SUCCESS
WARNING
The target value of the SLO.
The timeframe for the SLO evaluation. Use the syntax of the global timeframe selector.
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.
The warning value of the SLO.
At warning state the SLO is still fulfilled but is getting close to failure.
The SloBurnRate
object
Error budget burn rate evaluation of a service-level objective (SLO).
The calculated burn rate type.
Has a value of 'FAST', 'SLOW' or 'NONE'.
FAST
NONE
SLOW
The burn rate of the SLO, calculated for the last hour.
The error budget burn rate calculation is enabled (true
) or disabled (false
).
In case of false
, no calculated values will be present here.
The estimated time left to consume the error budget in hours.
The threshold between a slow and a fast burn rate.
The calculated value of the SLO for the timeframe chosen for the burn rate calculation.
Response body JSON model
{"burnRateMetricKey": "func:slo.errorBudgetBurnRate.payment_service_availability","denominatorValue": 90,"description": "Rate of successful payments per week","enabled": true,"error": "NONE","errorBudget": 1.25,"errorBudgetBurnRate": {"burnRateType": "SLOW","burnRateValue": 1.25,"burnRateVisualizationEnabled": true,"estimatedTimeToConsumeErrorBudget": 24,"fastBurnThreshold": 1.5,"sloValue": 95},"errorBudgetMetricKey": "func:slo.errorBudget.payment_service_availability","evaluatedPercentage": 96.25,"evaluationType": "AGGREGATE","filter": "type(\"SERVICE\")","id": "123e4567-e89b-42d3-a456-556642440000","metricDenominator": "builtin:service.requestCount.server","metricExpression": "(100)*(builtin:service.errors.server.successCount:splitBy())/(builtin:service.requestCount.server:splitBy())","metricKey": "func:slo.payment_service_availability","metricNumerator": "builtin:service.errors.server.successCount","metricRate": "builtin:service.successes.server.rate","name": "Payment service availability","normalizedErrorBudgetMetricKey": "func:slo.normalizedErrorBudget.payment_service_availability","numeratorValue": 80,"problemFilters": "[type(\"SERVICE\")]","relatedOpenProblems": 1,"relatedTotalProblems": 1,"status": "WARNING","target": 95,"timeframe": "-1d","useRateMetric": true,"warning": 97.5}