v1

latestOpenAPI 3.0.02026-07-142351,1971.3 MB
Service Level Objectives

Get all SLOs

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

get/api/v1/slo

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
    }
  ]
}