Browse developer docs

Agricultural Drones

Read status, application jobs, individual flights, and tracks. Integrate prescriptions through the documented handoff.

Integration workflow

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.

  1. List application jobs
  2. guid → work_guidRead job details
  1. List application jobs
  2. guid → work_guidList job flights
  3. jc_id → flight_idRead flight track
The job GUID links job records to their flights. The sortie ID then identifies a flight track.

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.

XAG One prescription import guide

Query task list

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.

Request
# 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
}'
Illustrative response
{
  "status": 200,
  "success": true,
  "data": {
    "total": 1,
    "records": [
      {
        "guid": "example-job",
        "sn": "EXAMPLE-SN",
        "work_status": 1,
        "is_prescription": 1
      }
    ]
  }
}

Review request signing

Service reference

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.

Query task list

POSTuav-protection-work-query

Required service parameters
sn, 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 operation

Issue a prescription map task

POSTprescription-create

Changes state

Required service parameters
sn, 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
Location
Richmond Hill, Ontario, Canada