Get flight details
Deprecated
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 Go to Settings -> Security and create a new API key. Use the generated key as the bearer token.
In: header
Path Parameters
The ID of the flight to retrieve.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/flight/get/0"{ "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" }}Export flights GET
**Deprecated:** This endpoint will be removed in the next major AirTrail release. Migrate to `GET /api/v1/flights/export`. Export an AirTrail backup visible to the authenticated API key. The JSON response matches the AirTrail import format. `scope=mine` requires `flight.export.own`. `scope=user` and `scope=all` require `flight.export.any`.
Create or update a flight POST
**Deprecated:** This endpoint will be removed in the next major AirTrail release. Migrate to `POST /api/v1/flights` for new flights or `PUT /api/v1/flights/{id}` for updates. Create a new flight or update an existing one. Creating a flight for the API-key user requires `flight.create.own`; creating one for other users requires `flight.create.any`. Updating follows the equivalent `flight.update.*` permissions. On an existing flight, adding, removing, or changing passengers requires the matching `flight.passengers.manage.*` permission.
