Get All Users

GET /node/api/users

Returns an array of all available users. Private fields (a password e.g) are not included to the response.

Request parameters

No parameters required.

Response description

Field
Type
Description
users
Array<User>
An array of users.

Examples

Request examples

Bash
JavaScript
NodeJS
Python
1
login=<...>
2
password=<...>
3
saymon_hostname=<...>
4
url=https://$saymon_hostname/node/api/users
5
6
curl -X GET $url -u $login:$password
Copied!
1
let login = <...>
2
let password = <...>
3
let saymonHostname = <...>
4
let path = "/node/api/users";
5
let auth = "Basic " + btoa(login + ":" + password);
6
7
let headers = new Headers();
8
headers.append("Authorization", auth);
9
10
let requestOptions = {
11
method: "GET",
12
headers: headers
13
};
14
15
fetch(saymonHostname + path, requestOptions)
16
.then(response => response.text())
17
.then(result => console.log(result))
18
.catch(error => console.log("error", error));
Copied!
1
const http = require("http");
2
3
let login = <...>
4
let password = <...>
5
let saymonHostname = <...>
6
let path = "/node/api/users";
7
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
8
9
let options = {
10
"method": "GET",
11
"hostname": saymonHostname,
12
"headers": {
13
"Authorization": auth
14
},
15
"path": path
16
};
17
18
let req = http.request(options, function (res) {
19
let chunks = [];
20
21
res.on("data", function (chunk) {
22
chunks.push(chunk);
23
});
24
25
res.on("end", function (chunk) {
26
let body = Buffer.concat(chunks);
27
console.log(body.toString());
28
});
29
30
res.on("error", function (error) {
31
console.error(error);
32
});
33
});
34
35
req.end();
Copied!
1
import requests
2
3
login = <your_login>
4
password = <your_password>
5
saymon_hostname = <your_saymon_hostname>
6
url = "https://" + saymon_hostname + "/node/api/users"
7
8
response = requests.request("GET", url, auth=(login, password))
9
print(response.text)
Copied!

Response example

1
[
2
{
3
"id": "5e21b752308c3c66d64e072c",
4
"login": "admin",
5
"group": null,
6
"authenticationToken": null,
7
"status": 2,
8
"eventFilter": [],
9
"permissions": [
10
"manage-objects",
11
],
12
"contacts": []
13
},
14
{
15
"id": "5e4fc1c77915112ac209e53d",
16
"login": "John",
17
"uiSettings": {
18
"muteSystemSounds": false
19
},
20
"status": 2,
21
"eventFilter": [],
22
"objectPermissions": {
23
"include": [
24
1
25
],
26
"exclude": [
27
"5e21b85b308c3c66d64e07bc"
28
]
29
},
30
"permissions": [],
31
"contacts": []
32
},
33
{
34
"id": "5e78c51788c61a1fbf34b673",
35
"login": "Bob",
36
"status": 2,
37
"eventFilter": [],
38
"permissions": [
39
"manage-links"
40
],
41
"contacts": []
42
}
43
]
Copied!
Last modified 1yr ago