get-dev-catalogs
Use the interface to obtain device groups.
Prototype
Protocol |
HTTP/HTTPS GET |
URL |
ip[:port]/sc_cloud/scapi/get-dev-catalogs |
Data Format |
Response: Content-Type: application/json |
Request Cookies
Parameter |
Description |
mwcloud-sid |
A string value that is used to uniquely identify user logged-in. |
mwcloud-uid |
Current logged-in username. |
Request Example
GET /sc_cloud/scapi/get-dev-catalogs HTTP/1.1
Accept: application/json, text/plain, */*
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
Response Parameters
Parameter |
Description |
Content-Type |
Value: 'application/json; charset=UTF-8' |
Response Body
Parameter |
Description |
result |
Result code. The options are as follows:- 0: success.
- Other values. For details about the result codes, please refer to API Status.
|
dev-catalogs |
Device groups. |
dev-catalogs
Parameter |
Description |
id |
Device group ID. |
name |
Group name. |
is-everyone |
Whether the group is available for all Cloud users. 0: No; 1: Yes. |
users |
Available user list of this group when 'is-everyone' =0 |
childs |
Sub-groups list. |
Response Example
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
}
]
}