List devices
GET /clip/v2/resource/device
List devices known to the gateway. Results are returned in data.arr.
Narrow the results by category, join status, room, or serial number. Use cat1_id to include categories and cat1_id_not to exclude them: 1 for gateways, 2 for lights, 3 for sync devices, and 4 for accessories. Both filters accept comma-separated values.
Use ext_light or ext_room to include related light or room data. The full set of query parameters is listed below.
Parameters
| Field | Location | Type | Required | Description |
|---|---|---|---|---|
cat1_id | query | string | No | Device category IDs to include. Separate multiple values with commas. |
cat1_id_not | query | string | No | Device category IDs to exclude. Separate multiple values with commas. |
join_status | query | string | No | Whether the device has been added to the gateway service. |
room_uuid | query | string | No | Room UUID. |
sn | query | string[] | No | — |
ext_light | query | string | No | — |
ext_room | query | string | No | — |
ext_zigbee | query | string | No | — |
Example response
json
{
"code": 0,
"msg": "success",
"data": {
"arr": [
{
"id": "27968061-68C1-4538-83AF-88E390FD8933",
"type": "device",
"name": "Bar Lamp",
"join_status": 1,
"online": 1,
"has_new": 0,
"product": {
"cat1_id": 2,
"cat1_name": "Light",
"cat2_id": 205,
"cat2_name": "RGB CW Light",
"cat3_id": 20504,
"cat3_name": "Bar Lamp",
"manufacturer": "Bweetech",
"model": "915005988001",
"hardware_version": "6",
"software_version": "",
"zigbee_version": "4.8.8_46"
},
"services": [
{
"rid": "8C3C3D02-A008-44F2-9C6A-146705167EB3",
"rtype": "light"
}
]
}
]
}
}Responses
| Status code | Meaning |
|---|---|
| 200 | OK |
Response fields
HTTP 200 OK
| Field | Type | Required | Description |
|---|---|---|---|
code | integer | Yes | Result code. |
msg | string | Yes | Response message. |
data | object | Yes | Response payload. |
data.arr | DeviceDetail[] | Yes | Returned resources. |
data.arr[].id | string | Yes | Device UUID |
data.arr[].type | string | Yes | Always device. |
data.arr[].name | string | Yes | Name |
data.arr[].join_status | integer | Yes | Filter for join_status=1 to show devices the user has added. A value of 0 identifies a device that has not been selected. |
data.arr[].online | integer | Yes | 1 if online; 0 if offline. |
data.arr[].has_new | integer | Yes | 1 if an update is available; otherwise 0. |
data.arr[].product | object | Yes | Product information |
data.arr[].product.cat1_id | integer | Yes | Level 1 category ID. 1: gateway; 2: light; 3: sync device. |
data.arr[].product.cat1_name | string | Yes | Level 1 category name |
data.arr[].product.cat2_id | integer | Yes | Product category ID; for example, 203 for CW lights or 205 for RGBCW lights. |
data.arr[].product.cat2_name | string | Yes | Level 2 category name |
data.arr[].product.cat3_id | integer | Yes | Product-specific category ID; for example, 20504 for a Bar light. |
data.arr[].product.cat3_name | string | Yes | Level 3 category name |
data.arr[].product.manufacturer | string | Yes | Manufacturer reported by the Zigbee Basic cluster. |
data.arr[].product.model | string | Yes | Model reported by the Zigbee Basic cluster. |
data.arr[].product.hardware_version | string | Yes | Hardware version |
data.arr[].product.software_version | string | Yes | Software version |
data.arr[].product.zigbee_version | string | Yes | Zigbee version |
data.arr[].services | ResInfo[] | Yes | — |
data.arr[].services[].rid | string | Yes | Resource UUID |
data.arr[].services[].rtype | string | Yes | Resource type |