Get the list of sub-devices

Last Updated on : 2023-06-20 15:18:08download

Get the list of sub-devices of a specified device.

API address

GET: /v1.0/iot-03/devices/{device_id}/sub-devices

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueGateway device ID

Return parameter

Parameter nameTypeDescription

Description of result

Parameter nameTypeDescription
idStringDevice ID
nameStringDevice name
onlineBooleanOnline status of the device
active_timeLongThe time when the device is activated
update_timeLongThe time when the device status is updated
product_idStringProduct ID of the device
node_idStringThe nodeId of the sub-device
asset_idStringAsset ID
iconStringDevice icon

Request example

GET: /v1.0/iot-03/devices/xxxid/sub-devices

Return example

    "result": [
            "asset_id": "******",
            "active_time": 1566973357,
            "update_time": 1566973363,
            "product_id": "tob46aoq******",
            "name": "Smoke detector",
            "online": true,
            "id": "xxxxx",
            "category": "ywbj"
    "t": 1591872112140,
    "success": true

Error code

For more information, see error code.