- Returning.AI
- Auth
- User
- Server
- Category
- Role
- Channel
- Language Setting
- Leaderboard
- Badge
- Gamification
- Api Token
- Custom Userfields
- Integration
update leaderboard
Developing
PUT
/leaderboards/{id}
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
id
string
required
Example:
66b2ed98bbd4d2b8c29cc099
Body Params application/json
object {0}
Example
{
"enabled": true,
"duration": {
"start": "2024-04-21T16:00:00.000+00:00",
"end": "2024-06-21T16:00:00.000+00:00",
"noEndDate": false
},
"performanceDisplay": {
"showTop": {
"enabled": true,
"value": 3
},
"showPositive": {
"enabled": true
},
"showDummy": {
"enabled": true
}
},
"rankedUserRoles": {
"roles": [
"642e37ce28200b49f61327ca",
"642e37ce28200b49f6132123"
],
"users": [
"491238",
"940163"
]
},
"viewPermissionUserRoles": {
"roles": [
"642e37ce28200b49f61327ca",
"642e37ce28200b49f6132dl1"
],
"users": [
"710361",
"440927"
]
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.returning.ai/api/v1/leaderboards/66b2ed98bbd4d2b8c29cc099' \
--header 'Content-Type: application/json' \
--data-raw '{
"enabled": true,
"duration": {
"start": "2024-04-21T16:00:00.000+00:00",
"end": "2024-06-21T16:00:00.000+00:00",
"noEndDate": false
},
"performanceDisplay": {
"showTop": {
"enabled": true,
"value": 3
},
"showPositive": {
"enabled": true
},
"showDummy": {
"enabled": true
}
},
"rankedUserRoles": {
"roles": [
"642e37ce28200b49f61327ca",
"642e37ce28200b49f6132123"
],
"users": [
"491238",
"940163"
]
},
"viewPermissionUserRoles": {
"roles": [
"642e37ce28200b49f61327ca",
"642e37ce28200b49f6132dl1"
],
"users": [
"710361",
"440927"
]
}
}'
Responses
🟢200Success
application/json
Body
meta
object
required
success
boolean
required
message
string
required
devMessage
string
required
body
object
required
_id
string
required
serverId
string
required
name
string
required
description
string
required
image
string
required
createdAt
string
required
updatedAt
string
required
__v
integer
required
Example
{
"meta": {
"success": true,
"message": "Leaderboard has been updated successfully",
"devMessage": "Leaderboard has been updated successfully"
},
"body": {
"_id": "66a2807ffe1c8797121428ae",
"serverId": "669b462658695ff095d431af",
"name": "Genesiv Leaderboard",
"description": "This is the leaderboard for Test",
"image": "https://chartsnapshot.s3.us-east-2.amazonaws.com/apireturningai/tester/1721925752712-1088b0a1d76b6acb8e744f5d1108255.png",
"createdAt": "2024-07-25T16:42:39.531Z",
"updatedAt": "2024-07-25T16:43:42.166Z",
"__v": 0
}
}
Modified at 2024-08-07 03:44:52