Get the List of Sub-devices Newly Connected to the Gateway

Last Updated on : 2021-07-16 07:55:49download

Get the list of sub-devices that are newly connected to the gateway.

API address

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

Request parameter

Parameter name Type IN Required Description
device_id String uri true The ID of the gateway device.
discovery_time Long uri true The time when the gateway discovered the sub-device, which is accurate to seconds.

Return parameter

Parameter name Type Description
result List

Description of result

Parameter name Type Description
id String The device ID.
name String The device name.
online Boolean The online status of the device.
active_time Long The time when the device was activated.
update_time Long The time when the device status was updated.
product_id String The product ID of the device.
category String Category
node_id String The nodeId of the sub-device.
asset_id String The asset ID.
icon String The device icon.

Request example

GET: /v1.0/iot-03/device-registration/devices/xxxid/sub-devices?discovery_time=1566973348

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.