小鹰开放平台设备管理文档v1.1.15

2.1.13、获取实时设备信息(仅开放平台新架构固件支持)

采用实时查询设备信息,必须保证设备在线才能查询成功,且密码必传

POSThttps://open.eye4cloud.com/{{open_id}}/open/v1/device/getRealtimeDeviceInfo
请求数据
字段名 类型 是否必填 备注
device_id string 是 设备id
timestamp int64 是 时间戳,单位:秒
nonce string 是 随机字符串,8~20个字符
sign string 是 具体实现方法,请参考《生成sign的示例代码》
imei string 否 设备IMEI,可传空字符串
data string 否 自定义data,可传空字符串
password string 是 设备密码
请求示例
JSON
{
    "device_id": "xxx",
    "timestamp": 1755685731,
    "nonce": "dask43hfad",
    "sign": "xxxxxxx",
    "password": ""
}
CURL请求示例
CURL
curl 'https://open.eye4cloud.com/xxxxx/open/v1/device/getRealtimeDeviceInfo' \
  -H 'Content-Type: application/json' \
  --data-raw '{
    "device_id": "xxx",
    "timestamp": 1757472185,
    "nonce": "",
    "sign": "",
    "password": ""
}'
返回数据
字段名 类型 备注
error_code int 状态码:0正常,其他异常
error_message string 错误信息:正常为success
data.iccid string 物联网卡号
data.net_mode int 网络模式:0x01有线,0x02 wifi,0x03移动,0x10 wifi+移动,0x11有线+wifi,0x12有线+移动,0x13有线+wifi+移动
data.power_mode int 0=长电,1=低功耗
data.sys_ver string 固件版本号
data.area int 大区

示例:

JSON
{
    "error_code": 0,
    "error_message": "success",
    "error_tips": "",
    "data": {
        "iccid": "",
        "net_mode": 2,
        "power_mode": 0,
        "sys_ver": "1.0.1.1",
        "area": 1
    }
}