PUT /groups/<sid>
Replaces the content of the specified user group object. For example, you can update the group's roles or membership. Authentication is required.
Request format
When Forming RBAC API requests to this endpoint, the content type
is application/json
. The body must be a JSON object
using all keys supplied in the GET /groups/<sid> endpoint response. You must
supply all keys; however, the only key you can update is role_ids
.
Any values supplied in role_ids
replace the group's
current role values. If you want to add roles, you need to supply all of the group's
current role IDs plus the new role IDs. If role_ids
is empty, all roles are removed from the group (and, by
extension, the roles are removed from users who belong to this group). Changes to
keys other than role_ids
are ignored.
Example curl request:
curl -X PUT "https://$(puppet config print server):4433/rbac-api/v1/groups/75370a30-588a-11e4-8ed6-0800200c9a66" \ -H "X-Authentication:$(puppet-access show)" \ -H "Content-type: application/json" \ -d '{"id":"75370a30-588a-11e4-8ed6-0800200c9a66", "login":"admins", "display_name":"Admins", "role_ids":[2,1], "is_group":true, "is_remote":true, "is_superuser":false, "user_ids":["1cadd0e0-5887-11e4-8ed6-0800200c9a66","5c1ab4b0-588b-11e4-8ed6-0800200c9a66"]}'
Response format
If the operation is successful, the endpoint returns a 200 OK response and a group object with updated roles.
For errors, refer to RBAC service errors .