简体中文
简体中文
English
联系我们
注册
登录
layout空间导航

获取自定义群组列表

更新时间:2022-09-07 08:38:02下载pdf

本文介绍获取自定义群组列表的 API。

接口描述

获取空间下的自定义群组列表,包括群组信息和设备信息。

接口地址

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

请求参数

body 说明

参数名类型参数位置是否必填说明
spaceIdsString[]bodytrue空间 ID 列表
pageintbodytrue页码
pageSizeintbodytrue每页条目数

返回参数

参数名类型说明
totalint总数
listGroupPackageSaasCVO[]自定义群组信息

请求示例

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

返回示例

{
    "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": "自定义群组123467",
                "joinedGroups": [
                    {
                        "groupType": 0,
                        "productId": "wobsckg5p6os****",
                        "pv": "2.2",
                        "masterDevId": "vdevo16393775054****",
                        "type": 0,
                        "deviceNum": 1,
                        "masterNodeId": "",
                        "name": "自定义群组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": "自定义群组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": "自定义群组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": "自定义群组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": "自定义群组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": "自定义群组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": "自定义群组2",
                "joinedGroups": [
                    {
                        "groupType": 0,
                        "productId": "wobsckg5p6os****",
                        "pv": "2.2",
                        "masterDevId": "vdevo16393775054****",
                        "type": 0,
                        "deviceNum": 1,
                        "masterNodeId": "",
                        "name": "自定义群组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": "自定义群组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": "自定义群组2",
                        "iconUrl": "https://****.com/smart/solution/228006/****.png",
                        "id": 12059214,
                        "category": "",
                        "localKey": "d87b29963070****"
                    }
                ],
                "groupPackageId": "147028727037533****"
            }
        ],
        "total": 6
    },
    "t": 1640660599891,
    "success": true
}

错误码

参考 错误码