Remove incident user assignments
curl --request DELETE \
--url https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user \
--header 'Authorization: <api-key>'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user', 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/by-user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
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",
"incidentEventType": "INCIDENT_EVENT_TYPE_ACKNOWLEDGE",
"originatorType": "ORIGINATOR_TYPE_OPERATIONAL",
"snoozeIndicator": {
"durationMinutes": 262980,
"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>"
},
"stateType": "UPSERT_INCIDENT_STATE_TYPE_UNSPECIFIED",
"isMuted": true
}
}
],
"id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"lastStateUpdateKey": "last_state_update_key",
"lastStateUpdateTime": "2024-01-01T00:00:00.000Z",
"severity": "INCIDENT_SEVERITY_UNSPECIFIED",
"state": "INCIDENT_STATE_UNSPECIFIED",
"status": "INCIDENT_STATUS_UNSPECIFIED",
"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
Remove incident user assignments
Remove user assignments from one or more incidents.
Requires the following permissions:
incidents:assign
Remove incident user assignments
curl --request DELETE \
--url https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user \
--header 'Authorization: <api-key>'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user', 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/by-user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/incidents/incidents/v1/all/by-user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
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",
"incidentEventType": "INCIDENT_EVENT_TYPE_ACKNOWLEDGE",
"originatorType": "ORIGINATOR_TYPE_OPERATIONAL",
"snoozeIndicator": {
"durationMinutes": 262980,
"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>"
},
"stateType": "UPSERT_INCIDENT_STATE_TYPE_UNSPECIFIED",
"isMuted": true
}
}
],
"id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"lastStateUpdateKey": "last_state_update_key",
"lastStateUpdateTime": "2024-01-01T00:00:00.000Z",
"severity": "INCIDENT_SEVERITY_UNSPECIFIED",
"state": "INCIDENT_STATE_UNSPECIFIED",
"status": "INCIDENT_STATUS_UNSPECIFIED",
"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
Query Parameters
List of incident IDs to unassign
Required array length:
1 - 10000 elementsList of incident IDs to unassign
Required string length:
36Pattern:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Example:
[
"3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"9c858901-8a57-4791-81fe-4c455b099bc9"
]
Response
Response containing the updated incidents after unassignment
List of incidents after unassignment
Maximum array length:
10000Show child attributes
Show child attributes
Was this page helpful?