Query Zigbee devices under the gateway

Last Updated on : 2023-12-07 03:33:59download

You can get the list of Zigbee devices under the gateway through this API.

API address

GET: /v1.0/devices/{deviceId}/sub-devices

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueDevice ID

Return parameter

Parameter nameTypeDescription
resultListThe list of returned data.
successBooleanIndicates whether the operation is successful. Valid values:
  • true:The operation succeeded.
  • false:The operation failed.
tLongThe timestamp.
tidStringThe link ID.

Description of result

Parameter nameTypeDescription
active_timeLongThe time when the specified device is activated, which is accurate to seconds.
categoryStringThe product category of the specified device.
iconStringThe icon of the specified device.
idStringThe device ID.
nameStringThe name of the specified device.
node_idStringThe node ID
onlineBooleanIndicates whether the specified device is online.
owner_idStringThe ID of a specified home.
product_idStringThe product ID of the specified device.
update_timeLongThe time when the specified device is updated, which is accurate to seconds.

Request example

GET: /v1.0/devices/bf1c0dc3105a8bdac6****/sub-devices

Return example

{
    "tid": "e485a70a7dda1****3b2361f03176748",
    "result": [
        {
            "owner_id": "15909****",
            "icon": "smart/icon/ay1577096816804oP4lN/e6087b0d5e0dab90afc2749a785a****.png",
            "active_time": 1687503425,
            "update_time": 1698129548,
            "product_id": "03wv****",
            "name": "1OG-Büro-1 T1",
            "online": true,
            "id": "bf1c0dc3105a8bdac6****",
            "category": "wk",
            "node_id": "dc8e95fffe21****"
        }
    ],
    "t": 1699408958573,
    "success": true
}

Error code

For more information, see error code.