Start flight
POST
/api/v1/flights/start
const url = 'https://app.ayna.com/api/v1/flights/start';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"checklist_completed":true,"drone_id":"MAV-001","flight_type":"commercial","mission_id":"770e8400-e29b-41d4-a716-446655440002","pilot_id":"660e8400-e29b-41d4-a716-446655440001","purpose":"Aerial inspection","takeoff_altitude_msl_meters":50,"takeoff_latitude":37.7749,"takeoff_longitude":-122.4194}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.ayna.com/api/v1/flights/start \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "checklist_completed": true, "drone_id": "MAV-001", "flight_type": "commercial", "mission_id": "770e8400-e29b-41d4-a716-446655440002", "pilot_id": "660e8400-e29b-41d4-a716-446655440001", "purpose": "Aerial inspection", "takeoff_altitude_msl_meters": 50, "takeoff_latitude": 37.7749, "takeoff_longitude": -122.4194 }'Start a new flight.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
FlightStartRequest
Request to start a flight.
object
takeoff_latitude
required
Takeoff Latitude
Takeoff latitude
number
takeoff_longitude
required
Takeoff Longitude
Takeoff longitude
number
Example
{ "checklist_completed": true, "drone_id": "MAV-001", "flight_type": "commercial", "mission_id": "770e8400-e29b-41d4-a716-446655440002", "pilot_id": "660e8400-e29b-41d4-a716-446655440001", "purpose": "Aerial inspection", "takeoff_altitude_msl_meters": 50, "takeoff_latitude": 37.7749, "takeoff_longitude": -122.4194}Responses
Section titled “Responses”Created
Media typeapplication/json
Response
object
key
additional properties
any
Example generated
{}