Skip to main content
Version: 5.7.0

SysCreateLeaderboardConfig

Creates a leaderboard configuration, with support for tournament leaderboards.

ServiceOperation
leaderboardSYS_CREATE_LEADERBOARD_CONFIG

Method Parameters

ParameterDescription
leaderboardIdID uniquely identifying the leaderboard configuration to retrieve.
configJsonConfiguration for the leaderboard, specified as JSON object.

Configuration fields of configJson

ParameterDescription
entryTypeRequired. Valid values are 'PLAYER' and 'GROUP'
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.
expireInMinsSet leaderboard expiry time in minute, setting to null will not be automatically deleted.
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). Must be false for NEVER. Must be true for ADHOC. Can be true or false for recurring rotation types. 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": 1,
"resetAt": 1633492744000,
"leaderboardType": "HIGH_VALUE",
"rotationType": "DAYS",
"retainedCount": 5,
"data": {
"info": "Adding tournament to encourage play."
},
"numDaysToRotate": 4,
"entryType": "PLAYER",
"tEnabled": true,
"tTemplateOnly": false,
"expiry": null,
"currentVersionId": 1,
"currentPeriod": {
"versionId": 1,
"startingAt": 1632752317162,
"endingAt": 1633492744000,
"rotationType": "DAYS",
"numDaysToRotate": 4
}
}
},
"status": 200
}