APIFlight

Get flight details

Deprecated

GET
/flight/get/{id}

Deprecated: This endpoint will be removed in the next major AirTrail release. Migrate to GET /api/v1/flights/{id}. Get details of a specific flight by ID. A passenger requires flight.read.own; access to any flight requires flight.read.any.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Go to Settings -> Security and create a new API key. Use the generated key as the bearer token.

Path Parameters

id*number

The ID of the flight to retrieve.

Response Body

Flight details

application/json
  1. response
success?boolean
flight?
Example Request
curl -X GET 'https://your-instance.com/api/flight/get/0'
Example Response
{  "success": true,  "flight": {    "id": 0,    "from": {      "id": 0,      "icao": "string",      "iata": "string",      "name": "string",      "lat": 0.1,      "lon": 0.1,      "type": "large_airport",      "continent": "string",      "country": "string",      "tz": "string"    },    "to": {      "id": 0,      "icao": "string",      "iata": "string",      "name": "string",      "lat": 0.1,      "lon": 0.1,      "type": "large_airport",      "continent": "string",      "country": "string",      "tz": "string"    },    "departure": "string",    "arrival": "string",    "date": "string",    "datePrecision": "day",    "passengers": [      {        "id": 0,        "flightId": 0,        "userId": "string",        "guestName": "string",        "seat": "aisle",        "seatNumber": "string",        "seatClass": "economy",        "flightReason": "leisure"      }    ],    "airline": "string",    "flightNumber": "string",    "aircraft": "string",    "aircraftReg": "string",    "note": "string"  }}