Leaderboards

Read the standings

GET/v1/leaderboards/{leaderboardKey}

One leaderboard as the player sees it: the top of the board, their own place, and around neighbours on each side of it. Other players appear by rank, display name and score only, never by id.

On a league the board is the player's own group rather than everybody: a league splits players into groups of a fixed size and promotes or relegates them between tiers when a period settles.

On a team leaderboard a row is a team rather than a player, named by the team's key, and its score is its members' scores added up.

previous returns the last settled period instead of the one in progress: final ranks, and on a league what they did to the player's tier.

playerIds adds a named board: those players and the caller ranked among themselves. They are the only players ever returned with their ids, because the caller supplied them.

A leaderboard that does not exist, is switched off, is outside its season, or is hidden from a player who is not eligible for it, is a 404 in every case.

AuthorizationBearer <token>

Paste a project API key (no 'Bearer ' prefix). Create one in the dashboard under API keys.

In: header

Path Parameters

leaderboardKey*string

Query Parameters

PlayerId?string
Top?integer

How many entries from the top, up to the leaderboard's own top size.

Formatint32
Around?integer

How many neighbours on each side of the player's own place, up to 25.

Formatint32
Previous?boolean

The most recently settled period instead of the one in progress: final ranks and outcomes.

PlayerIds?array<string>

Up to 100 players, by their ids, to rank among themselves in named; the caller is among them.

LanguageCode?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/leaderboards/string"
{  "leaderboard": {    "leaderboardKey": "string",    "name": "string",    "description": null,    "images": {      "property1": "string",      "property2": "string"    },    "scoreSource": "Event",    "aggregation": null,    "rankOrder": "HighestFirst",    "ranksTeams": true,    "period": {      "startsAtUtc": null,      "endsAtUtc": null    },    "isLocked": true,    "participants": 0,    "me": null,    "league": null,    "team": null  },  "top": [    {      "rank": 0,      "displayName": null,      "score": 0.1,      "isMe": true    }  ],  "around": [    {      "rank": 0,      "displayName": null,      "score": 0.1,      "isMe": true    }  ],  "isSettled": true,  "named": null}