Browse developer docs
Read rover status
GETcar-online-info
Request
Send GET to /open/service with serviceName=car-online-info and the common signing parameters.
Send extra fields in the URL query
Match the spelling and case of deviceSn.
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 GET \
'https://open.xa.com/open/service' \
--url-query 'serviceName=car-online-info' \
--url-query 'deviceSn=YOUR_ROVER_SN' \
--url-query "appUid=$XAG_APP_UID" \
--url-query "timestamp=$timestamp" \
--url-query "token=$token"| Parameter | Requirement | Meaning |
|---|---|---|
deviceSn | Required | Authorized rover serial number. |
Response
Current rover status and position when available. Keep the freshness of the reading visible in your application.
Show example response fields and types
{
"status": "number",
"data": {
"device_name": "string",
"device_model": "string",
"device_sn": "string",
"device_id": "string",
"online_status": "string",
"online_at": "number",
"update_at": "number",
"latitude": "number",
"longitude": "number",
"altitude": "number",
"heading": "number",
"speed": "number",
"battery_soc": "number",
"task_state": "number",
"actuator": {
"type": "number",
"container": "number",
"flow_rate": "number",
"power": "number",
"height": "number"
},
"rtk_status": "number",
"control_source": "string",
"mounts": [
{}
]
}
}