On the Rocket.Chat’s workspace UI, the Workspace page and the Engagement dashboard provide insights into your workspace and usage activities. You can also view your workspace statistics using the following endpoints:
The statistics object
Statistics endpoints return a workspace statistics object with many counters. A trimmed example from Get Last Statistics:
{
"_id": "v3D4mvobwfznKozH8",
"uniqueId": "wD4EP3M7FeFzJdgku",
"version": "8.7.0",
"installedAt": "2023-07-10T16:44:58.548Z",
"totalUsers": 24,
"activeUsers": 22,
"onlineUsers": 2,
"totalRooms": 91,
"totalChannels": 43,
"totalPrivateGroups": 27,
"totalDirect": 20,
"totalLivechat": 1,
"totalMessages": 796,
"success": true
}Fields you use most often:
version: The Rocket.Chat server version of the workspace.uniqueId: The permanent identifier of the workspace._ididentifies one statistics snapshot.totalUsers,activeUsers,onlineUsers: User counts by lifecycle and presence.totalRoomsand its breakdown (totalChannels,totalPrivateGroups,totalDirect,totalLivechat): Room counts by type.
Statistics API
View your workspace details, such as the version and number of users, and messages.
Monitor a workspace
Get the last statistics for the current snapshot of users, rooms, messages, and version. Pass
refresh=trueto force a fresh calculation.Get the statistics list to compare historical snapshots over time.
Users engagement API
View the number of new and active users.
View the number of users and chat analytics by hour and week.
Track user engagement and busy periods
Get new users and active users for a date range.
Get users by time of the day to see when your users are online.
Get hourly data or weekly data on when chat is busier.
Messages engagement API
View the number of messages sent within a specific time duration.
View the most popular channels by number of messages sent.
You can also view the origin of messages sent during a specific period.
Track message engagement
Get the number of sent messages for a date range, and the origin of messages sent.
Get the most popular channels, or get channels engagement to rank all channels by message volume.
Channels engagement API
View all channels in your workspace and the number of messages in each channel within a specific period.
Subscriptions API
Mark a channel as read or unread.
View the number of unread messages.
Conventions
Statistics endpoints require the
view-statisticspermission.Engagement endpoints take
startandenddate query parameters in ISO 8601 format to define the reporting period.Get Statistics List supports
count,offset,sort, andqueryquery parameters.