Skip to main content

Overview

The Game API provides endpoints for retrieving game information, joining games, submitting flags, and managing game participation.

Public Endpoints

Get Recent Games

Retrieve games from the last three weeks.

GET /api/game/recent

limit
integer
default:"0"
Maximum number of games to return (0-50, 0 = all)
[
  {
    "id": 1,
    "title": "Spring CTF 2026",
    "summary": "Annual spring competition",
    "poster": "/assets/posters/abc123.jpg",
    "startTimeUtc": "2026-03-15T08:00:00Z",
    "endTimeUtc": "2026-03-17T20:00:00Z",
    "participantCount": 156
  }
]
This endpoint supports ETag caching. Include If-None-Match header for efficient polling.

Get Games List

Retrieve paginated list of games.

GET /api/game

count
integer
default:"10"
Number of games to return (max 50)
skip
integer
default:"0"
Number of games to skip
{
  "data": [
    {
      "id": 1,
      "title": "Spring CTF 2026",
      "poster": "/assets/posters/abc123.jpg",
      "startTimeUtc": "2026-03-15T08:00:00Z",
      "endTimeUtc": "2026-03-17T20:00:00Z"
    }
  ],
  "total": 25,
  "count": 10,
  "skip": 0
}

Get Game Details

Retrieve detailed information about a specific game.

GET /api/game/

id
integer
required
Game ID
{
  "id": 1,
  "title": "Spring CTF 2026",
  "summary": "Annual spring CTF competition",
  "description": "Detailed description...",
  "poster": "/assets/posters/abc123.jpg",
  "startTimeUtc": "2026-03-15T08:00:00Z",
  "endTimeUtc": "2026-03-17T20:00:00Z",
  "writeupRequired": true,
  "writeupDeadline": "2026-03-24T23:59:59Z",
  "inviteCode": null,
  "participantCount": 156,
  "divisions": [],
  "teamMemberCountLimit": 4,
  "organizations": ["University A", "College B"]
}

Participation

Join Game

Join a game with a team.

POST /api/game/

Requires User authentication and team membership.
id
integer
required
Game ID
teamId
integer
required
ID of the team to join with
divisionId
integer
Division ID (required if game has joinable divisions)
inviteCode
string
Invitation code (if required by game or division)
{
  "teamId": 42,
  "divisionId": 1,
  "inviteCode": "SECRET123"
}

Leave Game

Leave a game participation.

DELETE /api/game/

Requires User authentication. Can only leave if participation is pending or rejected.
id
integer
required
Game ID

Get Game Details (Authenticated)

Retrieve challenges and team information for joined games.

GET /api/game//details

Requires User authentication and active participation.
{
  "scoreboardItem": {
    "id": 42,
    "name": "Team Alpha",
    "avatar": "/assets/avatars/team42.jpg",
    "rank": 5,
    "score": 2500,
    "solvedCount": 15
  },
  "teamToken": "12345:a1b2c3d4e5f6...",
  "challenges": [
    {
      "id": 1,
      "title": "Web Challenge",
      "category": "Web",
      "score": 100,
      "solvedCount": 45,
      "bloods": []
    }
  ],
  "challengeCount": 20,
  "writeupRequired": true,
  "writeupDeadline": "2026-03-24T23:59:59Z"
}

Challenge Operations

Get Challenge

Retrieve detailed information about a challenge.

GET /api/game//challenges/

Requires User authentication and game participation.
id
integer
required
Game ID
challengeId
integer
required
Challenge ID
{
  "id": 1,
  "title": "Web Challenge",
  "category": "Web",
  "description": "Find the flag in the web application...",
  "score": 100,
  "hints": ["Check the cookies", "Look at the source code"],
  "context": {
    "instanceEntry": "http://challenge-instance.ctf.local:8080",
    "closeTime": "2026-03-15T12:30:00Z"
  },
  "attachments": [
    {
      "type": "Local",
      "url": "/files/challenges/abc123.zip"
    }
  ],
  "attempts": 3,
  "deadlineUtc": null,
  "submissionLimit": 0
}

Submit Flag

Submit a flag for a challenge.

POST /api/game//challenges/

Rate limited. Requires User authentication and game participation.
id
integer
required
Game ID
challengeId
integer
required
Challenge ID
flag
string
required
Flag answer (may require encryption, max 127 characters)
{
  "flag": "flag{example_flag_here}"
}
The response is the submission ID. Use the status endpoint to check if the flag is correct.

Check Submission Status

Query the status of a flag submission.

GET /api/game//challenges//status/

id
integer
required
Game ID
challengeId
integer
required
Challenge ID
submitId
integer
required
Submission ID from flag submission
status
string
Submission result: FlagSubmitted, Accepted, WrongAnswer, etc.
"Accepted"

Scoreboard

Get Scoreboard

Retrieve the game scoreboard.

GET /api/game//scoreboard

id
integer
required
Game ID
{
  "updateTimeUtc": "2026-03-15T14:30:00Z",
  "divisions": {},
  "challenges": [
    {
      "id": 1,
      "title": "Web Challenge",
      "category": "Web",
      "score": 100,
      "solvedCount": 45
    }
  ],
  "items": {
    "42": {
      "id": 42,
      "name": "Team Alpha",
      "avatar": "/assets/avatars/team42.jpg",
      "rank": 1,
      "score": 3500,
      "solvedCount": 18,
      "challenges": {
        "1": {
          "type": "FirstBlood",
          "score": 100,
          "submitTimeUtc": "2026-03-15T08:05:00Z"
        }
      }
    }
  }
}
Scoreboard data is cached and supports ETag headers for efficient updates.

Game Notices

Get Notices

Retrieve game announcements and notices.

GET /api/game//notices

id
integer
required
Game ID
count
integer
default:"100"
Number of notices to return (max 100)
skip
integer
default:"0"
Number of notices to skip
[
  {
    "id": 1,
    "type": "Normal",
    "values": ["Welcome to Spring CTF 2026!"],
    "publishTimeUtc": "2026-03-15T08:00:00Z"
  },
  {
    "id": 2,
    "type": "NewChallenge",
    "values": ["Crypto Master"],
    "publishTimeUtc": "2026-03-15T10:00:00Z"
  }
]

Writeups

Get Writeup Info

Retrieve writeup submission information.

GET /api/game//writeup

Requires User authentication and game participation.
{
  "submitted": true,
  "uploadTimeUtc": "2026-03-20T15:30:00Z",
  "fileSize": 2048576,
  "url": "/files/writeups/game1_team42.pdf"
}

Submit Writeup

Submit a post-game writeup (PDF only).

POST /api/game//writeup

Requires User authentication. Only PDF files up to 20MB accepted.
file
file
required
PDF writeup file

Monitor Endpoints

The following endpoints require Monitor or Admin permissions.

Get Game Events

GET /api/game//events

hideContainer
boolean
default:"false"
Hide container-related events
count
integer
default:"100"
Number of events (max 100)

Get Submissions

GET /api/game//submissions

type
string
Filter by answer result (e.g., Accepted, WrongAnswer)
count
integer
default:"100"
Number of submissions (max 100)

Download Scoreboard

GET /api/game//scoreboardsheet

Downloads an Excel file with complete scoreboard data.

Download Submissions

GET /api/game//submissionsheet

Downloads an Excel file with all game submissions.

Next Steps

Challenge API

Challenge management endpoints

Team API

Team operations

Build docs developers (and LLMs) love