Get Object's Audit Log

GET /node/api/objects/:id/audit-log

Returns object's audit log.

Request parameters

Path parameters

Parameter
Type
Description
id
string
required
The ID or discovery ID of the object whose audit log must be retrieved.

Query parameters

Parameter
Type
Description
from
string
optional
A lower-bound timestamp for audit records.
limit
string
optional
The maximum number of records to be retrieved.
skip
string
optional
The number of the first audit records to be skipped.
to
string
optional
An upper-bound timestamp for audit records.

Response description

...

Examples

Request examples

Bash
JavaScript
NodeJS
Python
1
login=<...>
2
password=<...>
3
object_id=<...>
4
saymon_hostname=<...>
5
url=https://$saymon_hostname/node/api/objects/$object_id/audit-log
6
7
curl -X GET $url -u $login:$password \
8
-G --data-urlencode "limit=5"
Copied!
1
let login = <...>
2
let password = <...>
3
let saymonHostname = <...>
4
let objectId = <...>
5
let queryParams = "limit=3";
6
let path = "/node/api/objects/" + objectId + "/audit-log" + "?" + queryParams;
7
let auth = "Basic " + btoa(login + ":" + password);
8
9
let headers = new Headers();
10
headers.append("Authorization", auth);
11
12
let requestOptions = {
13
method: "GET",
14
headers: headers
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 objectId = <...>
7
let path = "/node/api/objects/" + objectId + "/audit-log";
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
object_id = <...>
7
url = "https://" + saymon_hostname + "/node/api/objects/" + \
8
object_id + "/audit-log"
9
10
response = requests.request("GET", url, auth=(login, password))
11
print(response.text)
Copied!

Response example

1
[
2
{
3
"entityType": 1,
4
"entityId": "5e21b85b308c3c66d64e07df",
5
"newBody": [
6
{
7
"description": "",
8
"state": 4,
9
"condition": {
10
"_and": [
11
{
12
"memoryType": {
13
"_m": "mem"
14
}
15
},
16
{
17
"percentUsed": {
18
"_gt": "90"
19
}
20
}
21
]
22
}
23
}
24
],
25
"oldBody": null,
26
"userId": "5e21b752308c3c66d64e072c",
27
"kind": 6,
28
"timestamp": 1582014157369
29
},
30
...
31
]
Copied!