APIFlight

Export flights

Deprecated

GET
/flight/export

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.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Query Parameters

format?string

The backup format to return.

Default"json"
Value in"json""yaml""yml"
scope?string

Which flights to export. mine is the default. user and all require flight.export.any.

Default"mine"
Value in"mine""user""all"
userId?string

The user ID whose flights should be exported when scope=user.

Response Body

An AirTrail backup export

  1. response

AirTrail backup export. The JSON representation can be imported using the AirTrail importer.

users?array<>
flights?array<>
Example Request
curl -X GET 'https://your-instance.com/api/flight/export'
Example Response
{  "users": [    {      "id": "string",      "displayName": "string",      "username": "string"    }  ],  "flights": [    {}  ]}