Last Updated on : 2023-06-20 14:54:08download
Get a list of device information based on the specified criteria.
GET: /v1.0/expand/devices
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| request | DeviceQueryRequest | query | true | The request object of the device query. |
Description of request
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| project_id | String | true | The project ID. | |
| page_no | Integer | true | The current page number. | |
| page_size | Integer | true | The number of entries returned on each page. | |
| product_type | String | false | The category of a specified product. |
| Parameter name | Type | Description |
|---|---|---|
| result | PageResult | The returned result. |
Description of result
| Parameter name | Type | Description |
|---|---|---|
| list | List | The list of data. |
| total | Long | The total number of entries. |
| page_size | Integer | The number of entries returned on each page. |
| page_no | Integer | The current page number. |
Description of list
| Parameter name | Type | Description |
|---|---|---|
| project_id | String | The project ID. |
| device_id | String | The device ID. |
| cid | String | The unique device ID. |
| gateway_id | String | The gateway ID. |
| device_name | String | The device name. |
| device_ip | String | The IP address of a specified device. |
| mac_address | String | The MAC address of a specified device. |
| product_type | String | The category of a specified product. |
| product_id | String | The product ID. |
| supplier_code | String | The code of a specified supplier. |
| install_location | String | The location where the device is installed. |
| extend_data | String | The extended data. |
| active_status | String | Indicates whether the device is activated. Valid values:
|
| online_status | String | Indicates whether a device is online. Valid values:
|
| create_time | Long | The time when the device is created. |
| product_name | String | The product name. |
| supplier_name | String | The name of a specified supplier. |
| task_id | String | The ID of a specified construction task. |
GET: /v1.0/expand/devices?projectId=123****&pageNo=1&pageSize=20
{
"result": {
"page_no": 1,
"list": [
{
"device_id": "6ce****",
"create_time": 1591693362843,
"online_status": 1,
"gateway_id": "6c2****",
"install_location": "The east entrance of the community",
"device_ip": "192.***.16.111",
"uid": "ay1534****",
"device_name": "Access control at the east entrance of the community",
"product_type": "wf_znmj",
"extend_data": "{'pass':'123456','ip':'192.***.2.160','url':'http://192.***.2.160:8090'}",
"active_status": 1,
"project_id": "1356****",
"mac_address": "00-55-52-**-**-**",
"product_id": "0vbr****",
"supplier_code": "tuya",
"cid": "1207****"
}
],
"total": 100,
"page_size": 20
},
"t": 1551851043862,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback