Authorizations
API key authentication
Body
application/json
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/incidents:listIncidentAggregations';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"filter":{"applicationName":["string"],"assignee":["string"],"contextualLabels":[{"key":"string","value":{"contextualLabelValues":["string"]}}],"createdAtRange":{"endTime":"2019-08-24T14:15:22Z","startTime":"2019-08-24T14:15:22Z"},"displayLabels":[{"key":"string","value":{"displayLabelValues":["string"]}}],"endTime":"2019-08-24T14:15:22Z","incidentDurationRange":{"endTime":"2019-08-24T14:15:22Z","startTime":"2019-08-24T14:15:22Z"},"isMuted":true,"metaLabels":[{"key":"key","value":"value"}],"metaLabelsOp":"FILTER_OPERATOR_OR_OR_UNSPECIFIED","searchQuery":{"incidentField":"INCIDENTS_FIELDS_UNSPECIFIED","query":"error"},"severity":["INCIDENT_SEVERITY_UNSPECIFIED"],"startTime":"2019-08-24T14:15:22Z","state":["INCIDENT_STATE_UNSPECIFIED"],"status":["INCIDENT_STATUS_UNSPECIFIED"],"subsystemName":["string"]},"groupBys":[{"incidentField":"INCIDENTS_FIELDS_UNSPECIFIED","orderByDirection":"ORDER_BY_DIRECTION_UNSPECIFIED"}],"pagination":{"pageSize":10,"pageToken":"next_page_token"}}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));{
"incidentAggs": [
{
"aggAssignmentsCount": [
{
"assignedTo": {
"userId": "user_id"
},
"count": 10
}
],
"aggMetaLabelsCount": [
{
"count": 10,
"metaLabel": {
"key": "key",
"value": "value"
}
}
],
"aggSeverityCount": [
{
"count": 10,
"severity": "INCIDENT_SEVERITY_UNSPECIFIED"
}
],
"aggStateCount": [
{
"count": 10,
"state": "INCIDENT_STATE_UNSPECIFIED"
}
],
"aggStatusCount": [
{
"count": 10,
"status": "INCIDENT_STATUS_UNSPECIFIED"
}
],
"allValuesCount": 123,
"firstCreatedAt": "2023-11-07T05:31:56Z",
"groupBysValue": [
{
"incidentField": {
"id": "<string>"
}
}
],
"lastClosedAt": "2023-11-07T05:31:56Z",
"lastStateUpdateTime": "2023-11-07T05:31:56Z",
"listIncidentsId": [
"<string>"
]
}
],
"pagination": {
"nextPageToken": "next_page_token",
"totalSize": 100
}
}Retrieve aggregated incident data with support for grouping and filtering.
Requires the following permissions:
incidents:readconst fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/incidents:listIncidentAggregations';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"filter":{"applicationName":["string"],"assignee":["string"],"contextualLabels":[{"key":"string","value":{"contextualLabelValues":["string"]}}],"createdAtRange":{"endTime":"2019-08-24T14:15:22Z","startTime":"2019-08-24T14:15:22Z"},"displayLabels":[{"key":"string","value":{"displayLabelValues":["string"]}}],"endTime":"2019-08-24T14:15:22Z","incidentDurationRange":{"endTime":"2019-08-24T14:15:22Z","startTime":"2019-08-24T14:15:22Z"},"isMuted":true,"metaLabels":[{"key":"key","value":"value"}],"metaLabelsOp":"FILTER_OPERATOR_OR_OR_UNSPECIFIED","searchQuery":{"incidentField":"INCIDENTS_FIELDS_UNSPECIFIED","query":"error"},"severity":["INCIDENT_SEVERITY_UNSPECIFIED"],"startTime":"2019-08-24T14:15:22Z","state":["INCIDENT_STATE_UNSPECIFIED"],"status":["INCIDENT_STATUS_UNSPECIFIED"],"subsystemName":["string"]},"groupBys":[{"incidentField":"INCIDENTS_FIELDS_UNSPECIFIED","orderByDirection":"ORDER_BY_DIRECTION_UNSPECIFIED"}],"pagination":{"pageSize":10,"pageToken":"next_page_token"}}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));{
"incidentAggs": [
{
"aggAssignmentsCount": [
{
"assignedTo": {
"userId": "user_id"
},
"count": 10
}
],
"aggMetaLabelsCount": [
{
"count": 10,
"metaLabel": {
"key": "key",
"value": "value"
}
}
],
"aggSeverityCount": [
{
"count": 10,
"severity": "INCIDENT_SEVERITY_UNSPECIFIED"
}
],
"aggStateCount": [
{
"count": 10,
"state": "INCIDENT_STATE_UNSPECIFIED"
}
],
"aggStatusCount": [
{
"count": 10,
"status": "INCIDENT_STATUS_UNSPECIFIED"
}
],
"allValuesCount": 123,
"firstCreatedAt": "2023-11-07T05:31:56Z",
"groupBysValue": [
{
"incidentField": {
"id": "<string>"
}
}
],
"lastClosedAt": "2023-11-07T05:31:56Z",
"lastStateUpdateTime": "2023-11-07T05:31:56Z",
"listIncidentsId": [
"<string>"
]
}
],
"pagination": {
"nextPageToken": "next_page_token",
"totalSize": 100
}
}API key authentication
Request to get aggregated incident data with filtering and grouping options
Filter configuration for incidents
Show child attributes
Show child attributes
Pagination parameters for list requests
Show child attributes
Was this page helpful?