POST /command/roles/add-groups
Add a role to one or more user groups.
Request format
When Forming RBAC API requests to this endpoint, the content type
is application/json
. The body must be a JSON object
using the following keys:
role_id
: The ID of the role you want to assign to groups.group_ids
: An array of user group IDs defining the groups that you want to assign the role to.
Example payload:
{ "role_id": <role-id>, "group_ids":[<id>,<id>,<id>] }
Example curl request:
curl -X POST "https://$(puppet config print server):4433/rbac-api/v1/command/roles/add-groups" \ -H "X-Authentication:$(puppet-access show)" \ -H "Content-type: application/json" \ -d '{"role_id": 1, "group_ids": ["2ca57e30-5887-11e4-8ed6-0800200c9a66"]}'
Response format
Returns 204 No Content if the user groups are successfully added to the role.
For errors, refer to RBAC service errors .