Skip to main content
node
const fetch = require('node-fetch');

let url = 'https://api.coralogix.com/mgmt/openapi/v1/slo/slos:batchGet';

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));
{
  "notFoundIds": [
    "<string>"
  ],
  "slos": [
    {
      "createTime": "2023-11-07T05:31:56Z",
      "creator": "test@domain.com",
      "description": "A brief description of my SLO",
      "grouping": {
        "labels": [
          "<string>"
        ]
      },
      "id": "b11919d5-ef85-4bb1-8655-02640dbe94d9",
      "labels": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ],
      "name": "Example Slo Name",
      "requestBasedMetricSli": {
        "goodEvents": {
          "query": "sum(rate(http_requests_total{status=\"200\"}[5m]))"
        },
        "totalEvents": {
          "query": "sum(rate(http_requests_total{status=\"200\"}[5m]))"
        }
      },
      "revision": {
        "revision": 1,
        "updateTime": "2023-11-07T05:31:56Z"
      },
      "sloTimeFrame": "SLO_TIME_FRAME_UNSPECIFIED",
      "targetThresholdPercentage": 99.999,
      "type": "request",
      "updateTime": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication

Response

Response containing a batch of SLOs and any IDs not found.

slos
Slo · object[]
required
  • Slo
  • Slo
notFoundIds
string[]
I