Home / Docs Center / Platform API / Query Device Info

Query Device Info

Platform API · Self-hosted Cloud Integration

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" // 首页软件版本号
}

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

{
    version: ""    // 软件版本
    cloudVer: ""   // 云管理版本
    diskTotal: 10  // 磁盘总大小, 有存储卡时存在
    diskFree: 10   // 磁盘剩余大小, 有存储卡时存在
    cpu: 10        // cpu占用率
    mem: 10        // 内存占用率
    chs: 3         // 通道数
}

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

Remarks
- 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

productId is empty, read the Body JSON

Request

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

Content-Type: application/json

{
  "ids": ["SN001", "SN002", "SN003"],
  "info": "pause"
}
Parameters Location Type Required Description
t Query int64 Yes Timetamp
token Query string Yes Signature
ids Body string[] Yes List of Product Serial Numbers
info Body string No Custom Messages to Clients

Response

{
  "SN001": { "status": 1, ...客户端返回的原有字段... },
  "SN002": { "status": 0 },
  "SN003": { "code": 10001, "msg": "proxy offline", "status": 1 }
}
Field Type Description
{序列号} object map with a key number
{序列号}.status int32 1 = Online0 = Offline

Edge cases

Scenario Behaviour
ids contains an empty string Skip
Bobby, it's not legal, JSON 400 invalid json body
Client Offline Direct Return {"status": 0}, and no request is sent
Client online but returns non-json Pack As {"code": 10100, "msg": "...", "status": 1}
Client online but too low SDK version Pack As {"code": 10003, "msg": "version limit", "status": 1}
Offline on request Pack As {"code": 10002, "msg": "cloudc offline", "status": 1}

Example call (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"}'
Whether the equipment is online Not finding an answer in this document?
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.