Service Level Objectives

Get all SLOs

Get a list of service level objective objects for your organization.

get/api/v1/slo

Request

  • Base URL
    https://api.datadoghq.com
  • URL
    https://api.datadoghq.com/api/v1/slo
  • Auth
    • API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
    • or OAuth 2
      Authorization code: /oauth2/v1/authorize
      Token URL: /oauth2/v1/token scopes: slos_read

Query parameters

idsstring

A comma separated list of the IDs of the service level objectives objects.

querystring

The query string to filter results based on SLO names.

tags_querystring

The query string to filter results based on a single SLO tag.

metrics_querystring

The query string to filter results based on SLO numerator and denominator.

limitinteger

The number of SLOs to return in the response.

offsetinteger

The specific offset to use as the beginning of the returned response.

Response

OK

errorsstring[]

An array of error messages. Each endpoint documents how/whether this field is used.

Example response

{
  "data": [
    {
      "groups": [
        "env:prod",
        "role:mysql"
      ],
      "name": "Custom Metric SLO",
      "query": {
        "denominator": "sum:my.custom.metric{*}.as_count()",
        "numerator": "sum:my.custom.metric{type:good}.as_count()"
      },
      "sli_specification": {
        "time_slice": {
          "comparator": "<",
          "query": {
            "formulas": [
              {
                "formula": "query2/query1"
              }
            ],
            "queries": [
              {
                "data_source": "metrics",
                "name": "query1",
                "query": "sum:trace.servlet.request.hits{*} by {env}.as_count()"
              },
              {
                "data_source": "metrics",
                "name": "query2",
                "query": "sum:trace.servlet.request.errors{*} by {env}.as_count()"
              }
            ]
          },
          "threshold": 5
        }
      },
      "tags": [
        "env:prod",
        "app:core"
      ],
      "target_threshold": 99.9,
      "thresholds": [
        {
          "target": 95,
          "timeframe": "7d"
        },
        {
          "target": 95,
          "timeframe": "30d",
          "warning": 97
        }
      ],
      "timeframe": "30d",
      "type": "metric",
      "warning_threshold": 99.95
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.