Challenges
Challenge creation and management for missions
Retrieve all active challenges for a specific game
Path parameters
idstring · uuidRequired
Game ID (UUID)
Responses
200
List of challenges
application/json
400
Invalid UUID
application/json
get/api/games/{id}/challenges
GET /api/games/{id}/challenges HTTP/1.1
Host: exploration-games.decentraland.org
Accept: */*
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440003",
"description": "Reach level 5 with a score over 1000",
"game_id": "550e8400-e29b-41d4-a716-446655440000",
"mission_id": "550e8400-e29b-41d4-a716-446655440001",
"target_level": 5,
"data": {
"score": {
"condition": ">=",
"target": 1000
}
},
"active": true
}
]
}Retrieve all challenges completed by the authenticated user for a specific game
Path parameters
idstring · uuidRequired
Game ID (UUID)
Responses
200
List of completed challenges
application/json
400
Invalid UUID
application/json
get/api/games/{id}/challenges/completed
GET /api/games/{id}/challenges/completed HTTP/1.1
Host: exploration-games.decentraland.org
Accept: */*
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440003",
"description": "Reach level 5 with a score over 1000",
"game_id": "550e8400-e29b-41d4-a716-446655440000",
"mission_id": "550e8400-e29b-41d4-a716-446655440001",
"target_level": 5,
"data": {
"score": {
"condition": ">=",
"target": 1000
}
},
"active": true,
"completed": true,
"completed_at": "2024-10-30T12:34:56.789Z"
}
]
}Create a new challenge for a game and mission (Admin only)
Body
descriptionstringRequiredExample:
Challenge description
Reach level 5 with a score over 1000gameIdstring · uuidRequiredExample:
Associated game ID
550e8400-e29b-41d4-a716-446655440000missionIdstring · uuidRequiredExample:
Associated mission ID
550e8400-e29b-41d4-a716-446655440001targetLevelinteger · min: 1RequiredExample:
Required level to complete challenge
5Responses
201
Challenge created successfully
application/json
400
Invalid request payload
application/json
post/api/challenges
POST /api/challenges HTTP/1.1
Host: exploration-games.decentraland.org
Content-Type: application/json
Accept: */*
Content-Length: 219
{
"description": "Reach level 5 with a score over 1000",
"gameId": "550e8400-e29b-41d4-a716-446655440000",
"missionId": "550e8400-e29b-41d4-a716-446655440001",
"targetLevel": 5,
"data": {
"score": {
"condition": ">=",
"target": 1000
}
}
}{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440003",
"description": "Reach level 5 with a score over 1000",
"game_id": "550e8400-e29b-41d4-a716-446655440000",
"mission_id": "550e8400-e29b-41d4-a716-446655440001",
"target_level": 5,
"data": {
"score": {
"condition": ">=",
"target": 1000
}
},
"active": true
}
}Update an existing challenge (Admin only)
Path parameters
idstring · uuidRequired
Challenge ID (UUID)
Body
descriptionstringRequiredExample:
Challenge description
Reach level 5 with a score over 1000gameIdstring · uuidRequiredExample:
Associated game ID
550e8400-e29b-41d4-a716-446655440000missionIdstring · uuidRequiredExample:
Associated mission ID
550e8400-e29b-41d4-a716-446655440001targetLevelinteger · min: 1RequiredExample:
Required level to complete challenge
5Responses
204
Challenge updated successfully
No content
400
Invalid request or challenge not found
application/json
patch/api/challenges/{id}
PATCH /api/challenges/{id} HTTP/1.1
Host: exploration-games.decentraland.org
Content-Type: application/json
Accept: */*
Content-Length: 219
{
"description": "Reach level 5 with a score over 1000",
"gameId": "550e8400-e29b-41d4-a716-446655440000",
"missionId": "550e8400-e29b-41d4-a716-446655440001",
"targetLevel": 5,
"data": {
"score": {
"condition": ">=",
"target": 1000
}
}
}No content
Last updated