Get Operation Example
Here’s a basic example of how to retrieve operation details using curl:
#!/bin/bash
# Base variables
API_KEY="your-api-key-here"
BASE_URL="https://portal.demo.unifly.tech/api/gcs"
SERIAL_NUMBER="your-drone-serial-number"
OPERATION_ID="your-operation-id"
# Get operation details
curl -X GET "${BASE_URL}/uas/${SERIAL_NUMBER}/operations/${OPERATION_ID}" \
-H "apikey: ${API_KEY}" \
-H "Content-Type: application/json" \
-v
The -v flag enables verbose output, showing the full HTTP request and response including headers.
|
Example response:
{
"type": "Feature",
"properties": {
"operationId": "OP_123456",
"operationStatus": "DRAFT",
"description": "Roof inspection at the train station",
"isInFlight": false,
"isAllowedToTakeOff": false,
"volume": {
"start": "2024-01-23T10:00:00Z",
"end": "2024-01-23T11:00:00Z",
"maxAltitude": 120
},
"geometry": {
"type": "Polygon",
"coordinates": [[
[4.401394, 51.217974],
[4.401394, 51.218974],
[4.402394, 51.218974],
[4.402394, 51.217974],
[4.401394, 51.217974]
]]
}
}
|
The response includes all operation details including: * Operation status * Time window * Operation area geometry * Take-off and landing markers * Current flight status |