const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/incidents:list-incident-events-total-count';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"filter":{"status":["INCIDENT_STATUS_UNSPECIFIED"],"severity":["INCIDENT_SEVERITY_UNSPECIFIED"],"contextualLabels":{"property1":{"contextualLabelValues":["string"]},"property2":{"contextualLabelValues":["string"]}},"name":"string","isMuted":true,"timestamp":{"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"},"labels":{"metaLabels":[{"key":"key","value":"value"}],"operator":"FILTER_OPERATOR_OR_OR_UNSPECIFIED"}}}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"count": 100,
"reachedLimit": false
}
Retrieve the total count of incident events matching a filter.
Requires the following permissions:
incidents:read
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/incidents:list-incident-events-total-count';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"filter":{"status":["INCIDENT_STATUS_UNSPECIFIED"],"severity":["INCIDENT_SEVERITY_UNSPECIFIED"],"contextualLabels":{"property1":{"contextualLabelValues":["string"]},"property2":{"contextualLabelValues":["string"]}},"name":"string","isMuted":true,"timestamp":{"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"},"labels":{"metaLabels":[{"key":"key","value":"value"}],"operator":"FILTER_OPERATOR_OR_OR_UNSPECIFIED"}}}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"count": 100,
"reachedLimit": false
}
API key authentication
A request to get the total count of incident events matching a filter
A successful response.
A response containing the total count of matching incident events and whether the count limit was reached
Was this page helpful?