Browse developer docs
List work records
GETagricultural-machinery-autopilot-report-list
Request
Send GET to /open/service with serviceName=agricultural-machinery-autopilot-report-list and the common signing parameters.
Send extra fields in the URL query
Filters are in milliseconds and apply to the work start time. Maximum page size is 100.
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-report-list' \
--url-query 'serialNumber=YOUR_AUTOPILOT_SN' \
--url-query 'beginDate=1788134400000' \
--url-query 'endDate=1788739200000' \
--url-query 'pageNo=1' \
--url-query 'pageSize=20' \
--url-query "appUid=$XAG_APP_UID" \
--url-query "timestamp=$timestamp" \
--url-query "token=$token"| Parameter | Requirement | Meaning |
|---|---|---|
serialNumber | Required | AutoPilot equipment serial number. |
beginDate | Required | Start of the query window in Unix milliseconds. |
endDate | Required | End of the query window in Unix milliseconds. |
pageNo | Required | Page number, starting at 1. |
pageSize | Required | Number of records per page. |
Response
data.records contains work intervals, area in square metres, travel distance in metres and duration in seconds. Status 2 indicates ended work.
Show example response fields and types
{
"success": "boolean",
"data": {
"records": [
{
"guid": "string",
"startTime": "number",
"endTime": "number",
"workArea": "number",
"workMileage": "number",
"workTime": "number",
"townName": "string",
"districtName": "string",
"provinceName": "string",
"cityName": "string",
"lng": "number",
"lat": "number",
"serialNumber": "string",
"status": "number"
}
],
"total": "number",
"size": "number",
"current": "number",
"orders": [],
"searchCount": "boolean",
"pages": "number"
},
"message": "string",
"status": "number"
}