POST /command/roles/remove-groups

Remove a role from 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 remove groups from.
  • group_ids: An array of user group IDs defining the groups that you want to remove the role from.

Example payload:

{ "role_id": <role-id>, "group_ids":[1,2,3] }

Example curl request:

curl -X POST "https://$(puppet config print server):4433/rbac-api/v1/command/roles/remove-groups" \
-H "X-Authentication:$(puppet-access show)"  \
-H "Content-type: application/json" \
-d '{"role_id": 1, "group_ids": ["a2450020-4217-439d-9bc4-258f6d2d7e76"]}'

Response format

Returns 204 No Content if the user groups are successfully removed from the role.

For errors, refer to RBAC service errors .