Undo Clear Incident
Undo the Clear Incident action before the incident is put into incident history. Note that you can't undo clear action of incidents that have been removed from the list of active incidents.
Note that this doesn't undo the remove action. You can choose to undo only the clear action and still keep the remove flag.
Request
HTTP Request
Path parameters
Parameter | Type | Description |
---|---|---|
id | Stringrequired |
The ID of an incident. |
Request body
The request body is empty.
Response
The response body is empty.
When you undo the clear action, the incident reverts to its state before it has been marked for clearing. This state is stored in the incident's lastState
field.
Example
Request
let login = <...>
let password = <...>
let incidentId = <...>
let saymonHostname = <...>
let path = "/node/api/incidents/" + incidentId + "/undo-clear";
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 incidentId = <...>
let saymonHostname = <...>
let path = "/node/api/incidents/" + incidentId + "/undo-clear";
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();