Manage leaderboards from the Admin Portal
Overview
This article guides you through managing leaderboards in your game from the AccelByte Gaming Services (AGS) Admin Portal or with the AGS CLI, including how to:
- View leaderboard details and players
- Update leaderboard details, cycles, and all-time setting
- Reset leaderboards
- Hide players from leaderboards
- Delete players from leaderboards
Prerequisite
- Access to the AGS Admin Portal.
- To follow the AGS CLI steps, you must have installed the AGS CLI and signed in with an account that has access to these features. See Install and sign in. The examples use a Bash shell.
View leaderboards
- Admin Portal
- AGS CLI
-
In the AGS Admin Portal, go to the game namespace with the leaderboard you want to view.
-
On the sidebar menu, go to Online > Leaderboards. The Leaderboards page appears displaying a list of leaderboards in the game.
-
From the list of leaderboards, find the leaderboard you want to view and click on its code to open its details page. Use the Cycles dropdown to filter the list by specific cycles.
-
On the details page of the leaderboard, you can view the following:
- Leaderboard details: shows the leaderboard's code, name, statcode (statistic code), cycles, order.
- Leaderboard data
- All Players: shows all the players in the leaderboard.
- Hidden Players: lists players who are part of the leaderboard but are hidden from view in-game.
-
List the leaderboards in your game namespace. Replace
<YourNamespace>with your game namespace:ags leaderboard leaderboards list --namespace <YourNamespace> -
Get the details of a leaderboard. Replace
<LeaderboardCode>with itsleaderboardCode:ags leaderboard leaderboards get --namespace <YourNamespace> --leaderboard-code <LeaderboardCode>The output shows the leaderboard's
name,statCode,cycleIds,allTime, anddescendingorder. -
List the players in a leaderboard cycle. Replace
<CycleId>with one of the leaderboard'scycleIds:ags leaderboard global-rankings list-cycle --namespace <YourNamespace> --leaderboard-code <LeaderboardCode> --cycle-id <CycleId>For the all-time cycle, run this command instead:
ags leaderboard global-rankings list-all-time --namespace <YourNamespace> --leaderboard-code <LeaderboardCode> -
List the hidden players:
ags leaderboard visibility list-hidden --namespace <YourNamespace> --leaderboard-code <LeaderboardCode>
Update leaderboard details, cycles, and all-time setting
- Admin Portal
- AGS CLI
- Go to the details page of the leaderboard you want to update.
- In the Leaderboard Details section, you can update the leaderboard as follows:
- Update the leaderboard name.
- Add or remove cycles from the leaderboard.
- Enable or disable the All-time cycle setting of the leaderboard.
- If enabled, the leaderboard updates regularly to show rankings from the entire history of the game.
- If disabled, the leaderboard displays rankings for a specific period or cycle.
- Change how the leaderboard displays the order of the ranked players, either by ascending or descending order.
- Upload or change the icon of the leaderboard.
-
Save the leaderboard's current settings to a file. Any file name works. This example uses
leaderboard.json:ags leaderboard leaderboards get --namespace <YourNamespace> --leaderboard-code <LeaderboardCode> --format json > leaderboard.json -
Edit the fields that you want to change in
leaderboard.json:name: the leaderboard name.cycleIds: the cycles of the leaderboard.allTime:trueto enable the All-time cycle setting, orfalseto disable it. EithercycleIdsmust have at least one cycle, orallTimemust betrue.descending:truefor descending order, orfalsefor ascending.iconURL: the address of an icon image that is already hosted. The Admin Portal uploads the image for you.
-
Update the leaderboard. After
@, pass the path to your JSON file:ags leaderboard leaderboards update --namespace <YourNamespace> --leaderboard-code <LeaderboardCode> --json @leaderboard.jsonwarningRemoving a cycle from
cycleIds, or changingallTimefromtruetofalse, deletes the ranking data of that cycle right away. The Admin Portal asks you to confirm before it disables the all-time cycle, but the AGS CLI doesn't.
Reset leaderboard cycles
Resetting a leaderboard cycle resets all ranking data or the points of all players in it. After resetting a leaderboard cycle is reset, it'll be filled again with data when its statistical code configuration is updated.
To reset a leaderboard, follow these steps:
- Admin Portal
- AGS CLI
- Go to the details page of the leaderboard you want to reset.
- On the Leaderboard Detail page, click on the Reset Leaderboard button in the Leaderboard Data section. The Reset Leaderboard modal will appear and you are required to select the cycle you want to reset.
- On the confirmation message, select which cycle of the leaderboard you want to reset and then click Reset. The leaderboard cycle is immediately reset.
-
Get the details of the leaderboard and note the ID of the cycle to reset from its
cycleIds. -
Reset the cycle. Replace
<CycleId>with the cycle ID:ags leaderboard global-rankings reset-cycle --namespace <YourNamespace> --leaderboard-code <LeaderboardCode> --cycle-id <CycleId>
Hide players from leaderboards
- Admin Portal
- AGS CLI
- Go to the details page of the leaderboard.
- On the details page of the leaderboard, select the leaderboard cycle on where the user ranking you want to delete.
- Under the All Players tab in the Leaderboard Data section, find the player that you want to delete, click on the Action (...) menu and select Delete.
- Click on Hide on the confirmation message. The player is immediately hidden from the leaderboard. To view hidden players, go to the Hidden Players tab.
-
List the players in the leaderboard and note the
userIdof the player to hide. -
Hide the player. Replace
<UserId>with the player's user ID:ags leaderboard visibility set-user-status --namespace <YourNamespace> --leaderboard-code <LeaderboardCode> --user-id <UserId> --json '{"visibility": false}'To show the player again, run the same command with
"visibility": true.
Delete player ranking data
Deleting a player's ranking data immediately removes them from the leaderboard they're in. They can still rejoin the leaderboard if they manage to gain enough ranking points during the leaderboard cycle.
To prevent players from rejoining leaderboards after deleting their ranking data, you can ban them from logging into your game or from matchmaking pools.
To delete a player's ranking data in a leaderboard, follow these steps:
- Admin Portal
- AGS CLI
- Go to the details page of the leaderboard.
- On the details page of the leaderboard, select the leaderboard cycle on where the user ranking you want to delete.
- Under the All Players tab in the Leaderboard Data section, find the player that you want to delete, click on the Action (...) menu and select Delete.
- Click on Delete on the confirmation message. The player is immediately deleted from the leaderboard cycle.
-
List the players in the leaderboard cycle and note the
userIdof the player to delete. -
Delete the player's ranking data from the cycle. Replace
<UserId>with the player's user ID and<CycleId>with the cycle ID:ags leaderboard user-rankings reset-cycle --namespace <YourNamespace> --leaderboard-code <LeaderboardCode> --cycle-id <CycleId> --user-id <UserId>To delete the player's ranking data from the all-time cycle, run this command instead:
ags leaderboard user-rankings reset --namespace <YourNamespace> --leaderboard-code <LeaderboardCode> --user-id <UserId>