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 | 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.read
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( | query | optional |
to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. | query | optional |
id | string | The ID of the required SLO. | path | required |
timeFrame | string | The timeframe to calculate the SLO values:
If not set, the | query | optional |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | S | Success. The response contains the parameters and calculated values of the requested SLO. |
400 | ErrorEnvelope | Failed. The input is invalid. |
404 | ErrorEnvelope | Failed. The requested resource doesn't exist. |
Response body objects
The SLO
object
Parameters of a service-level objective (SLO).
Element | Type | Description |
---|---|---|
burnRateMetricKey | string | The error budget burn rate key for a metric expression. |
errorBudgetMetricKey | string | The error budget key for a metric expression. |
normalizedErrorBudgetMetricKey | string | The normalized error budget key for a metric expression. |
number | DEPRECATED The numerator value used to evaluate the SLO when useRateMetric is set to | |
number | DEPRECATED The denominator value used to evaluate the SLO when useRateMetric is set to | |
metricExpression | string | The percentage-based metric expression for the calculation of the SLO. |
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. | |
string | DEPRECATED The percentage-based metric for the calculation of the SLO. Required when the useRateMetric is set to | |
string | DEPRECATED The metric for the count of successes (the numerator in rate calculation). Required when the useRateMetric is set to | |
string | DEPRECATED The total count metric (the denominator in rate calculation). Required when the useRateMetric is set to | |
evaluationType | string | The evaluation type of the SLO. |
errorBudgetBurnRate | Slo | Error budget burn rate evaluation of a service-level objective (SLO). |
evaluatedPercentage | number | The calculated value of the SLO. Has the value of the evaluated SLO or the value of
|
errorBudget | number | 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. |
relatedOpenProblems | integer | Number of OPEN problems related to the SLO. Has the value of |
relatedTotalProblems | integer | Total number of problems related to the SLO. Has the value of |
string[] | 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. | |
metricKey | string | The key for a metric expression. Once created, metric keys can't be changed |
timeframe | string | The timeframe for the SLO evaluation. Use the syntax of the global timeframe selector. |
filter | string | The entity filter for the SLO evaluation. Use the syntax of entity selector. |
name | string | The name of the SLO. |
id | string | The ID of the SLO |
target | number | The target value of the SLO. |
description | string | A short description of the SLO. |
enabled | boolean | The SLO is enabled ( |
status | string | The status of the calculated SLO. |
error | string | The error of the SLO calculation. If the value differs from |
warning | number | 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).
Element | Type | Description |
---|---|---|
burnRateVisualizationEnabled | boolean | The error budget burn rate visualization is enabled ( In case of |
fastBurnThreshold | number | The threshold between a slow and a fast burn rate. |
burnRateType | string | The calculated burn rate type. Has a value of 'FAST', 'SLOW' or 'NONE'. |
burnRateValue | number | The burn rate of the SLO, calculated for the last hour. |
sloValue | number | The calculated value of the SLO for the timeframe chosen for the burn rate calculation. |
estimatedTimeToConsumeErrorBudget | number | The estimated time left to consume the error budget in hours. |
Response body JSON model
{
"burnRateMetricKey": "func:slo.errorBudgetBurnRate.payment_service_availability",
"errorBudgetMetricKey": "func:slo.errorBudget.payment_service_availability",
"normalizedErrorBudgetMetricKey": "func:slo.normalizedErrorBudget.payment_service_availability",
"numeratorValue": 80,
"denominatorValue": 90,
"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",
"errorBudgetBurnRate": {
"burnRateVisualizationEnabled": true,
"fastBurnThreshold": 1.5,
"burnRateType": "SLOW",
"burnRateValue": 1.25,
"sloValue": 95,
"estimatedTimeToConsumeErrorBudget": 24
},
"evaluatedPercentage": 96.25,
"errorBudget": 1.25,
"relatedOpenProblems": 1,
"relatedTotalProblems": 1,
"problemFilters": "[type(\"SERVICE\")]",
"metricKey": "func:slo.payment_service_availability",
"timeframe": "-1d",
"filter": "type(\"SERVICE\")",
"name": "Payment service availability",
"id": "123e4567-e89b-42d3-a456-556642440000",
"target": 95,
"description": "Rate of successful payments per week",
"enabled": true,
"status": "WARNING",
"error": "NONE",
"warning": 97.5
}