查询资源分组列表
更新时间:2024-03-29
描述
- 本接口用于查询资源分组之间的层级关系。
请求
请求结构
Plain Text
1GET /v1/res/group?name={name}
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
name | String | 否 | query | 按照名字搜索,支持模糊查询。搜索一个tree及子节点是否含有name(模糊),如果有,则会展示其父分组链路 |
返回
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
groups | List<GroupTree> | 是 | 分组列表 |
错误码
无特殊错误码
示例
请求示例
Plain Text
1GET /v1/res/group?name=Res HTTP/1.1
2Host: resourcemanager.baidubce.com
3Authorization: bce-auth-v1/04795b2a1d12490bbee94511b7b78d7e/2016-11-11T10:34:26Z/1800/host/9e5619677b3a461f5b95d061b88823634e8bbc0e6b46e5b3cecbb75f21906a3d
返回示例
Plain Text
1HTTP/1.1 200 OK
2 Content-Type: application/json;charset=UTF-8
3 X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
4 Server: BWS
5
6 {
7 "groups": [
8 {
9 "parentId": "",
10 "groupId": "RESG-5HRyhvjqsTk",
11 "name": "anotherResGroup",
12 "extra": "",
13 "children": []
14 },
15 {
16 "parentId": "",
17 "groupId": "RESG-uQmfX2rVcjF",
18 "name": "parentGroup",
19 "extra": "",
20 "children": [
21 {
22 "parentId": "RESG-uQmfX2rVcjF",
23 "groupId": "RESG-uRqLJosXHTc",
24 "name": "subGroup",
25 "extra": "",
26 "children": [
27 {
28 "parentId": "RESG-uRqLJosXHTc",
29 "groupId": "RESG-vW7cjCj6fDC",
30 "name": "grandResGroup",
31 "extra": ""
32 }
33 ]
34 }
35 ]
36 }
37 ]
38}
39