获取设备列表
|功能说明 | 获取设备列表 | | ------------ | ------------ | | URL 地址 |https://cloudapi.usr.cn/usrCloud/dev/getDevs | |HTTPS 请求方式 | POST | 请求参数 | 参数英文名 |参数中文名 | 是否必须 | 备注 | | ------------ | ------------ | ------------ | ------------ | | token | token | true | 登录成功时返回的 token | | devid_interval | 查询某个编号段的设备 | no | from:开始的设备编号to:结束的设备编号 | |subAccount | 所属用户 |no |设备的所属用户 | | page_param |分页参数 | no |offset: 开始索引,从 0 开始 limit:从开始索引往下读取的记录条数 | | search_param |查询参数 | no |模糊查询 参数为 | | sort | 升序降序 |no |up:升序 down:降序 (两者不可共存) | | type |设备类型 |no |设备类型:<br/>0:默认设备<br/> 1:LoRa集中器 <br/> 2:CoAP/NB-IoT<br/> 3 :LoRa模块<br/> 4:网络io<br/> 6:LoRaWAN <br/> 7.电信 CoAP/NB-IoT <br/> 8.华为 CoAP/NB-IoT | | groupId | 设备分组id |no |用于获取某分组下的设备 | 示例 Request Body ```javascript { "devid_interval": { "from": "00000000000000000001", "to": "90000000000000000009" }, "page_param" : { "offset" :0, "limit" :2 }, "search_param":"00008381000000000302", "token":"eyJhIUzI1NiJ9.eyJzdWOTc4MDI2fQ.6NmtfC5hEPdRhXcxc..." } ``` Response Body: ```javascript { "data": { "dev": [ { "account": "toobug", "address": "山东省济南市历下区", "create_time": 1508394481, "customFields": "", "devid": "00008381000000000302", "groupId": 0,//设备分组id "id": 144242, "name": "test", "onlineStatus": 0, // 在线状态 0:离线 1:在线 "pass": "wfT1A9gc", // 通讯密码 "polling_interval": 300, //轮询间隔 "position": "117.02496707,36.68278473", "product_model": 0, "protocol": 0, //0:(Modbus RTU) 1:(Modbus TCP) 2:( TCP 透传) 3:(DL/T645-97) 4(DL/T645-07) 5(烟感协议) "type": 0,// 0:默认设备 1:LoRa集中器 2:CoAP/NB-IoT 3 :LoRa模块 4:网络io 5:扫码添加 6:LoRaWAN 7.电信 CoAP/NB-IoT "update_time": 1508394481, "weight": 1 }, { "account": "toobug", "address": "山东省济南市历下区", "create_time": 1508896526, "devid": "00008381000000000303", "groupId": 2, "id": 144604, "name": "TestSK", "onlineStatus": 0, // 在线状态 0:离线 1:在线 "pass": "wfT1A9gc", "polling_interval": 120, "position": "117.02496707,36.68278473", "product_model": 0, "protocol": 0, "type": 0, "update_time": 1509591273, "weight": 6 } ], "total": 700 }, "info": "ok", "status": 0 } ```