Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
53 lines (40 loc) · 2.03 KB

File metadata and controls

53 lines (40 loc) · 2.03 KB

Get Channel Counters

Gets channel information related to a user.

HTTP MethodURLRequires Auth
GET/api/v1/channels.countersyes

{% hint style="info" %} Permission required: view-room-administration {% endhint %}

Query Parameters

KeyExample ValueDescription
roomId* or roomName*ByehQjC44FwMeiLbX or GENERALThe channel room ID or room name. You must enter at least one of the parameters.
userIdRtycPC29hqLJfT9xjThe user ID.

Example Call

curl -H "X-Auth-Token: 8h2mKAwxB3AQrFSjLVKMooJyjdCFaA7W45sWlHP8IzO" \
     -H "X-User-Id: ew28FnZqipDpvKw3R" \
     -H "Content-type: application/json" \
     https://localhost:3000/api/v1/channels.counters?roomId=ByehQjC44FwMeiLbX

Example Response

{
  "joined":true,
  "members":78,
  "unreads":2,
  "unreadsFrom":"2018-02-23T17:15:51.907Z",
  "msgs":304,
  "latest":"2018-02-23T17:17:03.110Z",
  "userMentions":0,
  "success":true
}

// where:

// joined - boolean flag that shows that user has joined the room or not
// members - count of current room members
// unreads - count of unread messages for specified user (calling user or provided userId)
// unreadsFrom - start date-time of unread interval for specified user
// msgs - count of messages in the room
// latest - end date-time of unread interval for specified user (or date-time of last posted message)
// userMentions - count of user mentions in messages

Change Log

Version Description
0.65.0 Added