Service-level objectives API - GET all SLOs
Lists all service-level objectives and their calculated values.
By default the values are calculated for the SLO's own timeframe. You can use a custom timeframe:
- Set the timeFrame parameter to
GTF
. - Provide the timeframe in from and to parameters.
The request produces an application/json
payload.
GET | SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/slo |
Environment ActiveGateCluster ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/slo |
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 |
---|---|---|---|---|
nextPageKey | string | The cursor for the next page of results. You can find it in the nextPageKey field of the previous response. The first page is always returned if you don't specify the nextPageKey query parameter. When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters. | query | optional |
pageSize | integer | The amount of SLOs in a single response payload. The maximal allowed page size is 10000. If not set, 10 is used. | query | optional |
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 |
sloSelector | string | The scope of the query. Only SLOs matching the provided criteria are included in the response. You can add one or several of the criteria listed below.
To set several criteria, separate them with comma (
The special characters | query | optional |
sort | string | The sorting of SLO entries:
If not set, the ascending order is used. | query | optional |
timeFrame | string | The timeframe to calculate the SLO values:
If not set, the
| query | optional |
demo | boolean | Get your SLOs ( | query | optional |
evaluate | string | Get your SLOs without them being evaluated (
| query | optional |
enabledSlos | string | Get your enabled SLOs (
| query | optional |
showGlobalSlos | boolean | Get your global SLOs ( | query | optional |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | S | Success. The response contains the parameters and calculated values of the requested SLO. |
400 | Error | Failed. The input is invalid. |
4XX | Error | Client side error. |
5XX | Error | Server side error. |
Response body objects
The SLOs
object
Contains SLOs and paging information.
Element | Type | Description |
---|---|---|
nextPageKey | string | The cursor for the next page of results. Has the value of Use it in the nextPageKey query parameter to obtain subsequent pages of the result. |
pageSize | integer | The number of entries per page. |
slo | S | The list of SLOs. |
totalCount | integer | The total number of entries in the result. |
The SLO
object
Parameters of a service-level objective (SLO).
Element | Type | Description |
---|---|---|
burnRateMetricKey | string | The key for the SLO's error budget burn rate func metric. |
number | DEPRECATED The denominator value used to evaluate the SLO when useRateMetric is set to | |
description | string | A short description of the SLO. |
enabled | boolean | The SLO is enabled ( |
error | string | The error of the SLO calculation. If the value differs from |
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. Has the value of the evaluated error budget or the value of
|
errorBudgetBurnRate | Slo | Error budget burn rate evaluation of a service-level objective (SLO). |
errorBudgetMetricKey | string | The key for the SLO's error budget func metric. |
evaluatedPercentage | number | The calculated status value of the SLO. Has the value of the evaluated SLO status or the value of
|
evaluationType | string | The evaluation type of the SLO.
|
filter | string | 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. |
id | string | The ID of the SLO |
string | DEPRECATED The total count metric (the denominator in rate calculation). Required when the useRateMetric is set to | |
metricExpression | string | The percentage-based metric expression for the calculation of the SLO. |
metricKey | string | The key for the SLO's status func metric. |
string | DEPRECATED The metric for the count of successes (the numerator in rate calculation). Required when the useRateMetric is set to | |
string | DEPRECATED The percentage-based metric for the calculation of the SLO. Required when the useRateMetric is set to | |
name | string | The name of the SLO. |
normalizedErrorBudgetMetricKey | string | The key for the SLO's normalized error budget func metric. |
number | DEPRECATED The numerator value used to evaluate the SLO when useRateMetric is set to | |
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. | |
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 |
status | string | The status of the calculated SLO.
|
target | number | The target value of the SLO. |
timeframe | string | The timeframe for the SLO evaluation. Use the syntax of the global timeframe selector. |
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. | |
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 |
---|---|---|
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. |
burnRateVisualizationEnabled | boolean | The error budget burn rate calculation is enabled ( In case of |
estimatedTimeToConsumeErrorBudget | number | The estimated time left to consume the error budget in hours. |
fastBurnThreshold | number | The threshold between a slow and a fast burn rate. |
sloValue | number | The calculated value of the SLO for the timeframe chosen for the burn rate calculation. |
Response body JSON model
{"nextPageKey": "AQAAABQBAAAABQ==","pageSize": 1,"slo": [{"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}],"totalCount": 1}