Get Incidents History

GET /node/api/incident-history

Returns an array of incidents history records available to a current user.

Request parameters

Query parameters

Parameter
Type
Description
limit
integer
optional
The maximum number of records to be retrieved.
ownerFilter
string
optional
A filter used for owner data [?].
skip
integer
optional
The number of the first records to be skipped.
sortDirection
string
optional
The sorting direction. Possible values are asc and desc which corresponds to ascending and descending directions accordingly.
sortField
string
optional
The name of a field used to sort history records.

Response description

...

Examples

Request examples

Bash
JavaScript
NodeJS
Python
1
login=<...>
2
password=<...>
3
saymon_hostname=<...>
4
url=https://$saymon_hostname/node/api/incident-history
5
6
curl -X GET $url -u $login:$password \
7
-G --data-urlencode "limit=2"
Copied!
1
let login = <...>
2
let password = <...>
3
let saymonHostname = <...>
4
let queryParams = "limit=2";
5
let path = "/node/api/incident-history" + "?" + queryParams;
6
let auth = "Basic " + btoa(login + ":" + password);
7
8
let headers = new Headers();
9
headers.append("Authorization", auth);
10
11
let requestOptions = {
12
method: "GET",
13
headers: headers
14
};
15
16
fetch(saymonHostname + path, requestOptions)
17
.then(response => response.text())
18
.then(result => console.log(result))
19
.catch(error => console.log("error", error));
Copied!
1
const http = require("http");
2
3
let login = <...>
4
let password = <...>
5
let saymonHostname = <...>
6
let queryParams = "limit=2";
7
let path = "/node/api/incident-history" + "?" + queryParams;
8
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
9
10
let options = {
11
"method": "GET",
12
"hostname": saymonHostname,
13
"headers": {
14
"Authorization": auth
15
},
16
"path": path
17
};
18
19
let req = http.request(options, function (res) {
20
let chunks = [];
21
22
res.on("data", function (chunk) {
23
chunks.push(chunk);
24
});
25
26
res.on("end", function (chunk) {
27
let body = Buffer.concat(chunks);
28
console.log(body.toString());
29
});
30
31
res.on("error", function (error) {
32
console.error(error);
33
});
34
});
35
36
req.end();
Copied!
1
import requests
2
3
login = <...>
4
password = <...>
5
saymon_hostname = <...>
6
url = "https://" + saymon_hostname + "/node/api/incident-history"
7
8
params = {
9
"limit": 2
10
}
11
12
response = requests.request("GET", url, auth=(login, password), params=params)
13
print(response.text)
Copied!

Response example

1
[
2
{
3
"entityId": "5e21b85b308c3c66d64e07d2",
4
"entityType": 1,
5
"type": 1,
6
"parentChainId": "5e21b85b308c3c66d64e07d2",
7
"data": "...",
8
"text": "No data",
9
"localTimestamp": 1579614817826,
10
"timestamp": 1579614817826,
11
"clearTimestamp": 1579614894499,
12
"id": "5e270329f5d0b555d592e938"
13
},
14
{
15
"entityId": "5e21b85b308c3c66d64e07df",
16
"entityType": 1,
17
"type": 1,
18
"parentChainId": "5e21b85b308c3c66d64e07df",
19
"data": "...",
20
"text": "No data",
21
"localTimestamp": 1579614817887,
22
"timestamp": 1579614817887,
23
"clearTimestamp": 1579614894504,
24
"id": "5e270329f5d0b555d592e939"
25
},
26
...
27
]
Copied!
Last modified 1yr ago