Fuselage
Powered By GitBook
Users Presence
Gets all connected users presence.
URL
Requires Auth
HTTP Method
/api/v1/users.presence
yes
GET

Query Parameters

Argument
Example
Required
Description
Valid Format(s)
from
2019-05-22T12:11:45.392Z
Optional
The last date you got a status change
ISO 8601 datetime. Timezone, milliseconds and seconds are optional

All users presence example call

If you don't pass from parameter, you'll get a list of all users presence and the result will have a full field with value true indicating that.
1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
http://localhost:3000/api/v1/users.presence
Copied!

Example Result

1
{
2
"users":[
3
{
4
"_id":"rocket.cat",
5
"name":"Rocket.Cat",
6
"username":"rocket.cat",
7
"status":"online",
8
"utcOffset":0,
9
"avatarETag": "5BB9B5ny5DkKdrwkq"
10
},
11
{
12
"_id":"rocketchat.internal.admin.test",
13
"name":"RocketChat Internal Admin Test",
14
"username":"rocketchat.internal.admin.test",
15
"status":"online",
16
"utcOffset":-2,
17
"avatarETag": "iEbEm4bTT327NJjXt"
18
}
19
],
20
"full": true,
21
"success":true
22
}
Copied!

Users presence changed after period example call

If you pass from parameter, you'll get only a list users presence which have changed after the time of from parameter. The full result field will then be false, indicating it's a partial result.
If the value of from parameter is older than 10 minutes, the server will reply with a full result set.
1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
http://localhost:3000/api/v1/users.presence?from=2019-05-22T12:11:45.392Z
Copied!

Example Result

1
{
2
"users":[
3
{
4
"_id":"rocket.cat",
5
"name":"Rocket.Cat",
6
"username":"rocket.cat",
7
"status":"online",
8
"utcOffset":0,
9
"avatarETag": "5BB9B5ny5DkKdrwkq"
10
},
11
{
12
"_id":"rocketchat.internal.admin.test",
13
"name":"RocketChat Internal Admin Test",
14
"username":"rocketchat.internal.admin.test",
15
"status":"online",
16
"utcOffset":-2,
17
"avatarETag": "iEbEm4bTT327NJjXt"
18
}
19
],
20
"full": false,
21
"success":true
22
}
Copied!

Change Log

Version
Description
1.1.0
Added
Last modified 2mo ago