get-dev-catalogs接口
获取用户在云平台上自定义的设备分组。
接口原型
协议 |
HTTP/HTTPS GET |
URL |
ip[:port]/sc_cloud/scapi/get-dev-catalogs |
数据格式 |
响应消息:Content-Type: application/json |
请求Cookies
名称 |
描述 |
mwcloud-sid |
用于标识当前登录的字符串 |
mwcloud-uid |
当前登录用户名 |
请求示例
GET /sc_cloud/scapi/get-dev-catalogs HTTP/1.1
Accept: application/json, text/plain, */*
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
响应参数
参数 |
描述 |
Content-Type |
取值为:'application/json; charset=UTF-8' |
Response Body
dev-catalogs
设备分组参数解析。
参数 |
描述 |
id |
设备分组ID。 |
name |
分组名称。 |
is-everyone |
是否所有用户可见。0:否,1:是。 |
users |
is-everyone取值为0时有效,可见用户集合。 |
childs |
子分组集合。 |
响应示例
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 310
{
"result": 0,
"dev-catalogs": [
{
"id": 1,
"name": "Group1",
"is-everyone": 1,
"users": null,
"childs": [
{
"id": 3,
"name": "Group11",
"is-everyone": 1,
"users": null,
"childs": [
{
"id": 4,
"name": "Group111",
"is-everyone": 0,
"users": [
"Admin",
"Test"
],
"childs": null
}
]
}
]
},
{
"id": 2,
"name": "Group2",
"is-everyone": 0,
"users": [
"Admin"
],
"childs": null
}
]
}