Get Link's Audit Log

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

Returns a link's audit log.

Request parameters

Path parameters

Parameter
Type
Description
id
string
required
The ID of a link whose audit log should be retrieved.

Query parameters

Parameter
Type
Description
from
integer
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 records to be skipped.
to
integer
optional
An upper-bound timestamp for audit records.

Response description

...

Examples

Request examples

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

Response example

1
[
2
{
3
"entityType": 2,
4
"entityId": "5e79fddb6ec5ea28e5105f65",
5
"newBody": [
6
{
7
"states": [
8
3,
9
4
10
],
11
"payload": {
12
14
},
15
"type": "e-mail"
16
}
17
],
18
"oldBody": [
19
{
20
"states": [
21
3,
22
4
23
],
24
"payload": {
25
"cc": "",
27
},
28
"type": "e-mail"
29
}
30
],
31
"userId": "5e21b752308c3c66d64e072c",
32
"kind": 7,
33
"timestamp": 1585056962504
34
},
35
...
36
]
Copied!
Last modified 8mo ago