Generate CSV Report of Incidents History
Returns an incident history as a CSV spreadsheet.
Request
Path parameters
Parameter | Type | Description |
---|---|---|
fields |
Array<String> |
The fields that will be included in the report. See the Incident model to see all possible fields. |
filter |
The report filter. See the list of available filters |
Example
Request
-
Bash
-
JavaScript
-
NodeJS
-
Python
login=<...>
password=<...>
saymon_hostname=<...>
url=https://$saymon_hostname/node/api/reports/incident-history/csv
curl -X GET $url -u $login:$password
let login = <...>
let password = <...>
let saymonHostname = <...>
let path = "/node/api/reports/incident-history/csv";
let auth = "Basic " + btoa(login + ":" + password);
let headers = new Headers();
headers.append("Authorization", auth);
let requestOptions = {
method: "GET",
headers: headers
};
fetch(saymonHostname + path, requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log("error", error));
const request = require("request");
let login = <...>
let password = <...>
let saymonHostname = <...>
let url = "https://" + saymonHostname + "/node/api/reports/incident-history/csv";
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
let options = {
method: "GET",
url: url,
headers: {
Authorization: auth
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
login = <...>
password = <...>
saymon_hostname = <...>
url = "https://" + saymon_hostname + "/node/api/reports/incident-history/csv"
response = requests.request("GET", url, auth=(login, password))
print(response.text)