POST /command/roles/remove-permissions

Remove permissions from a role.

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 permissions from.
  • permissions: An array of permissions objects describing the permissions to remove from the role. Permissions objects consist of sets of object_type, action, and instance.

Example payload:

{
 "role_id": <role-id>,
 "permissions:[
    {"object_type": <TYPE>, 
     "action": <ACTION>, 
     "instance": <INSTANCE>}, 
...]

Example curl request:

curl -X POST "https://$(puppet config print server):4433/rbac-api/v1/command/roles/remove-permissions" \
-H "X-Authentication:$(puppet-access show)" \
-H "Content-type: application/json" \
-d '{"role_id": 1, 
     "permissions": [
          {"object_type":"node_groups", 
           "action":"edit_rules", 
           "instance":"*"}
      ]
    }'

Response format

Returns 204 No Content when the permissions are successfully removed from the role.

An error in the standard format is returned for all other responses.