List authorized devices
GETdevice-sn-list
Required service parametersNone
Optional pageIndex starts at 1 and pageSize defaults to 10. Read data.records[].sn and, for AutoPilot, extInfo.deviceId.
View operationDiscover the equipment granted to your XAG Open application.
Populate an integration’s equipment selector using the devices each owner has authorized. Store the serial and model label together, and refresh the list when ownership or access changes.
Compatibility. The returned list depends on the application and current device grants. Confirm that the target serial appears before requesting telemetry or history.
GET /open/service
serviceName=device-sn-list
Optional pageIndex starts at 1 and pageSize defaults to 10. Read data.records[].sn and, for AutoPilot, extInfo.deviceId.
Set XAG_APP_UID and XAG_APP_SECRET in your server environment. Substitute the sample IDs with authorized values.
# 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=device-sn-list' \
--url-query 'pageIndex=1' \
--url-query 'pageSize=20' \
--url-query "appUid=$XAG_APP_UID" \
--url-query "timestamp=$timestamp" \
--url-query "token=$token"{
"status": 200,
"data": {
"records": [
{
"sn": "EXAMPLE-SN",
"definitionName": "Example XAG model"
}
]
}
}All services use /open/service with the common signed query parameters. Additional fields are listed below. Open an operation for its parameters, examples and response notes.
GETdevice-sn-list
Required service parametersNone
Optional pageIndex starts at 1 and pageSize defaults to 10. Read data.records[].sn and, for AutoPilot, extInfo.deviceId.
View operation