Obtain real-time aircraft status
GETuav-online-info
Read status, application jobs, individual flights, and tracks. Integrate prescriptions through the documented handoff.
Build an as-applied report. Retrieve completed jobs for an authorized aircraft, join the flights to the job, and use the tracks to compare actual coverage with the approved field boundary.
Compatibility. XAG Open lists P-series and other aircraft by endpoint. Confirm exact regional model and firmware support with XAG before promising compatibility. For personal data grants, the job and flight services require the account in country-code-and-phone format.
POST /open/service
serviceName=uav-protection-work-query
This sample covers a week using Unix seconds. Add the authorized account for a personal grant. Use the returned guid as work_guid in follow-up calls. A recorded end timestamp alone does not establish completion.
Set XAG_APP_UID and XAG_APP_SECRET in your server environment. Substitute the sample IDs with authorized values.
# 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 POST \
'https://open.xa.com/open/service' \
--url-query 'serviceName=uav-protection-work-query' \
--url-query "appUid=$XAG_APP_UID" \
--url-query "timestamp=$timestamp" \
--url-query "token=$token" \
--header 'Content-Type: application/json' \
--data '{
"sn": "YOUR_DRONE_SN",
"start_day": 1788134400,
"end_day": 1788739200,
"page_no": 1,
"page_size": 20
}'{
"status": 200,
"success": true,
"data": {
"total": 1,
"records": [
{
"guid": "example-job",
"sn": "EXAMPLE-SN",
"work_status": 1,
"is_prescription": 1
}
]
}
}All services use /open/service with the common signed query parameters. Additional fields are listed below. Open an operation for its parameters, examples and response notes.
GETuav-online-info
POSTuav-protection-work-query
Required service parameterssn, start_day, end_day, page_no, page_size
Use seconds for the date bounds. Start at page 1. Maximum page size is 100. Filter by work_status or is_prescription if needed.
View operationPOSTuav-protection-work-report
POSTuav-protection-work-sorties
POSTuav-protection-work-sorties-log
Required service parameterssn, work_guid, flight_id
Use the returned jc_id as flight_id.
View operationRequired service parameterssn, prescription_proto_str, prescription_name, prescription_guid, land_border, land_guid, land_name, prescription_type, prescription_img_str, data_type
Requires base64 protobuf, a base64 WebP, and WKT field geometry. The protobuf resolution is in centimetres. The outer data_type and inner protobuf dataType use different enumerations. Obtain the exact schema before serializing. API submission and XAG One’s native JSON upload use different formats.
View operation