文档
测试

查询设备(详情)的所有分组名

GET
/devices/<device_name:str>/groups

接口描述

基于设备名查询所有分组名仅区别于是否在get时携带simple参数

请求参数

参数名
类型
描述
必填
参数要求
simple
bool
是否仅响应设备详细信息,True则仅需要设备名
必填
id
str
客户端标识id
必填

响应参数

application/json
参数名
类型
描述
必填
参数要求
jsonrpc
str
JSON-RPC协议版本,必须写为“2.0”
必填
2.0
result
dict
成功时返回的字典
可选
code
str
状态码
必填
device
Device_dict | str
Device结构类型字典或设备名(取决于simple)
必填
符合device格式要求的Device字典
group_names
list[str]
设备所属分组的分组名列表
必填
取决于请求时的simple参数
simple
bool
与请求simple一致
必填
error
dict
失败时返回的字典
可选
code
str
状态码
必填
message
str
错误的简短描述
必填
name
str
查询失败的设备名
必填
id
str
与请求时对应的客户端标识id
必填