Browse developer docs
Read farm facilities
POSTfarm-info-list
Request
Send POST to /open/service with serviceName=farm-info-list and the common signing parameters.
Send extra fields in the JSON body
The default module list is ["facility"]. Optional time bounds are seconds.
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=farm-info-list' \
--url-query "appUid=$XAG_APP_UID" \
--url-query "timestamp=$timestamp" \
--url-query "token=$token" \
--header 'Content-Type: application/json' \
--data '{
"org_id": "YOUR_FARM_ID",
"fs_sn": "YOUR_FARM_SERVER_SN",
"modules": [
"facility"
]
}'| Parameter | Requirement | Meaning |
|---|---|---|
org_id | Required | Authorized farm or organization ID. |
fs_sn | Required | Farm server serial from farm-server-list. |
startTime | Optional | Start of the query window. Use seconds for farm facilities and milliseconds for legacy rover runs or aerial surveys. |
endTime | Optional | End of the query window. Use seconds for farm facilities and milliseconds for legacy rover runs or aerial surveys. |
modules | Required | List of facility modules. The usual value is ["facility"]. |
Response
Use the facility records to build a farm or equipment grouping in your own application.
Show example response fields and types
{
"status": "number",
"success": "boolean",
"message": "string",
"data": [
{
"modules": "string",
"data": [
{
"id": "string"
}
]
}
]
}