Browse developer docs

Discover farm servers

POSTfarm-server-list

Request

Send POST to /open/service with serviceName=farm-server-list and the common signing parameters.

Send extra fields in the JSON body

Use deviceSn from the result as fs_sn.

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-server-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"
}'
ParameterRequirementMeaning
org_idRequiredAuthorized farm or organization ID.

Response

Use deviceSn from the farm server record as fs_sn when listing connected equipment.

Show example response fields and types
{
  "status": "number",
  "success": "boolean",
  "message": "string",
  "data": {
    "deviceId": "string",
    "deviceSn": "string"
  }
}

All Smart Farm operations

Location
Richmond Hill, Ontario, Canada