KongAir APIs

KongAir APIs

1.0.0OAS 3.1

Consolidated API specification for KongAir Flights, Bookings, and Routes services.

API Base URL
  • Server 1:https://api.kongair.dev

    KongAir API Dev

Security
ApiKeyAuth (apiKey)

An API key is a token that you provide when making API calls. Include the token in a header parameter called X-API-Key.

Example: X-API-Key: 123

BearerAuth (http)

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Health check endpoint for Flights service

Endpoint that returns the Flights service health status.

get
https://api.kongair.dev/flights/health

Response

application/json

Service is healthy

statusstring

Example:OK

get/flights/health
 
application/json

Get KongAir planned flights

Returns all the scheduled flights for a given day

get
https://api.kongair.dev/flights

Query Parameters

datestring(date)

Filter by date (defaults to current day)

Response

200 application/json

Successful response with scheduled flights

numberstringrequired
route_idstringrequired
scheduled_departurestring(date-time)required
scheduled_arrivalstring(date-time)required
get/flights
 
200 application/json

Create a new flight

Creates a new flight in the system.

post
https://api.kongair.dev/flights

Body

application/json

Flight details to create

Flight

numberstringrequired
route_idstringrequired
scheduled_departurestring(date-time)required
scheduled_arrivalstring(date-time)required

Response

201 application/json

Flight created successfully

Flight

numberstringrequired
route_idstringrequired
scheduled_departurestring(date-time)required
scheduled_arrivalstring(date-time)required
post/flights

Body

{ "number": "number", "route_id": "route_id", "scheduled_departure": "scheduled_departure", "scheduled_arrival": "scheduled_arrival" }
 
201 application/json

Get a specific flight by flight number

Returns a specific flight given its flight number

get
https://api.kongair.dev/flights/{flightNumber}

Path Parameters

flightNumberstringrequired

The flight number

Response

application/json

Successful response with the requested flight

Flight

numberstringrequired
route_idstringrequired
scheduled_departurestring(date-time)required
scheduled_arrivalstring(date-time)required
get/flights/{flightNumber}
 
application/json