Get All Incidents

GET /node/api/incidents

Returns a list of all incidents available to a current user.

Request parameters

Query parameters

Parameter
Type
Description
filter
string
optional
A JSON-encoded filter for incidents records.
limit
integer
optional
The maximum number of records to be outputted.
owner
boolean
optional
Whether to include information about an owner. If set to true, such information for each record will be provided.
skip
integer optional
The number of the first records to be skipped.
sortDirection
string
optional
A sorting direction. asc for ascending order, desc for descending.
sortField
string
optional
The name of a field to sort by.
ownerFilter
string
optional
Additional filter for owner's data [?].

Response description

...

Examples

Request examples

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

Response example

1
[
2
{
3
"id": "58f9fe155be7187c551f1c5f",
4
"entityId": 10,
5
"entityType": 1,
6
"type": 1,
7
"state": 1,
8
"localTimestamp": 0,
9
"data": "{...}",
10
"timestamp": 1493884332909,
11
"text": "No data"
12
},
13
...
14
]
Copied!