Reports API Queries
This section documents the GraphQL queries available in the Reports API for retrieving platform statistics and metrics.
onlinePlayers​
Returns the number of users currently online on the platform.
Request​
query {
onlinePlayers
}
Authentication​
- No authentication required
Response​
Returns a single number representing the count of online players.
{
"data": {
"onlinePlayers": 127
}
}
Response Details​
Field | Type | Description |
---|---|---|
onlinePlayers | Int | The number of users currently connected to the platform |
Cache Behavior​
- The result is cached for 60 seconds
- Each new request within the cache window returns the same count
- After the cache expires, the count is recalculated from Redis data
Use Cases​
- Dashboard Statistics: Display real-time user activity on admin dashboards
- Public Information: Show how many users are online on public areas of the site
- Platform Health Monitoring: Track user engagement over time by polling this endpoint