Skip to main content
Version: 5.7.0

SysEditLeaderboardConfig

Edits a leaderboard configuration, with support for tournament leaderboards.

ServiceOperation
leaderboardSYS_EDIT_LEADERBOARD_CONFIG

Method Parameters

ParameterDescription
leaderboardIdID uniquely identifying the leaderboard configuration to retrieve.
dbVersionThe database version of the leaderboard config being edited. For any version, specify -1.
configJsonConfiguration changes for the leaderboard, specified as JSON object.

Configuration fields of configJson

ParameterDescription
leaderboardTypeRequired. Type of leaderboard. Valid values are 'LAST_VALUE', 'HIGH_VALUE', 'LOW_VALUE', 'CUMULATIVE', 'ARCADE_HIGH', 'ARCADE_LOW'.
rotationTypeRequired. Type of rotation. Valid values are 'NEVER', 'DAILY', 'DAYS', 'WEEKLY', 'MONTHLY', 'YEARLY'.
numDaysToRotateRequired if 'DAYS' rotation type, with valid values between 2 and 14, otherwise null.
resetAtUTC timestamp, in milliseconds, at which to rotate the period. Always null if 'NEVER' rotation type.
retainedCountRequired. Number of rotations (versions) of the leaderboard to retain.
dataOptional parameter for data.
tEnabledOptional parameter to set whether tournaments are enabled (true) or not (false). Can only be true for recurring rotation types (not NEVER or ADHOC). Defaults to false.
tTemplateOnlyOptional parameter to set whether leaderboard is a tournament template only (true) or not (false). Can only be true if tEnabled is true. Defaults to false.

Usage

http://localhost:3000
//cloud code only
JSON Response
{
"data": {
"aLeaderboardId2": {
"leaderboardId": "aLeaderboardId",
"dbVersion": 5,
"resetAt": 1633692744000,
"leaderboardType": "HIGH_VALUE",
"rotationType": "DAYS",
"retainedCount": 5,
"data": {
"info": "Adding tournament to encourage play."
},
"numDaysToRotate": 4,
"entryType": "PLAYER",
"tEnabled": true,
"tTemplateOnly": false,
"currentVersionId": 1,
"currentPeriod": {
"versionId": 1,
"startingAt": 1632752317162,
"endingAt": 1633692744000,
"rotationType": "DAYS",
"numDaysToRotate": 4
}
}
},
"status": 200
}