APIFlights

Replace a flight track

PUT
/api/v1/flights/{id}/track

Authorization

bearerAuth tracks.write, flight.update.own
headerAuthorizationBearer <API key or OAuth 2.1 access token>

Send Authorization: Bearer <credential>. Create API keys in AirTrail Security settings. OAuth clients use authorization code with PKCE S256 and a resource identifier matching /api/v1.

Scope: tracks.write, flight.update.own

Path Parameters

id*integer

Flight ID.

Range1 <= value

Request Body

application/json
  1. body
coordinates*array<array<number>>
Items2 <= items <= 100000
sourceFormat*string
Value in"gpx""kml""csv""readsb"
sourceName?|
Lengthlength <= 255
times?array<integer>
groundSpeedKt?array<number>
trackDeg?array<number>
ground?array<boolean>
estimated?array<boolean>

Response Body

Saved track.

application/json
  1. response
data*|null
Example Request
curl -X PUT 'https://your-instance.example/api/v1/flights/1/track' \  -H 'Content-Type: application/json' \  -d '{  "coordinates": [    [      0,      0    ],    [      0,      0    ]  ],  "sourceFormat": "gpx"}'
Example Response
{  "data": {    "coordinates": [      [        0,        0      ],      [        0,        0      ]    ],    "sourceFormat": "gpx",    "sourceName": "string",    "times": [      0    ],    "groundSpeedKt": [      0    ],    "trackDeg": [      0    ],    "ground": [      true    ],    "estimated": [      true    ],    "flightId": 0,    "pointCount": 0,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}