curl --request PATCH \
--url http://localhost:3333/v1/roles/{roleId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Compliance Manager",
"permissions": {
"control": [
"read",
"update",
"delete"
],
"policy": [
"read",
"update",
"publish",
"approve"
],
"risk": [
"read",
"assess"
]
}
}
'{
"id": "<string>",
"name": "<string>",
"permissions": {},
"isBuiltIn": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Update the name or permissions of a custom role. Cannot modify built-in roles.
curl --request PATCH \
--url http://localhost:3333/v1/roles/{roleId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Compliance Manager",
"permissions": {
"control": [
"read",
"update",
"delete"
],
"policy": [
"read",
"update",
"publish",
"approve"
],
"risk": [
"read",
"assess"
]
}
}
'{
"id": "<string>",
"name": "<string>",
"permissions": {},
"isBuiltIn": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}API key for authentication
Role ID
"rol_abc123"
New name for the custom role
2 - 50"Compliance Manager"
Updated permissions for the role. Keys are resource names, values are arrays of allowed actions.
{
"control": ["read", "update", "delete"],
"policy": ["read", "update", "publish", "approve"],
"risk": ["read", "assess"]
}Was this page helpful?