Acknowledge Incident

Acknowledge an incident with the specified ID.

Request

HTTP Request

POST /node/api/incidents/:id/acknowledge

Path parameters

Parameter Type Description

id

String
required

The ID of an incident to be acknowledged.

Request body

The request body is empty.

Response

The response body is empty.

When you acknowledge an incident, the information about this action is added to the incident. This information contains an ID of the user who acknowledged the specified incident (acknowledgedBy) and a timestamp of the acknowledgement (acknowledgementTimestamp).

The example below shows a Get Incident by ID request returning an acknowledged incident.

{
    "id": "636363ca86bfdcde76a733c5",
    "entityId": 816,
    "entityType": 1,
    "type": 1,
    "data": "{"packetsTransmitted":4,"packetsReceived":4,"packetLossPercentile":0,"numberOfErrors":0,"numberOfDuplicates":0,"roundTripMinimal":16.447,"roundTripAverage":16.515,"roundTripMaximum":16.606,"exitCode":0}",
    "lastState": 4,
    "localTimestamp": null,
    "parentChainId": 816,
    "reason": {
        "code": 10,
        "rootCause": {
            "entityId": "59d3572f738ffa4d56b87f32",
            "entityType": 1,
            "entityName": "Info"
        }
    },
    "state": 4,
    "text": "No data",
    "timestamp": 1667457994374,
    "acknowledgedBy": "62c2f3ce80c8654892764d56",
    "acknowledgementTimestamp": 1669288291473
}

Example

Request

  • Bash

  • JavaScript

  • NodeJS

  • Python

login=<...>
password=<...>
saymon_hostname=<...>
incident_id=<...>
url=https://$saymon_hostname/node/api/incidents/$incident_id/acknowledge

curl -X POST $url -u $login:$password
let login = <...>
let password = <...>
let saymonHostname = <...>
let incidentId = <...>
let path = "/node/api/incidents/" + incidentId + "/acknowledge";
let auth = "Basic " + btoa(login + ":" + password);

let headers = new Headers();
headers.append("Authorization", auth);

let requestOptions = {
    method: "POST",
    headers: headers
};

fetch(saymonHostname + path, requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log("error", error));
const http = require("http");

let login = <...>
let password = <...>
let saymonHostname = <...>
let incidentId = <...>
let path = "/node/api/incidents/" + incidentId + "/acknowledge";
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");

let options = {
    "method": "POST",
    "hostname": saymonHostname,
    "headers": {
        "Authorization": auth
    },
    "path": path
};

let req = http.request(options, function (res) {
    let chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        let body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

login = <...>
password = <...>
saymon_hostname = <...>
incident_id = <...>
url = "https://" + saymon_hostname + "/node/api/incidents/" + \
    incident_id + "/acknowledge"

response = requests.request("POST", url, auth=(login, password))
print(response.text)