组管理API-V1

创建新设备组

POST {host}/1.0/group

此功能用于创建新设备组,上限为50组。

Request Body

Name
Type
Description

name

string

自定义组名称

{
    "code": "0",
    "data": {
        "org_id": "1411841915123",
        "name": "test group22",
        "unique_name": "1B86514936880D18",
        "created": "1587690584174"
    }
}

请求示例

curl --request POST \
     --url '{host}/1.0/group' \
     --user '<username>:<password>' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --data '{"name":"device group name"}' \
     --include

获取设备组列表

GET {host}/1.0/lists/group

获取所有设备组

请求示例

获取设备组和组内的设备列表

GET {host}/1.0/lists/group/devices

获取所有的组以及每个组内的设备。 其中有一个默认组是虚拟组,他的group_unique_name为空。所有的设备绑定时如果未指定组,将会默认分配到默认组中,之后可以用户可以自由分配设备到其他组中。

请求示例

Last updated

Was this helpful?