Group Management Interface
Create Groups
Interface description
Create groups.
Request structure
POST /v1/group HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: authorization stringRequest header
There are no other special headers except the public headers.
Request parameter
| Name | Type | Location | Description | Required or not |
|---|---|---|---|---|
| name | String | RequestBody parameter | Group name | Yes |
| description | String | RequestBody parameter | Group description | No |
Response header
There are no other special headers except the public headers.
Response parameter
GroupModel object
Request example
POST /v1/group HTTP/1.1
Host: iam.bj.baidubce.com
content-type: application/json
Content-Length: 20
Authorization: AuthorizationString
{"name":"test_group"}Response example
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
Server: BWS
{
"description": "",
"id": "d3f6fd54fe3643459109ea0675c295a8",
"createTime": "2019-06-06T08:18:34Z",
"name": "test_group"
}Query Groups
Interface description
Query groups
Request structure
GET /v1/group/{groupName} HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: authorization stringRequest header
There are no other special headers except the public headers.
Request parameter
| Name | Type | Location | Description | Required or not |
|---|---|---|---|---|
| groupName | String | URL parameter | Group name | Yes |
Response header
There are no other special headers except the public headers.
Response parameter
GroupModel object
Request example
GET /v1/group/test_group HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: AuthorizationStringResponse example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
Server: BWS
{
"description": "",
"id": "d3f6fd54fe3643459109ea0675c295a8",
"createTime": "2019-06-06T08:18:34Z",
"name": "test_group"
}Update Groups
Interface description
Update groups
Request structure
PUT /v1/group/{groupName} HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: authorization stringRequest header
There are no other special headers except the public headers.
Request parameter
| Name | Type | Location | Description | Required or not |
|---|---|---|---|---|
| groupName | String | URL parameter | Group name | Yes |
| name | String | RequestBody parameter | Group name updated | No |
| description | String | RequestBody parameter | Group description | No |
Response header
There are no other special headers except the public headers.
Response parameter
GroupModel object
Request example
PUT /v1/group/test_group HTTP/1.1
Host: iam.bj.baidubce.com
content-type: application/json
Content-Length: 39
Authorization: AuthorizationString
{"description":"update for test group"}Response example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
Server: BWS
{
"description": "update for test group",
"id": "d3f6fd54fe3643459109ea0675c295a8",
"createTime": "2019-06-06T08:18:34Z",
"name": "test_group"
}Delete Groups
Interface description
Delete groups
Note: Before the group is deleted, the IAM users shall be all removed from the group, and unassociated all permission policies.
Request structure
DELETE /v1/group/{groupName} HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: authorization stringRequest header
There are no other special headers except the public headers.
Request parameter
| Name | Type | Location | Description | Required or not |
|---|---|---|---|---|
| groupName | String | URL parameter | Group name | Yes |
Response header
There are no other special headers except the public headers.
Response parameter
None
Request example
DELETE /v1/group/test_group HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: AuthorizationStringResponse example
HTTP/1.1 204 No Content
X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
Server: BWSEnumerate Groups
Interface description
Enumerate groups.
Request structure
GET /v1/group HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: authorization stringRequest header
There are no other special headers except the public headers.
Request parameter
None
Response header
There are no other special headers except the public headers.
Response parameter
| Name | Type | Description |
|---|---|---|
| groups | List<GroupModel> | List of group object |
Request example
GET /v1/group HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: AuthorizationStringResponse example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
Server: BWS
{
"groups": [
{
"description": "update for test group",
"id": "d3f6fd54fe3643459109ea0675c295a8",
"createTime": "2019-06-06T08:18:34Z",
"name": "test_group"
}
]
}Add the User to the Group
Interface description
Add the user to the group.
Request structure
PUT /v1/group/{groupName}/user/{userName} HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: authorization stringRequest header
There are no other special headers except the public headers.
Request parameter
| Name | Type | Location | Description | Required or not |
|---|---|---|---|---|
| userName | String | URL parameter | User name | Yes |
| groupName | String | URL parameter | Group name | Yes |
Response header
There are no other special headers except the public headers.
Response parameter
None.
Request example
PUT /v1/group/test_group/user/test-user HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: AuthorizationStringResponse example
HTTP/1.1 204 No Content
Content-Type: application/json;charset=UTF-8
X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
Server: BWSRemove the User from the Group
Interface description
Remove the user from the group
Request structure
DELETE /v1/group/{groupName}/user/{userName} HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: authorization stringRequest header
There are no other special headers except the public headers.
Request parameter
| Name | Type | Location | Description | Required or not |
|---|---|---|---|---|
| userName | String | URL parameter | User name | Yes |
| groupName | String | URL parameter | Group name | Yes |
Response header
There are no other special headers except the public headers.
Response parameter
None.
Request example
DELETE /v1/group/test_group/user/test-user HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: AuthorizationStringResponse example
HTTP/1.1 204 No Content
Content-Type: application/json;charset=UTF-8
X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
Server: BWSEnumerate the User Group
Interface description
Enumerate the group that the user belong to.
Request structure
GET /v1/user/{userName}/group HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: authorization stringRequest header
There are no other special headers except the public headers.
Request parameter
| Name | Type | Location | Description | Required or not |
|---|---|---|---|---|
| userName | String | URL parameter | User name | Yes |
Response header
There are no other special headers except the public headers.
Response parameter
| Name | Type | Description |
|---|---|---|
| groups | List<GroupModel> | List of group object |
Request example
GET /v1/user/test-user/group HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: AuthorizationStringResponse example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
Server: BWS
{
"groups": [
{
"description": "",
"id": "5cf62eee890146ed8116f6b449268f33",
"name": "test_group"
}
]
}Enumerate the User in the Group
Interface description
Enumerate the users in the group.
Request structure
GET /v1/group/{groupName}/user HTTP/1.1
Host: iam.bj.baidubce.com
Authorization: authorization stringRequest header
There are no other special headers except the public headers.
Request parameter
| Name | Type | Location | Description | Required or not |
|---|---|---|---|---|
| groupName | String | URL parameter | Group name | Yes |
Response header
There are no other special headers except the public headers.
Response parameter
| Name | Type | Description |
|---|---|---|
| users | List<UserModel> | List of user object |
Request example
GET /v1/group/test_group/user
Host: iam.bj.baidubce.com
Authorization: AuthorizationStringResponse example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
Server: BWS
{
"users": [
{
"id": "f4225c39ba2247b692eec7b461835aa1",
"createTime": "2019-06-06T03:42:13Z",
"name": "test-user"
}
]
}