GET
/
v1
/
slo
/
slos
/
{id}
const fetch = require('node-fetch');

let url = 'https://api.coralogix.com/mgmt/openapi/v1/slo/slos/%7Bid%7D';

let options = {method: 'GET', headers: {Authorization: 'Bearer <API_KEY>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "slo": {
    "id": "b11919d5-ef85-4bb1-8655-02640dbe94d9",
    "name": "Example Slo Name",
    "description": "A brief description of my SLO",
    "creator": "test@domain.com",
    "labels": {},
    "revision": {
      "revision": 1,
      "updateTime": "2023-11-07T05:31:56Z"
    },
    "grouping": {
      "labels": [
        "<string>"
      ]
    },
    "createTime": "2023-11-07T05:31:56Z",
    "updateTime": "2023-11-07T05:31:56Z",
    "targetThresholdPercentage": 99.999,
    "sloTimeFrame": "SLO_TIME_FRAME_UNSPECIFIED",
    "requestBasedMetricSli": {
      "goodEvents": {
        "query": "sum(rate(http_requests_total{status=\"200\"}[5m]))"
      },
      "totalEvents": {
        "query": "sum(rate(http_requests_total{status=\"200\"}[5m]))"
      }
    },
    "windowBasedMetricSli": {
      "query": {
        "query": "sum(rate(http_requests_total{status=\"200\"}[5m]))"
      },
      "window": "WINDOW_SLO_WINDOW_UNSPECIFIED",
      "comparisonOperator": "COMPARISON_OPERATOR_UNSPECIFIED",
      "threshold": 0.95
    }
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

Response

200
application/json

A successful response.

Response containing the details of a specific SLO.