Home / Docs Center / Platform API / Query Device Info

Query Device Info

Platform API · Self-hosted Cloud Integration

Project: Platform API | page_id: 163

Request Data
- /product/info

Parameter Description Type Required Additional Notes
productId Device serial number String Y
info Information to query String Y Optional parameters: "soft-version", "base-info"
token Signature string String Y
t Current timestamp Number Y Unit: seconds

Response JSON when info == "soft-version":

{
    version: "Jan 21 2021/11:48:01" // software version on the home page
}

Response JSON when info == "base-info":

{
    version: ""    // software version
    cloudVer: ""   // cloud management version
    diskTotal: 10  // total disk size, present when a memory card is installed
    diskFree: 10   // free disk size, present when a memory card is installed
    cpu: 10        // CPU usage
    mem: 10        // memory usage
    chs: 3         // number of channels
}

Response Parameter Description

Parameter Type Description
version String Device software version
cloudVer String Cloud management software version
diskTotal Number Total disk size, present when a memory card is installed
diskFree Number Free disk size, present when a memory card is installed
cpu Number CPU usage
mem Number Memory usage
chs Number Number of channels
code Number Error code, present on failure
msg String Error message

Notes
- This API supports only one request at a time.

Response Error Code (code) Reference Table

Error code Description
10001 Device offline
10002 Device not running normally
10003 Cloud management version too low, this API is not supported
10004 Requests too frequent
10005 Device busy, no response
Others Device exception or request parameter error

2. Batch Query

When productId is empty, the Body JSON is read.

Request

POST /third/product/info?t=1750262400&token=abc123

Content-Type: application/json

{
  "ids": ["SN001", "SN002", "SN003"],
  "info": "pause"
}
Parameter Location Type Required Description
t Query int64 Yes Timestamp
token Query string Yes Signature
ids Body string[] Yes List of product serial numbers
info Body string No Custom information transparently passed to each client

Response

{
  "SN001": { "status": 1, ...original fields returned by the client... },
  "SN002": { "status": 0 },
  "SN003": { "code": 10001, "msg": "proxy offline", "status": 1 }
}
Field Type Description
{serial number} object A map keyed by serial number
{serial number}.status int32 1 = online, 0 = offline

Edge Cases

Scenario Behavior
ids contains an empty string Skipped
Body is not valid JSON 400 invalid json body
Client offline Returns {"status": 0} directly without initiating a request
Client online but returns non-JSON Wrapped as {"code": 10100, "msg": "...", "status": 1}
Client online but SDK version too low Wrapped as {"code": 10003, "msg": "version limit", "status": 1}
Offline at request time Wrapped as {"code": 10002, "msg": "cloudc offline", "status": 1}

Call Example (curl)

Batch query:

TIMESTAMP=$(date +%s)
# token = MD5("info=pause&secret=${SECRET}&t=${TIMESTAMP}")

curl -X POST \
  "http://host:port/third/product/info?t=${TIMESTAMP}&token=${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"ids":["SN001","SN002","SN003"],"info":"pause"}'
Didn't find what you need?Contact us,Talk to our engineers directly.

Request a Quote

Fill in the form and we will get back with a quote and proposal within 1 business day.

Click "Generate inquiry email" to open your mail client with the body pre-filled. If no mail client is configured, click "Copy" and paste it into webmail — recipient: sunshiyang@xstrive.com.