Assigning roles to groups on domains
PUT /v3/domains/{domain_id}/groups/{group_id}/roles/{role_id}
Assign a role to a group on a domain. This grants the role on the domain to every user who belongs to the group.
Request
Parameters
| Name | In | Type | Description |
|---|---|---|---|
domain_id
|
path | string | The domain ID. |
group_id
|
path | string | The group ID. |
role_id
|
path | string | The role ID. |
To find out role IDs, send a GET request to /v3/roles (refer to Listing roles).
Example
# curl -ks -X PUT -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' -d '{}' \
https://<node_IP_addr>:5000/v3/domains/f2eeaaf15c254d4fa10255796122c8ec/\
groups/c0d675eac29945ad9dfd08aa1bb75751/roles/8b807cb2205441ea90312279bf4cb1c9
Response
Status codes
Success
| Code | Reason |
|---|---|
204 - No Content
|
The server has fulfilled the request. |
Error
| Code | Reason |
|---|---|
400 - Bad Request
|
Some content in the request was invalid. |
401 - Unauthorized
|
User must authenticate before making a request. |
403 - Forbidden
|
Policy does not allow current user to do this operation. |
404 - Not Found
|
The requested resource could not be found. |
409 - Conflict
|
This operation conflicted with another operation on this resource. |