Browse developer docs
Obtain real-time aircraft status
GETuav-online-info
Request
Send GET to /open/service with serviceName=uav-online-info and the common signing parameters.
Send extra fields in the URL query
Use the serial from the authorized device list.
Request example
# Requires curl 7.87+, Python 3 and OpenSSL.
: "${XAG_APP_UID:?Set XAG_APP_UID}"
: "${XAG_APP_SECRET:?Set XAG_APP_SECRET}"
timestamp=$(python3 -c 'import time; print(time.time_ns() // 1000000)')
token=$(printf "%s" "$XAG_APP_UID$timestamp$XAG_APP_SECRET" | openssl dgst -sha1 -r | cut -d " " -f 1)
curl --silent --show-error --fail-with-body --max-time 30 --request GET \
'https://open.xa.com/open/service' \
--url-query 'serviceName=uav-online-info' \
--url-query 'deviceSN=YOUR_DRONE_SN' \
--url-query "appUid=$XAG_APP_UID" \
--url-query "timestamp=$timestamp" \
--url-query "token=$token"| Parameter | Requirement | Meaning |
|---|---|---|
deviceSN | Required | Authorized aircraft serial number. |
Response
data.status distinguishes inactive (0), online (1) and offline (2). Location can be absent. Treat missing position as unavailable in fleet views.
Show example response fields and types
{
"status": "number",
"data": {
"SN": "string",
"typeName": "string",
"status": "number",
"capacity": "number",
"speed": "number",
"signal_strength": "number",
"location": {
"altitude": "number",
"height": "number",
"latitude": "number",
"longitude": "number"
}
}
}