Browse developer docs

Read an irrigation scene

POSTfarm-device-smart-detail

Request

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

Send extra fields in the JSON body

Use the ID from the scene list.

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-detail' \
  --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",
  "id": "YOUR_SCENE_ID"
}'
ParameterRequirementMeaning
org_idRequiredAuthorized farm or organization ID.
fs_snRequiredFarm server serial from farm-server-list.
idRequiredScene ID from the scene list.

Response

The scene type governs the returned property fields, including irrigation state.

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

All Smart Farm operations

Location
Richmond Hill, Ontario, Canada