Get leaderboard of the top ranking users in your school
Rate limit: Maximum 60 requests in a window of 1m.
curl --request POST \
--url https://backend.codedamn.com/api/public/get-school-leaderboard \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"data": {
"data": {
"fermionSchoolId": "<string>",
"period": "Today",
"limit": 250
}
}
}
]
}
'[
{
"output": {
"status": "ok",
"data": {
"leaderboardUsers": [
{
"rank": 250,
"xpTotal": 123,
"xpDeltaInPeriod": 123,
"fermionUserId": "<string>",
"saasUserId": "<string>",
"userCreatedAtIso": "2023-11-07T05:31:56Z",
"name": "<string>",
"username": "<string>",
"profilePicUrl": "<string>"
}
]
}
}
}
]API Request Body
Show child attributes
Show child attributes
Show child attributes
Your school ID
1The period for which you want to request leaderboard
Today, ThisWeek, ThisMonth, AllTime The number of top users to include in the leaderboard
1 <= x <= 500API Response Body
Show child attributes
ok Show child attributes
Show child attributes
Rank or position of user in the leaderboard
1 <= x <= 500Total XP of the user
XP the user gained or lost in the given period
Internal fermion user ID of the user
1The user ID of the user in your DB
1The date when the user joined in ISO format
Name of the user
2 - 100Username of the user
3 - 24Profile Photo URL of the user
curl --request POST \
--url https://backend.codedamn.com/api/public/get-school-leaderboard \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"data": {
"data": {
"fermionSchoolId": "<string>",
"period": "Today",
"limit": 250
}
}
}
]
}
'[
{
"output": {
"status": "ok",
"data": {
"leaderboardUsers": [
{
"rank": 250,
"xpTotal": 123,
"xpDeltaInPeriod": 123,
"fermionUserId": "<string>",
"saasUserId": "<string>",
"userCreatedAtIso": "2023-11-07T05:31:56Z",
"name": "<string>",
"username": "<string>",
"profilePicUrl": "<string>"
}
]
}
}
}
]