Browse developer docs

Query sorties for a task

POSTuav-protection-work-sorties

Request

Send POST to /open/service with serviceName=uav-protection-work-sorties and the common signing parameters.

Send extra fields in the JSON body

Keep jc_id for the individual flight query.

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 POST \
  'https://open.xa.com/open/service' \
  --url-query 'serviceName=uav-protection-work-sorties' \
  --url-query "appUid=$XAG_APP_UID" \
  --url-query "timestamp=$timestamp" \
  --url-query "token=$token" \
  --header 'Content-Type: application/json' \
  --data '{
  "sn": "YOUR_DRONE_SN",
  "work_guid": "YOUR_JOB_GUID"
}'
ParameterRequirementMeaning
snRequiredAuthorized equipment serial number.
work_guidRequiredJob identifier returned as guid in the drone task list.
accountConditionalFor personal data authorization, provide the authorized account as country code, hyphen, then phone number.

Response

data is an array of flights associated with the job. Carry each jc_id forward as flight_id when requesting a track.

Show example response fields and types
{
  "success": "boolean",
  "data": [
    {
      "jc_id": "string",
      "start_time": "number",
      "end_time": "number",
      "complete_area_size": "number",
      "dosage": "number",
      "total_dosage": "number",
      "speed": "number",
      "height": "number",
      "work_width": "number",
      "batteryInfos": [
        {
          "sn": "string",
          "begin_soc": "number",
          "end_soc": "number"
        }
      ],
      "transport_total_mileage": "number",
      "transport_total_weight": "number",
      "transport_trips": "number",
      "transport_work_time": "number",
      "sling_reports": [
        {
          "sling_no": "number",
          "weight": "number",
          "loading_timestamp": "number",
          "unloading_timestamp": "number",
          "mileage": "number"
        }
      ]
    }
  ],
  "message": "string",
  "status": "number"
}

All Agricultural Drones operations

Location
Richmond Hill, Ontario, Canada