24Control API Interface

Complete documentation for the 24Control backend REST API, responsible for core simulation data, ATC operations, and the flight replay system.

Core Data Endpoints

GET /api/health
Retrieves the basic health status and uptime of the backend server. Useful for monitoring and load balancers.

Response

{
  "status": "ok",
  "uptime": 12345.67
}
GET /api/aircraft
Fetches the comprehensive current state of all tracked aircraft within the simulation, as well as any active operational alerts (e.g., conflicts, emergencies).

Response

{
  "aircraft": {
    "CALLSIGN1": {
      "altitude": 35000,
      "speed": 450,
      "heading": 270,
      "position": { "x": -500, "y": 1200 },
      // ...other properties
    }
  },
  "alerts": []
}
GET /api/flight-plans
Retrieves a deduplicated list of all currently active flight plans in the system. Ensures only one valid plan per callsign is returned.
GET /api/atis
Returns the parsed data for all currently active ATIS broadcasts across the simulation network, keyed by their respective airport ICAO codes.
GET /api/controllers
Provides a list of all currently active Air Traffic Controllers (ATC/GND/TWR/APP/CTR) online, including their monitored frequencies and assigned facilities.
GET /api/staffing
Fetches the real-time staffing monitor status, which tracks inbound/outbound volume vs active controller capacity to anticipate delays or workload bottlenecks.

Replay System Endpoints

POST /api/replay/start
Initiates a high-frequency (every 2s) state recording for a specific aircraft callsign.

Request Body (JSON)

  • callsign string (required) - The exact active callsign to begin tracking.
POST /api/replay/stop
Stops an active recording session for a specific callsign and finalizes the track data to memory/storage.

Request Body (JSON)

  • callsign string (required) - The callsign to stop tracking.
GET /api/replay/active
Retrieves a list of all aircraft callsigns that are currently being actively recorded by the replay system.
GET /api/replay/recording-status/:callsign
Check if a precise, single callsign is currently being recorded.

URL Parameters

  • callsign string - The callsign to query.

Response

{ "recording": true }
GET /api/replay/search
Search finalized historical flight recordings by callsign fragment. Useful for the search bar component.

Query Parameters

  • q string - The search query/callsign prefix to match.
GET /api/replay/popular
Returns the top 10 most historically viewed flight replays. Sorted descending by view count.
GET /api/replay/live/:callsign
Retrieves the partial up-to-the-second track data for a flight that is currently still in the air and actively recording.

URL Parameters

  • callsign string - The callsign currently being recorded.
GET /api/replay/:id
Fetches a finalized complete flight replay recording. Accessing this endpoint automatically increments the recording's total view count.

URL Parameters

  • id string - The unique identifier of the completed replay tracking run.

Analytics & Traffic Endpoints

GET /api/traffic/:icao
Retrieves aggregated traffic arrival/departure history metrics over a specified window for an airport.

URL Parameters

  • icao string - The 4-letter ICAO code of the airport.

Query Parameters

  • hours number (optional, default: 24) - The rolling lookback window in hours to analyze traffic.