Get List of Devices to be Grouped

Last Updated on : 2023-06-15 06:09:35

Get a list of devices that can be added to a group in a specified space. You can filter them by level-1 categories.

API address

GET: /v1.0/iot-02/lighting/groups/package/devices

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
spaceIdStringbodytrueThe ID of a specified space.
topCategoryCodeStringbodyfalseThe level-1 category. Valid values:
  • dgzm
  • zm
  • djd
  • xjd
  • cfdq
  • jjaf
  • hjjk
  • sxj
  • wgzk
  • jnny
  • jyyl
  • gny
  • qt

Return parameter

Parameter nameTypeDescription
deviceIdStringThe device ID.
deviceNameStringThe name of a specified device.
topCategoryCodeStringThe level-1 category of this product.
secondCategoryStringThe level-2 category of this product.
thirdCategoryStringThe level-3 category of this product.
capabilitylongThe device capability.
devicePowerdoubleThe device power.
installTimelongThe time when a specified device is installed.
activeTimelongThe time when a specified device is active.
productIdStringThe product ID.
spaceIdStringThe ID of a specified space to which the device belongs.
spaceNameStringThe name of a specified space.
pointIdStringThe location ID of a specified device.
ownerIdStringThe ID of a specified home group to which the device belongs.
iconStringThe device icon.
uuidStringThe universally unique identifier (UUID) of a specified device.
uidStringThe user ID.
modelStringThe product model.
macStringThe MAC address.
dpsObject[]The list of data points.
deviceExtObjectThe extension information.

Request example

GET: /v1.0/iot-02/lighting/groups/package/devices
{
  "spaceId": "1468869242681139***",
  "topCategoryCode": "zm"
}

Return example

{
    "result": [
        {
            "thirdCategory": "wf_ble_xdd",
            "productId": "sxa3tjzapeal****",
            "secondCategory": "xdd",
            "dps": [
            ],
            "installTime": 1639377489574,
            "ownerId": "4536****",
            "deviceId": "vdevo16393774893****",
            "deviceName": "Bedside Light",
            "spaceId": "146886924268113****",
            "pointId": "147028651497700****",
            "topCategoryCode": "zm",
            "devicePower": 0
        },
        {
            "thirdCategory": "wf_ble_xdd",
            "productId": "wobsckg5p6os****",
            "secondCategory": "xdd",
            "dps": [
            ],
            "installTime": 1639377505821,
            "ownerId": "4536****",
            "deviceId": "vdevo16393775054****",
            "deviceName": "Light 1-vdevo",
            "spaceId": "146886924268113****",
            "pointId": "147028651497700****",
            "topCategoryCode": "zm",
            "devicePower": 0
        },
        {
            "thirdCategory": "wf_ble_xdd",
            "productId": "1uqqknvmyljd****",
            "secondCategory": "xdd",
            "dps": [
            ],
            "installTime": 1639378351108,
            "ownerId": "4536****",
            "deviceId": "vdevo16393783507****",
            "deviceName": "Light 3-vdevo",
            "spaceId": "14688692426811****",
            "pointId": "14702865149770****",
            "topCategoryCode": "zm",
            "devicePower": 0
        }
    ],
    "t": 1640662390741,
    "success": true
}

Error code

For more information, see error code.