API ReferenceActivity
Leaderboard
Top users in the workspace ranked by tracked activity time.
GET /api/activity/leaderboardReturns the top N users in the workspace ranked by activity time. Mirrors the leaderboard shown on the workspace dashboard.
Headers
Prop
Type
Query Parameters
Prop
Type
curl "https://api.rankgun.works/api/activity/leaderboard?period=all&limit=10" \
-H "x-api-key: YOUR_API_KEY"Response
200 OK
{
"success": true,
"period": "all",
"limit": 10,
"leaderboard": [
{
"rank": 1,
"robloxId": 123456789,
"robloxUsername": "Builderman",
"displayName": "Build",
"timeSeconds": 18402,
"isOnline": true,
"streakDays": 4
},
{
"rank": 2,
"robloxId": 987654321,
"robloxUsername": "Stickmaster",
"displayName": null,
"timeSeconds": 15120,
"isOnline": false,
"streakDays": 1
}
]
}Entries are sorted descending by timeSeconds and assigned a 1-indexed rank. Users with zero tracked time may still appear if fewer than limit users have any activity.
Leaderboard Entry Fields
Prop
Type
Errors
| Status | Meaning |
|---|---|
400 | Invalid period, or limit is not a positive number. |
401 | Missing API key. |
403 | Invalid API key, workspace deactivated, or monthly limit exceeded. |
500 | Internal server error. |
Was this page helpful?