| 设备组管理是指在一个产品中对设备组进行管理,包括获取设备组树形结构、创建设备组、删除设备组、获取设备组下的设备列表等操作。 调试接口的请求类型为GET,请求地址为http://enterpriseapi.gizwits.com/v1/products/{product_key}/device_groups,其中{product_key}需要替换为对应产品的名称。 请求参数包括: product_key:字符串类型,必填,表示产品名称。
 响应参数包括: 以下是一个示例程序(使用Python语言)来调用该接口:pythonCopy Code import requestsdef get_device_group_tree(product_key):    url = f"http://enterpriseapi.gizwits.com/v1/products/{product_key}/device_groups"        response = requests.get(url)    if response.status_code == 200:        data = response.json()        return data    else:        print("请求失败")        return None# 调用示例product_key = "your_product_key"device_group_tree = get_device_group_tree(product_key)print(device_group_tree)
 
 |