Resolve alert
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | — |
Request
Content type: application/json · required
| Field | Type | Required | Description |
|---|---|---|---|
disposition |
string | Yes | — |
rationale |
string | Yes | — |
approved_by |
string | No | Required for high/critical false_positive; must differ from the acting principal (self-approval is void) |
curl -X POST "$MONICHEK_API/alerts/{id}:resolve" \
-H "Authorization: Bearer $MONICHEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"disposition": "string",
"rationale": "string",
"approved_by": "string"
}'const res = await fetch(`${MONICHEK_API}/alerts/{id}:resolve`, {
method: "POST",
headers: {
Authorization: `Bearer ${MONICHEK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"disposition": "string",
"rationale": "string",
"approved_by": "string"
}),
});
const data = await res.json();import os
import requests
res = requests.post(
f"{os.environ['MONICHEK_API']}/alerts/{id}:resolve",
headers={"Authorization": f"Bearer {os.environ['MONICHEK_API_KEY']}"},
json={
"disposition": "string",
"rationale": "string",
"approved_by": "string"
},
)
print(res.json())$ch = curl_init(getenv('MONICHEK_API') . '/alerts/{id}:resolve');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('MONICHEK_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'disposition' => 'string',
'rationale' => 'string',
'approved_by' => 'string',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Replace {id} with the resource id.
Responses
200 OK
resolved
application/json
{
"object": "resolved",
"id": "alt_01M3R...",
"disposition": "false_positive"
}Error responses
| Status | Meaning | Body |
|---|---|---|
| 409 | Conflict | RFC 9457 problem |
Errors use the RFC 9457 problem format with a stable code.