Get Details of Custom Group

Last Updated on : 2023-06-21 07:13:00download

Get the details of a specified custom group, including the group type, number of devices, data points, and device groups.

API address

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

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
spaceIdStringbodytrueThe ID of a specified space.
groupPackageIdStringbodytrueThe ID of a specified custom group.

Return parameter

Parameter nameTypeDescription
typeintThe type of a device group. Valid values:
  • 1: empty group.
  • 2: standard group.
  • 3: combined group.
deviceNumintThe number of devices in the group.
dpsObjectThe list of data points.
joinedGroupsObject[]The device group that corresponding to a custom group.

Request example

GET: /v1.0/iot-02/lighting/groups/package
{
  "spaceId": "146886924268113****",
  "groupPackageId": "147566148209509****"
}

Return example

{
    "result": {
        "dps": {
            "scene_data": "",
            "colour_data": "",
            "countdown": "0",
            "temp_value": "0",
            "work_mode": "white",
            "control_data": "",
            "switch_led": "false",
            "bright_value": "10"
        },
        "type": 2,
        "deviceNum": 2,
        "topCategory": "",
        "name": "Custom Group 123467",
        "joinedGroups": [
            {
                "groupType": 0,
                "productId": "wobsckg5p6os****",
                "pv": "2.2",
                "masterDevId": "vdevo16393775054****",
                "type": 0,
                "deviceNum": 1,
                "masterNodeId": "",
                "name": "Custom Group 123467",
                "iconUrl": "https://****.com/smart/solution/228006/****.png",
                "id": 12089570,
                "category": "",
                "localKey": "91a880b8d582****"
            },
            {
                "groupType": 0,
                "productId": "sxa3tjzapeal****",
                "pv": "2.2",
                "masterDevId": "vdevo16393774893****",
                "type": 0,
                "deviceNum": 1,
                "masterNodeId": "",
                "name": "Custom Group 123467",
                "iconUrl": "https://****com/smart/solution/228006/****.png",
                "id": 12089569,
                "category": "",
                "localKey": "e0baec104397****"
            }
        ],
        "groupPackageId": "147566148209509****"
    },
    "t": 1640660096688,
    "success": true
}

Error code

For more information, see error code.