更新时间:2023-12-07 03:33:56下载pdf
本文介绍获取设备列表 v2的 API。
批量获取设备列表。
GET: /v2.0/devices
参数名 | 类型 | 参数位置 | 是否必填 | 说明 |
---|---|---|---|---|
device_ids | String | query | false | 设备 ID 列表,多个 ID 以半角逗号分隔 |
product_id | String | query | false | 产品 ID |
schema | String | query | false | App 应用标识 |
last_row_key | String | query | false | 前一页返回的页面标识符 |
size | Integer | query | true | 每页返回设备数量 |
start_update_time | Long | query | false | 根据设备的开始时间戳 update_time 查询(10 位) |
end_update_time | Long | query | false | 根据设备的结束时间戳 update_time 查询(10 位) |
参数名 | 类型 | 说明 |
---|---|---|
result | Obj | 响应结果 |
result
说明
参数名 | 类型 | 说明 |
---|---|---|
has_more | Boolean | 是否有下一页 |
last_row_key | String | 分页标识 |
total | Long | 总数 |
devices | List | 设备列表 |
last_id | String | 设备最后查询 ID |
GET: /v2.0/devices?schema=testApp&last_row_key=xxxxx&size=20&start_update_time=13612321311&end_update_time=136123333223
{
"result": {
"devices": [
{
"active_time": 1636597097,
"biz_type": 0,
"category": "qt",
"create_time": 1636597097,
"icon": "",
"id": "6cf729298c4953e0f4****",
"ip": "",
"lat": "",
"local_key": "115f466ea559****",
"lon": "",
"model": "",
"name": "rbncbnrw3jpetcxm",
"online": false,
"owner_id": "4367****",
"product_id": "rbncbnrw3jpe****
"product_name": "我的空调(linkSDK三方设备)",
"status": [],
"sub": false,
"time_zone": "+08:00",
"uid": "bay1596435936771****",
"update_time": 1638863657,
"uuid": "tuyac11429d49505****"
},
{
"active_time": 1636617682,
"biz_type": 0,
"category": "qt",
"create_time": 1636617682,
"icon": "",
"id": "6cb4bd90f6cd6aba7c****",
"ip": "",
"lat": "",
"local_key": "c9f4c26a287a****",
"lon": "",
"model": "",
"name": "rbncbnrw3jpetcxm",
"online": false,
"owner_id": "43476130",
"product_id": "rbncbnrw3jpe****",
"product_name": "我的空调(linkSDK三方设备)",
"status": [],
"sub": false,
"time_zone": "+08:00",
"uid": "bay1596435936771****",
"update_time": 1636646347,
"uuid": "tuyae20f18249382****"
},
{
"active_time": 1636355230,
"biz_type": 0,
"category": "qt",
"create_time": 1636355230,
"icon": "",
"id": "6c871e364de7ace1a3****",
"ip": "",
"lat": "",
"local_key": "6de4c80dc2df****",
"lon": "",
"model": "",
"name": "rbncbnrw3jpetcxm",
"online": false,
"owner_id": "43476130",
"product_id": "rbncbnrw3jpe****",
"product_name": "我的空调(linkSDK三方设备)",
"status": [],
"sub": false,
"time_zone": "+08:00",
"uid": "bay1596435936771****",
"update_time": 1636613296,
"uuid": "tuyaa4be35dced28****"
},
{
"active_time": 1636342515,
"biz_type": 0,
"category": "qt",
"create_time": 1636342515,
"icon": "",
"id": "6c553a86446124dbba****",
"ip": "",
"lat": "",
"local_key": "54cc0b2d80d6****",
"lon": "",
"model": "",
"name": "rbncbnrw3jpetcxm",
"online": false,
"owner_id": "4347****",
"product_id": "rbncbnrw3jpe****",
"product_name": "我的空调(linkSDK三方设备)",
"status": [],
"sub": false,
"time_zone": "+08:00",
"uid": "bay1596435936771****",
"update_time": 1636447374,
"uuid": "tuya5411f0ba06aa****"
},
{
"active_time": 1636342529,
"biz_type": 0,
"category": "qt",
"create_time": 1636342529,
"icon": "",
"id": "6c2fcb04a323b4fdfc****",
"ip": "",
"lat": "",
"local_key": "f5fbd1c2143d****",
"lon": "",
"model": "",
"name": "rbncbnrw3jpetcxm",
"online": false,
"owner_id": "4347****",
"product_id": "rbncbnrw3jpe****",
"product_name": "我的空调(linkSDK三方设备)",
"status": [],
"sub": false,
"time_zone": "+08:00",
"uid": "bay1596435936771****",
"update_time": 1636444084,
"uuid": "tuya8f365a78ffd7****"
}
],
"has_more": false,
"last_row_key": "A1B5D44724D34F879E33595E2771CB41",
"total": 5
},
"success": true,
"t": 1651904922248,
"tid": "f0580568cdce11ecaac3bac49edea25c"
}
参考 错误码。
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈