List Observers Example

This example shows how to fetch the list of assignable observers for a given UAS. Use the returned userUuid values in the observerUuids array 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}/observers" -H "apikey: ${API_KEY}"

Example response:

[
  { "userUuid": "b42d5c3e-bef2-44fb-9508-358fe8a2020a", "name": "Dan Observer" },
  { "userUuid": "b42d5c3e-bef2-44fb-9508-358fe8a2020b", "name": "Kaat Observer" }
]