curl --request GET \
--url https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/{leaderboardConfigId}/distribution \
--header 'x-api-token: <api-key>'{
"leaderboardConfigId": "<string>",
"rewards": [
{
"pointsToDistribute": 1,
"bonusXpToDistribute": 1,
"rewardsConfig": {
"mechanism": "all",
"amountToDistribute": 1,
"allocations": [
{
"id": "<string>",
"allocationType": "assets",
"supply": 1,
"amountToDistribute": 2,
"distributed": 1,
"isLive": true,
"rewardId": "<string>"
}
]
},
"startRank": 2,
"endRank": 2
}
]
}Get distribution details for a leaderboard config.
curl --request GET \
--url https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/{leaderboardConfigId}/distribution \
--header 'x-api-token: <api-key>'{
"leaderboardConfigId": "<string>",
"rewards": [
{
"pointsToDistribute": 1,
"bonusXpToDistribute": 1,
"rewardsConfig": {
"mechanism": "all",
"amountToDistribute": 1,
"allocations": [
{
"id": "<string>",
"allocationType": "assets",
"supply": 1,
"amountToDistribute": 2,
"distributed": 1,
"isLive": true,
"rewardId": "<string>"
}
]
},
"startRank": 2,
"endRank": 2
}
]
}Successful response
The id of the leaderboard config with assigned distribution details
Show child attributes
The amount of points to distribute.
x >= 0The amount of bonus xp to distribute
x >= 0Show child attributes
The mechanism used to distribute the rewards
all, priority, random, select The number of different reward allocations to select from the allocations array. For example, if there are 5 allocations but amountToDistribute is 2, only 2 of those 5 allocations will be selected based on the specified mechanism (all, priority or random).
x >= 0The reward allocations to distribute. If any of the allocations are new, the id field should be null. If any of the allocations are updates to existing allocations, the id field should be the id of the allocation to update. If an existing allocation is not included in the array, it will be removed from the distribution event.
Show child attributes
The ID of this allocation
The type of allocation, either assets or entries. If the reward has a type of assets-and-entries, this allocation can have both assets and entries. Otherwise, it can only have one type matching the reward's allocation type.
assets, entries The total supply of this allocation. Only used if isSharedAssetsSupply or isSharedEntriesSupply is false on the reward.
x >= 0The quantity of this specific reward to distribute when this allocation is selected. For example, if amountToDistribute is 3, then 3 units of this reward will be given to the recipient.
x >= 1The amount already distributed for this allocation
x >= 0Whether this allocation is live
The id of the reward the allocation relates to.
The start rank of the reward distribution
x >= 1The end rank of the reward distribution
x >= 1Was this page helpful?