Delete Event Log Record

DELETE /node/api/event-log/:id

Deletes an event log record.
Permissions: manage-event-log.

Request parameters

Path parameters

Parameter
Type
Description
id
string
required
The ID of an event log record to be deleted.

Response description

The response body is empty.

Examples

Bash
JavaScript
NodeJS
Python
1
login=<...>
2
password=<...>
3
saymon_hostname=<...>
4
record_id=<...>
5
url=https://$saymon_hostname/node/api/event-log/$record_id
6
7
curl -X DELETE $url -u $login:$password
Copied!
1
let login = <...>
2
let password = <...>
3
let saymonHostname = <...>
4
let recordId = <...>
5
let path = "/node/api/event-log/" + recordId;
6
let auth = "Basic " + btoa(login + ":" + password);
7
8
let headers = new Headers();
9
headers.append("Authorization", auth);
10
11
let requestOptions = {
12
method: "DELETE",
13
headers: headers,
14
body: data
15
};
16
17
fetch(saymonHostname + path, requestOptions)
18
.then(response => response.text())
19
.then(result => console.log(result))
20
.catch(error => console.log("error", error));
Copied!
1
const http = require("http");
2
3
let login = <...>
4
let password = <...>
5
let saymonHostname = <...>
6
let recordId = <...>
7
let path = "/node/api/event-log/" + recordId;
8
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
9
10
let options = {
11
"method": "DELETE",
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
record_id = <...>
7
url = "https://" + saymon_hostname + "/node/api/event-log/" + \
8
record_id
9
10
response = requests.request("DELETE", url, auth=(login, password))
11
print(response.text)
Copied!