For the complete documentation index, see llms.txt. This page is also available as Markdown.

Challenges

Challenge creation and management for missions

Get challenges for a game

get
/api/games/{id}/challenges

Retrieve all active challenges for a specific game

Path parameters
idstring · uuidRequired

Game ID (UUID)

Responses
200

List of challenges

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
    }
  ]
}

Get user completed challenges by game

get
/api/games/{id}/challenges/completed

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
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

post
/api/challenges

Create a new challenge for a game and mission (Admin only)

Body
descriptionstringRequired

Challenge description

Example: Reach level 5 with a score over 1000
gameIdstring · uuidRequired

Associated game ID

Example: 550e8400-e29b-41d4-a716-446655440000
missionIdstring · uuidRequired

Associated mission ID

Example: 550e8400-e29b-41d4-a716-446655440001
targetLevelinteger · min: 1Required

Required level to complete challenge

Example: 5
Responses
201

Challenge created successfully

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 a challenge

patch
/api/challenges/{id}

Update an existing challenge (Admin only)

Path parameters
idstring · uuidRequired

Challenge ID (UUID)

Body
descriptionstringRequired

Challenge description

Example: Reach level 5 with a score over 1000
gameIdstring · uuidRequired

Associated game ID

Example: 550e8400-e29b-41d4-a716-446655440000
missionIdstring · uuidRequired

Associated mission ID

Example: 550e8400-e29b-41d4-a716-446655440001
targetLevelinteger · min: 1Required

Required level to complete challenge

Example: 5
Responses
204

Challenge updated successfully

No content

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