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

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

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

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "matchingResponses": [
    {
      "createSloResponse": {
        "slo": {
          "createTime": "2023-11-07T05:31:56Z",
          "creator": "test@domain.com",
          "description": "A brief description of my SLO",
          "grouping": {
            "labels": [
              "<any>"
            ]
          },
          "id": "b11919d5-ef85-4bb1-8655-02640dbe94d9",
          "labels": [
            {
              "key": "<any>",
              "value": "<any>"
            }
          ],
          "name": "Example Slo Name",
          "requestBasedMetricSli": {
            "goodEvents": {
              "query": "<any>"
            },
            "totalEvents": {
              "query": "<any>"
            }
          },
          "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"
        }
      }
    }
  ],
  "status": {
    "details": [
      {
        "key": "<string>",
        "value": "<string>"
      }
    ],
    "message": "<string>",
    "statusCode": "OK"
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Response

Response containing the results of batch executed SLO operations.

matchingResponses
SloExecutionResponse · object[]
required
  • SloExecutionResponse
  • SloExecutionResponse
  • SloExecutionResponse
status
object

Status of the response, including error code and message.

I