Browse developer docs

List irrigation scenes

POSTfarm-device-smart-list

Request

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

Send extra fields in the JSON body

Choose the documented scene type. The scene property schema depends on that type.

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-device-smart-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",
  "page_no": 1,
  "page_size": 20,
  "type": 1
}'
ParameterRequirementMeaning
org_idRequiredAuthorized farm or organization ID.
fs_snRequiredFarm server serial from farm-server-list.
page_noRequiredPage number, starting at 1.
page_sizeRequiredNumber of records per page.
typeRequiredTask or scene type. Inspection jobs accept auto, manual or favoritePoint. Smart Farm scene types are numeric.

Response

Use each scene id to retrieve its details. Keep the scene type with the record because it determines the property structure.

Show example response fields and types
{
  "status": "number",
  "success": "boolean",
  "data": [
    {
      "id": "string",
      "name": "string",
      "type": "number",
      "property": {},
      "create_time": "number",
      "modify_time": "number"
    }
  ],
  "message": "string"
}

All Smart Farm operations

Location
Richmond Hill, Ontario, Canada