const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/slo/slos:batchGet?ids=SOME_ARRAY_VALUE';
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));
{
"slos": [
{
"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
}
}
],
"notFoundIds": [
"<string>"
]
}
No description available
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/slo/slos:batchGet?ids=SOME_ARRAY_VALUE';
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));
{
"slos": [
{
"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
}
}
],
"notFoundIds": [
"<string>"
]
}
API key authentication
A successful response.
Response containing a batch of SLOs and any IDs not found.
Was this page helpful?