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:

  1. Set the timeFrame parameter to GTF.
  2. Provide the timeframe in from and to parameters.

The request produces an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/v2/slo
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/slo

Authentication

To execute this request, you need the Read SLO (slo.read) permission assigned to your API token. 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 100.

If not set, 10 is used.

query optional
from string

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2019-12-21T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A 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: minutes
  • h: hours
  • d: days
  • w: weeks
  • M: months
  • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

query optional
to string

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2019-12-21T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A 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: minutes
  • h: hours
  • d: days
  • w: weeks
  • M: months
  • y: years

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.

Use the entity selector syntax.

query optional
sort string

The sorting of SLO entries:

  • name: Names in ascending order.
  • -name: Names in descending order.

If not set, the ascending order is used.

query optional
demo boolean

Get your SLOs (false) or a set of demo SLOs (true).

query optional
timeFrame string

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.

query optional
evaluate boolean

Get your SLOs without them being evaluated (false) or with evaluations (true).

query optional

Response

Response codes

Code Description
200

Success. The response contains the parameters and calculated values of the requested SLO.

400

Failed. The input is invalid.

Response body

The SloList object

A list of SLOs.

Element Type Description
SLOs Slo[]

A list of SLOs.

nextPageKeys object

The cursor for the next page of results. Has the value of null on the last page.

Use it in the nextPageKey query parameter to obtain subsequent pages of the result.

nextPageKey string

The cursor for the next page of results. Has the value of null on the last page.

Use it in the nextPageKey query parameter to obtain subsequent pages of the result.

pageSize integer

The number of entries per page.

totalCount integer

The total number of entries in the result.

The Slo object

Parameters of a service-level objective (SLO).

Element Type Description
evaluatedPercentage number

The calculated value of the SLO.

Has the value of -1 if there's an error with SLO calculation; in that case check the value of the error parameter.

numeratorValue number

The numerator value used to evaluate the SLO when useRateMetric is set to false.

denominatorValue number

The denominator value used to evaluate the SLO when useRateMetric is set to false.

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.

useRateMetric boolean

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.

metricRate string

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

Required when the useRateMetric is set to true.

metricNumerator string

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

Required when the useRateMetric is set to false.

metricDenominator string

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

Required when the useRateMetric is set to false.

evaluationType string

The evaluation type of the SLO.

timeframe string

The timeframe for the SLO evaluation. Use the syntax of the global timeframe 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.

filter string

The entity filter for the SLO evaluation. Use the syntax of entity selector.

enabled boolean

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

status string

The status of the calculated SLO.

error string

The error of the SLO calculation.

If the value differs from NONE there's something wrong with the SLO calculation.

warning number

The warning value of the SLO.

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