POST /command/roles/add-permissions
On this page:
Add permissions to 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 add permissions to.permissions: An array of permissions objects describing the permissions to add to the role. Permissions objects consist of sets ofobject_type,action, andinstance.
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/add-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 if the permissions are successfully added to the role.
For errors, refer to RBAC service errors .






