Get Custom Group List

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

Get a list of custom groups in the space, including the group information and devices in the group.

API address

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

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
spaceIdsString[]bodytrueThe list of space IDs.
pageintbodytrueThe page number.
pageSizeintbodytrueThe number of items returned per page.

Return parameter

Parameter nameTypeDescription
totalintThe total number of items.
listGroupPackageSaasCVO[]The details of a custom group.

Request example

GET: /v1.0/iot-02/lighting/groups/packages
{
  "spaceIds": [
    "1468869242681139200"
  ],
  "page": 1,
  "pageSize": 12
}

Return example

{
    "result": {
        "list": [
            {
                "dps": {
                    "scene_data": "",
                    "colour_data": "000003e803e8",
                    "temp_value": 0,
                    "work_mode": "white",
                    "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": "1208****",
                        "category": "",
                        "localKey": "e0baec104397****"
                    }
                ],
                "groupPackageId": "14756614820950****"
            },
            {
                "dps": {
                    "scene_data": "",
                    "colour_data": "000003e803e8",
                    "temp_value": 0,
                    "work_mode": "white",
                    "switch_led": false,
                    "bright_value": 10
                },
                "type": 1,
                "deviceNum": 0,
                "topCategory": "",
                "name": "Custom Group 12346",
                "joinedGroups": [
                ],
                "groupPackageId": "147566070567908****"
            },
            {
                "dps": {
                    "scene_data": "",
                    "colour_data": "000003e803e8",
                    "temp_value": 0,
                    "work_mode": "white",
                    "switch_led": false,
                    "bright_value": 10
                },
                "type": 1,
                "deviceNum": 0,
                "topCategory": "",
                "name": "Custom Group 1234",
                "joinedGroups": [
                ],
                "groupPackageId": "147566045960766****"
            },
            {
                "dps": {
                    "scene_data": "",
                    "colour_data": "000003e803e8",
                    "temp_value": 0,
                    "work_mode": "white",
                    "switch_led": false,
                    "bright_value": 10
                },
                "type": 1,
                "deviceNum": 0,
                "topCategory": "",
                "name": "Custom Group 123456",
                "joinedGroups": [
                ],
                "groupPackageId": "147564952996027****"
            },
            {
                "dps": {
                    "scene_data": "",
                    "colour_data": "000003e803e8",
                    "temp_value": 0,
                    "work_mode": "white",
                    "switch_led": false,
                    "bright_value": 10
                },
                "type": 1,
                "deviceNum": 0,
                "topCategory": "",
                "name": "Custom Group 123",
                "joinedGroups": [
                ],
                "groupPackageId": "147543484899370****"
            },
            {
                "dps": {
                    "scene_data": "",
                    "colour_data": "000003e803e8",
                    "temp_value": 0,
                    "work_mode": "white",
                    "switch_led": true,
                    "bright_value": 10
                },
                "type": 2,
                "deviceNum": 3,
                "topCategory": "",
                "name": "Custom Group 2",
                "joinedGroups": [
                    {
                        "groupType": 0,
                        "productId": "wobsckg5p6os****",
                        "pv": "2.2",
                        "masterDevId": "vdevo16393775054****",
                        "type": 0,
                        "deviceNum": 1,
                        "masterNodeId": "",
                        "name": "Custom Group 2",
                        "iconUrl": "https://****.com/smart/solution/228006/****.png",
                        "id": 12059216,
                        "category": "",
                        "localKey": "14daa3ac9f75****"
                    },
                    {
                        "groupType": 0,
                        "productId": "sxa3tjzapeal****",
                        "pv": "2.2",
                        "masterDevId": "vdevo16393774893****",
                        "type": 0,
                        "deviceNum": 1,
                        "masterNodeId": "",
                        "name": "Custom Group 2",
                        "iconUrl": "https://****.com/smart/solution/228006/****.png",
                        "id": 12059215,
                        "category": "",
                        "localKey": "e1281eb963f1****"
                    },
                    {
                        "groupType": 0,
                        "productId": "1uqqknvmyljd****",
                        "pv": "2.2",
                        "masterDevId": "vdevo16393783507****",
                        "type": 0,
                        "deviceNum": 1,
                        "masterNodeId": "",
                        "name": "Custom Group 2",
                        "iconUrl": "https://****.com/smart/solution/228006/****.png",
                        "id": 12059214,
                        "category": "",
                        "localKey": "d87b29963070****"
                    }
                ],
                "groupPackageId": "147028727037533****"
            }
        ],
        "total": 6
    },
    "t": 1640660599891,
    "success": true
}

Error code

For more information, see error code.