Fuselage
Powered By GitBook
Get Users List
Gets all of the users in the system and their information, the result is only limited to what the callee has access to view. It supports the Offset, Count, and Sort Query Parameters along with Query and Fields Query Parameter.
URL
Requires Auth
HTTP Method
/api/v1/users.list
yes
GET

Query Parameters

Argument
Example
Required
Description
fields
{ name: 1, emails: 0 }
Optional
Field include hash (value of 1 to include, 0 to exclude).
query
{ active: true, type: { $in: ['user', 'bot'] } }
Optional
Query filter hash.

Other Users Example Call

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
http://localhost:3000/api/v1/users.list
Copied!

Example Result Regular User Callee

1
{
2
"users": [
3
{
4
"_id": "nSYqWzZ4GsKTX4dyK",
5
"type": "user",
6
"status": "offline",
7
"active": true,
8
"name": "Example User",
9
"utcOffset": 0,
10
"username": "example"
11
},
12
{
13
...
14
}
15
],
16
"count": 10,
17
"offset": 0,
18
"total": 10,
19
"success": true
20
}
Copied!

Example Result Admin Callee

1
{
2
"users": [
3
{
4
"_id": "nSYqWzZ4GsKTX4dyK",
5
"createdAt": "2016-12-07T15:47:46.861Z",
6
"services": {
7
"password": {
8
"bcrypt": ...
9
},
10
"email": {
11
"verificationTokens": [
12
{
13
"token": "...",
14
"address": "[email protected]",
15
"when": "2016-12-07T15:47:46.930Z"
16
}
17
]
18
},
19
"resume": {
20
"loginTokens": [
21
{
22
"when": "2016-12-07T15:47:47.334Z",
23
"hashedToken": "..."
24
}
25
]
26
}
27
},
28
"emails": [
29
{
30
"address": "[email protected]",
31
"verified": true
32
}
33
],
34
"type": "user",
35
"status": "offline",
36
"active": true,
37
"roles": [
38
"user"
39
],
40
"name": "Example User",
41
"lastLogin": "2016-12-08T00:22:15.167Z",
42
"statusConnection": "offline",
43
"utcOffset": 0,
44
"username": "example"
45
},
46
{
47
...
48
}
49
],
50
"count": 3,
51
"offset": 2,
52
"total": 10,
53
"success": true
54
}
Copied!

Change Log

Version
Description
0.49.0
Count and offset query parameters supported.
0.35.0
Added
Last modified 6mo ago