Browse developer docs
Read historical tracks
GETagricultural-machinery-autopilot-location-log
Request
Send GET to /open/service with serviceName=agricultural-machinery-autopilot-location-log and the common signing parameters.
Send extra fields in the URL query
Use millisecond bounds no more than two hours apart.
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=agricultural-machinery-autopilot-location-log' \
--url-query 'sn=YOUR_AUTOPILOT_SN' \
--url-query 'deviceID=YOUR_AUTOPILOT_DEVICE_ID' \
--url-query 'recordStart=1788200000000' \
--url-query 'recordEnd=1788203600000' \
--url-query "appUid=$XAG_APP_UID" \
--url-query "timestamp=$timestamp" \
--url-query "token=$token"| Parameter | Requirement | Meaning |
|---|---|---|
sn | Required | Authorized equipment serial number. |
deviceID | Required | AutoPilot device ID from the authorized device list. |
recordStart | Required | Start of the track in Unix milliseconds. |
recordEnd | Required | End of the track in Unix milliseconds. |
Response
data.log contains the historical position samples. For a longer job, request individual windows and merge their tracks by timestamp.
Show example response fields and types
{
"status": "number",
"data": {
"log": [
{
"speed": "number",
"timestamp": "number",
"tps_longitude": "number",
"tps_latitude": "number"
}
]
}
}