|
For the latest stable version, please use Unifly Services v4.7! |
List Pilots Example
This example shows how to fetch the list of assignable pilots for a given UAS. Use one of the returned userUuid values as pilotUuid when creating an operation.
#!/bin/bash
API_KEY="your-api-key-here"
BASE_URL="https://portal.demo.unifly.tech/api/gcs"
SERIAL_NUMBER="your-drone-serial-number"
curl -X GET "${BASE_URL}/uas/${SERIAL_NUMBER}/pilots" -H "apikey: ${API_KEY}"
Example response:
[
{ "userUuid": "45bf1aef-20f4-4a46-9011-a4a1bf9b7f82", "name": "Alex Pilot" },
{ "userUuid": "9b7a9d1a-e2a1-4c0f-9e34-3c463a0b2e01", "name": "Sam Pilot" }
]