Skip to content

API overview

The AYNA API is a JSON REST API over HTTPS. It covers the same records as the app: aircraft, fleets, parts, maintenance, pilots, crew, missions, flights, checklists, rules, records, services, leads and your organization.

Base URL
https://app.ayna.com/api/v1/

Send a bearer token on every request:

Terminal window
curl https://app.ayna.com/api/v1/aircraft/ \
-H "Authorization: Bearer ak_your_api_key"

The token can be an API key, a short-lived access token or an OAuth token. See Authentication for how to get each one, and Connect an app to a pilot for apps a pilot signs into.

Successful responses wrap the result in data:

{
"success": true,
"data": {
"id": "a3f9c1d2-...",
"name": "Hawk-2"
}
}

See Errors for what failures look like.

List endpoints take limit and offset and return the page with its total:

Terminal window
curl "https://app.ayna.com/api/v1/flights/?limit=50&offset=100" \
-H "Authorization: Bearer $AYNA_TOKEN"
{
"success": true,
"data": {
"flights": [],
"total": 312,
"limit": 50,
"offset": 100
}
}

Most lists also take filters, such as aircraft_id, pilot_id or status. The API reference lists them per endpoint.

  • Aircraft, not drones. Use the /aircraft/ paths and aircraft_id fields. Older integrations may send drone_id or call /drones/; both still work as aliases.
  • An aircraft’s id is its MAVLink hardware ID. Aircraft are identified by the ID the autopilot reports, so a ground station can name the aircraft it is connected to without looking anything up. The /aircraft/{id} paths and flight start use it. Each aircraft also has a uuid, which POST /maintenance/ takes as aircraft_id. Other records use UUIDs.
  • Times are ISO 8601 in UTC. Distances and altitudes are in meters, speeds in meters per second.

Every write is recorded in the organization’s audit log with the actor behind the token: the user who owns the key, the pilot an app was paired with, or the user and app for an OAuth connection.