Get Group Counters

Prev Next
Get
/api/v1/groups.counters

Get the private channel information for the authenticated user.

Permission required: view-room-administration

Changelog

Version Description
0.65.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Query parameters
roomId
string

The room ID. It is required if the roomName is not provided.

Exampledlpfuijw7ej
roomName
string

The room name. It is required if the roomId is not provided.

Examplegeneral
userId
string

Counters for provided user ID (you need to have the view-room-administration permission for calling user). This parameter is optional

Responses
200

OK

Note The response returns the following information:

  • joined - Boolean flag that shows the particular user has joined the room or not.
  • members - Count of current room members.
  • unreads - Count of unread messages for specified user (calling user or for the 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.
Success
{
  "joined": true,
  "members": 1,
  "unreads": 1,
  "unreadsFrom": "2018-02-18T21:51:20.091Z",
  "msgs": 1,
  "latest": "2018-02-23T17:20:17.345Z",
  "userMentions": 0,
  "success": true
}
object
joined
boolean
members
integer
unreads
integer
unreadsFrom
string
msgs
integer
latest
string
userMentions
integer
success
boolean
400

Bad Request

Example 1
{
  "success": false,
  "error": "The required \"roomId\" or \"roomName\" param provided does not match any group [error-room-not-found]",
  "errorType": "error-room-not-found"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string