Generate CSV Report of Incidents History

GET /node/api/reports/incident-history/csv

Generates a CSV report of an incident history.
Permissions: objectPermissions.

Request parameters

No parameters required.

Response description

The response body is an array of incidents history records in the CSV format.

Examples

Request examples

Bash
NodeJS
Python
1
login=<...>
2
password=<...>
3
saymon_hostname=<...>
4
url=https://$saymon_hostname/node/api/reports/incident-history/csv
5
6
curl -X GET $url -u $login:$password
Copied!
1
const request = require("request");
2
3
let login = <...>
4
let password = <...>
5
let saymonHostname = <...>
6
let url = "https://" + saymonHostname + "/node/api/reports/incident-history/csv";
7
8
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
9
10
let options = {
11
method: "GET",
12
url: url,
13
headers: {
14
Authorization: auth
15
}
16
};
17
18
request(options, function (error, response, body) {
19
if (error) throw new Error(error);
20
console.log(body);
21
});
Copied!
1
import requests
2
3
login = <...>
4
password = <...>
5
saymon_hostname = <...>
6
url = "https://" + saymon_hostname + "/node/api/reports/incident-history/csv"
7
8
response = requests.request("GET", url, auth=(login, password))
9
print(response.text)
Copied!

Response example

1
Registered Time,Occurred Time,Clear Time,Object/Link,Text
2
01/21/2020, 04:53:37 PM,01/21/2020, 04:53:37 PM,01/21/2020, 04:54:54 PM,"CPU","Down"
3
01/21/2020, 04:53:37 PM,01/21/2020, 04:53:37 PM,01/21/2020, 04:54:54 PM,"Memory","Down"
Copied!
Last modified 1yr ago