Reference
Fuselage
Channel Counters
Gets channel counters.
URL
Requires Auth
HTTP Method
/api/v1/channels.counters
yes
GET

Payload

One of roomId or roomName is required.
Argument
Example
Required
Description
roomId
GENERAL
Required
The channel's id
roomName
general
Required
The channel's name
userId
RtycPC29hqLJfT9xj
Optional
Counters for provided user id (need to have a view-room-administration right for calling user)

Example Call

1
curl -H "X-Auth-Token: 8h2mKAwxB3AQrFSjLVKMooJyjdCFaA7W45sWlHP8IzO" \
2
-H "X-User-Id: ew28FnZqipDpvKw3R" \
3
-H "Content-type: application/json" \
4
http://localhost:3000/api/v1/channels.counters?roomId=GENERAL
Copied!

Example Result

1
{
2
"joined":true,
3
"members":78,
4
"unreads":2,
5
"unreadsFrom":"2018-02-23T17:15:51.907Z",
6
"msgs":304,
7
"latest":"2018-02-23T17:17:03.110Z",
8
"userMentions":0,
9
"success":true
10
}
11
12
where:
13
14
joined - boolean flag that shows that user is joined the room or not
15
members - count of current room members
16
unreads - count of unread messages for specified user (calling user or provided userId)
17
unreadsFrom - start date-time of unread interval for specified user
18
msgs - count of messages in the room
19
latest - end date-time of unread interval for specified user (or date-time of last posted message)
20
userMentions - count of user mentions in messages
Copied!

Change Log

Version
Description
0.65.0
Added
Last modified 8mo ago
Export as PDF
Copy link
Edit on GitHub