RankGun logoRankGun

Leaderboard

Top users in the workspace ranked by tracked activity time.

GET /api/activity/leaderboard

Returns 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

StatusMeaning
400Invalid period, or limit is not a positive number.
401Missing API key.
403Invalid API key, workspace deactivated, or monthly limit exceeded.
500Internal server error.
Was this page helpful?

On this page