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": {
"name": "Example Slo Name",
"targetThresholdPercentage": 99.999,
"id": "b11919d5-ef85-4bb1-8655-02640dbe94d9",
"description": "A brief description of my SLO",
"creator": "[email protected]",
"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",
"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
}
}
}No description available
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": {
"name": "Example Slo Name",
"targetThresholdPercentage": 99.999,
"id": "b11919d5-ef85-4bb1-8655-02640dbe94d9",
"description": "A brief description of my SLO",
"creator": "[email protected]",
"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",
"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
}
}
}API key authentication
A successful response.
Response containing the details of a specific SLO.
Definition of an SLO
Show child attributes
"Example Slo Name"
99.999
"b11919d5-ef85-4bb1-8655-02640dbe94d9"
"A brief description of my SLO"
SLO_TIME_FRAME_UNSPECIFIED, SLO_TIME_FRAME_7_DAYS, SLO_TIME_FRAME_14_DAYS, SLO_TIME_FRAME_21_DAYS, SLO_TIME_FRAME_28_DAYS Definition of a request-based SLI based on metrics
Show child attributes
Definition of a window-based SLI based on metrics
Show child attributes
WINDOW_SLO_WINDOW_UNSPECIFIED, WINDOW_SLO_WINDOW_1_MINUTE, WINDOW_SLO_WINDOW_5_MINUTES COMPARISON_OPERATOR_UNSPECIFIED, COMPARISON_OPERATOR_GREATER_THAN, COMPARISON_OPERATOR_GREATER_THAN_OR_EQUALS, COMPARISON_OPERATOR_LESS_THAN, COMPARISON_OPERATOR_LESS_THAN_OR_EQUALS 0.95
Was this page helpful?