Resolve incidents
curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"incidentIds": [
"incident_id_1",
"incident_id_2"
]
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve"
payload = { "incidentIds": ["incident_id_1", "incident_id_2"] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({incidentIds: ['incident_id_1', 'incident_id_2']})
};
fetch('https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'incidentIds' => [
'incident_id_1',
'incident_id_2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve"
payload := strings.NewReader("{\n \"incidentIds\": [\n \"incident_id_1\",\n \"incident_id_2\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"incidentIds\": [\n \"incident_id_1\",\n \"incident_id_2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"incidentIds\": [\n \"incident_id_1\",\n \"incident_id_2\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"incidents": [
{
"assignments": [
{
"assignedBy": {
"userId": "user_id"
},
"assignedTo": {
"userId": "user_id"
}
}
],
"contextualLabels": {},
"createdAt": "2024-01-01T00:00:00.000Z",
"displayLabels": {},
"duration": "<string>",
"events": [
{
"administrativeEvent": {
"userId": "<string>"
},
"id": "incident_event_id",
"snoozeIndicator": {
"durationMinutes": 123,
"startTime": "2023-11-07T05:31:56Z",
"userId": "<string>"
},
"acknowledge": {
"acknowledgedBy": {
"userId": "user_id"
}
},
"assignment": {
"assignment": {
"assignedBy": {
"userId": "user_id"
},
"assignedTo": {
"userId": "user_id"
}
}
},
"close": {
"closedBy": {
"userId": "user_id"
}
},
"operationalEvent": {
"systemName": "<string>"
},
"unassign": {},
"upsertState": {
"payload": {
"cxEventKey": "<string>"
},
"isMuted": true
}
}
],
"id": "incident_id",
"lastStateUpdateKey": "last_state_update_key",
"lastStateUpdateTime": "2024-01-01T00:00:00.000Z",
"closedAt": "2024-01-01T00:00:00.000Z",
"description": "incident_description",
"isMuted": false,
"metaLabels": [
{
"key": "key",
"value": "value"
}
],
"name": "incident_name"
}
]
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}Incidents Service
Resolve incidents
Mark one or more incidents as resolved.
Requires the following permissions:
incidents:close
Resolve incidents
curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"incidentIds": [
"incident_id_1",
"incident_id_2"
]
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve"
payload = { "incidentIds": ["incident_id_1", "incident_id_2"] }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({incidentIds: ['incident_id_1', 'incident_id_2']})
};
fetch('https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'incidentIds' => [
'incident_id_1',
'incident_id_2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve"
payload := strings.NewReader("{\n \"incidentIds\": [\n \"incident_id_1\",\n \"incident_id_2\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"incidentIds\": [\n \"incident_id_1\",\n \"incident_id_2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"incidentIds\": [\n \"incident_id_1\",\n \"incident_id_2\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"incidents": [
{
"assignments": [
{
"assignedBy": {
"userId": "user_id"
},
"assignedTo": {
"userId": "user_id"
}
}
],
"contextualLabels": {},
"createdAt": "2024-01-01T00:00:00.000Z",
"displayLabels": {},
"duration": "<string>",
"events": [
{
"administrativeEvent": {
"userId": "<string>"
},
"id": "incident_event_id",
"snoozeIndicator": {
"durationMinutes": 123,
"startTime": "2023-11-07T05:31:56Z",
"userId": "<string>"
},
"acknowledge": {
"acknowledgedBy": {
"userId": "user_id"
}
},
"assignment": {
"assignment": {
"assignedBy": {
"userId": "user_id"
},
"assignedTo": {
"userId": "user_id"
}
}
},
"close": {
"closedBy": {
"userId": "user_id"
}
},
"operationalEvent": {
"systemName": "<string>"
},
"unassign": {},
"upsertState": {
"payload": {
"cxEventKey": "<string>"
},
"isMuted": true
}
}
],
"id": "incident_id",
"lastStateUpdateKey": "last_state_update_key",
"lastStateUpdateTime": "2024-01-01T00:00:00.000Z",
"closedAt": "2024-01-01T00:00:00.000Z",
"description": "incident_description",
"isMuted": false,
"metaLabels": [
{
"key": "key",
"value": "value"
}
],
"name": "incident_name"
}
]
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}Authorizations
API key authentication
Body
application/json
Request to resolve one or more incidents
List of incident IDs to resolve
List of incident IDs to resolve
Example:
["incident_id_1", "incident_id_2"]
Response
Response containing the updated incidents after resolution
List of incidents after resolution
Show child attributes
Show child attributes
Was this page helpful?
⌘I