Skip to main content
Version: 5.7.0

GetGlobalLeaderboardPageByVersion

NOTE: The friend summary data is returned for each record in the leaderboard.

NOTE: "timeBeforeReset" is only returned when the requested version is also the active version.

Method returns a page of global leaderboard results. By using a non-current version id, the user can retrieve a historical leaderboard.

tip

See GetGlobalLeaderboardVersions method to retrieve the version id.

ServiceOperation
leaderboardGET_GLOBAL_LEADERBOARD_PAGE

Method Parameters

ParameterDescription
leaderboardIdThe id of the leaderboard
sortOrderSort order of page. ("HIGH_TO_LOW" or "LOW_TO_HIGH")
startIndexThe rank at which to start the page.
endIndexThe rank at which to end the page.
versionIdThe historical version to retrieve.

Usage

http://localhost:3000
// S2S call: to view example, switch to the Cloud Code or Raw tab.
JSON Response
{
"status": 200,
"data": {
"leaderboard": [
{
"playerId": "9073dff7-0df6-437e-9be6-39cd704dcoj4",
"score": 100,
"data": null,
"createdAt": 1401385959596,
"updatedAt": 1401385959596,
"index": 0,
"rank": 1,
"name": "",
"pictureUrl": null
},
{
"playerId": "7c107e9f-ab48-492d-a000-defec6237700",
"score": 10,
"data": null,
"rewarded": false,
"createdAt": 1401385898407,
"updatedAt": 1401385898407,
"index": 1,
"rank": 2,
"name": "",
"pictureUrl": null
}
],
"leaderboardSize": 31,
"moreBefore": false,
"moreAfter": true,
"timeBeforeReset": 588182412,
"server_time": 1395840957588
}
}