Last Updated on : 2024-09-10 01:49:20
Query the list of devices available to a specified user, as well as device details, including device attributes and status.
GET: /v1.0/users/{uid}/devices
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
uid | String | uri | true | The user ID (UID). |
from | String | query | false | The source. Valid value:
|
page_no | Integer | query | false | The current page number. 1 means the first page. |
page_size | Integer | query | false | The number of entries returned on each page. |
Parameter name | Type | Description |
---|---|---|
result | List | The returned result. |
Description of result
Parameter name | Type | Description |
---|---|---|
id | String | The device ID. |
uuid | String | The universally unique identifier (UUID) of a specified device. |
uid | String | The user ID. |
biz_type | Integer | The business type of an application. |
name | String | The device name. |
time_zone | String | The time zone. |
ip | String | The IP address of a specified device. |
local_key | String | The secret key. |
sub | Boolean | Indicates whether it is a sub-device. Valid values:
|
create_time | Long | The time when the device was first paired. |
update_time | Long | The time when the device status was updated. |
active_time | Long | The time when the device was last paired. |
status | List | The status of a specified device feature. |
owner_id | String | The ID of the device owner. |
product_id | String | The product ID. |
product_name | String | The product name. |
category | String | The product category. |
icon | String | The icon of a specified device. |
online | Boolean | Indicates whether the device is online. Valid values:
|
Description of status
Parameter name | Type | Description |
---|---|---|
code | String | The code of a specified data point. |
value | Object | The value of a specified data point. |
GET: /v1.0/users/ay15***********/devices
GET /v1.0/users/ay15ay15***********/devices?page_no=0&page_size=50
{
"result": [
{
"sub": false,
"create_time": 1540691155,
"local_key": "11a53bdd67e4****",
"owner_id": "357****",
"ip": "**.62.43.**",
"biz_type": 293964,
"icon": "smart/product_icon/cz.png",
"time_zone": "+08:00",
"uuid": "27511006b4e62d4b****",
"product_name": "Wi-Fi Smart Metering Socket",
"active_time": 1548584422,
"uid": "ay1548569152777Q****",
"update_time": 1548584559,
"product_id": "EvolhYPyZNWYP***",
"name": "xxx Test",
"online": true,
"id": "27511006b4e62d4b****",
"category": "cz",
"status": [
{
"code": "cur_power",
"value": 0
},
{
"code": "cur_voltage",
"value": 2196
},
{
"code": "switch",
"value": false
},
{
"code": "countdown_1",
"value": 0
},
{
"code": "cur_current",
"value": 0
}
]
}
],
"t": 1564996327422,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback