Authorizations
API key authentication
Body
application/json
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/incidents';
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"]},"orderBys":[{"direction":"ORDER_BY_DIRECTION_UNSPECIFIED","incidentField":"INCIDENTS_FIELDS_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));{
"incidents": [
{
"assignments": [
{
"assignedBy": {
"userId": "<any>"
},
"assignedTo": {
"userId": "<any>"
}
}
],
"closedAt": "2024-01-01T00:00:00.000Z",
"contextualLabels": [
{
"key": "<string>",
"value": "<string>"
}
],
"createdAt": "2024-01-01T00:00:00.000Z",
"description": "incident_description",
"displayLabels": [
{
"key": "<string>",
"value": "<string>"
}
],
"duration": "<string>",
"events": [
{
"administrativeEvent": {
"userId": "<string>"
},
"id": "incident_event_id",
"incidentEventType": "INCIDENT_EVENT_TYPE_UNSPECIFIED",
"originatorType": "ORIGINATOR_TYPE_UNSPECIFIED",
"snoozeIndicator": {
"durationMinutes": 123,
"startTime": "2023-11-07T05:31:56Z",
"userId": "<string>"
}
}
],
"id": "incident_id",
"isMuted": false,
"lastStateUpdateKey": "last_state_update_key",
"lastStateUpdateTime": "2024-01-01T00:00:00.000Z",
"metaLabels": [
{
"key": "key",
"value": "value"
}
],
"name": "incident_name",
"severity": "INCIDENT_SEVERITY_UNSPECIFIED",
"state": "INCIDENT_STATE_UNSPECIFIED",
"status": "INCIDENT_STATUS_UNSPECIFIED"
}
],
"pagination": {
"nextPageToken": "next_page_token",
"totalSize": 100
}
}Lists all available incidents based on specified filters and order. The list is ordered in an unspecified direction and sorted by creation time.
Requires the following permissions:
incidents:readconst fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/incidents';
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"]},"orderBys":[{"direction":"ORDER_BY_DIRECTION_UNSPECIFIED","incidentField":"INCIDENTS_FIELDS_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));{
"incidents": [
{
"assignments": [
{
"assignedBy": {
"userId": "<any>"
},
"assignedTo": {
"userId": "<any>"
}
}
],
"closedAt": "2024-01-01T00:00:00.000Z",
"contextualLabels": [
{
"key": "<string>",
"value": "<string>"
}
],
"createdAt": "2024-01-01T00:00:00.000Z",
"description": "incident_description",
"displayLabels": [
{
"key": "<string>",
"value": "<string>"
}
],
"duration": "<string>",
"events": [
{
"administrativeEvent": {
"userId": "<string>"
},
"id": "incident_event_id",
"incidentEventType": "INCIDENT_EVENT_TYPE_UNSPECIFIED",
"originatorType": "ORIGINATOR_TYPE_UNSPECIFIED",
"snoozeIndicator": {
"durationMinutes": 123,
"startTime": "2023-11-07T05:31:56Z",
"userId": "<string>"
}
}
],
"id": "incident_id",
"isMuted": false,
"lastStateUpdateKey": "last_state_update_key",
"lastStateUpdateTime": "2024-01-01T00:00:00.000Z",
"metaLabels": [
{
"key": "key",
"value": "value"
}
],
"name": "incident_name",
"severity": "INCIDENT_SEVERITY_UNSPECIFIED",
"state": "INCIDENT_STATE_UNSPECIFIED",
"status": "INCIDENT_STATUS_UNSPECIFIED"
}
],
"pagination": {
"nextPageToken": "next_page_token",
"totalSize": 100
}
}API key authentication
Request to list incidents with filtering, pagination and ordering options
Filter configuration for incidents
Show child attributes
Show child attributes
Pagination parameters for list requests
Show child attributes
Was this page helpful?