Roles Management
Role-based access control: roles, permissions and assignments.
ποΈ List Roles
Return every role (built-in and custom) defined for the caller's tenant, including each role's metadata and full permission set.
ποΈ Create Role
Create a custom role scoped to the caller's tenant with the given name, description, and permission set. Responds 201 with a Location header on success and 409 when a role with the same name already exists.
ποΈ Copy Role
Create a custom role whose permission set starts as a copy of the role given by role_id (built-in or custom). Built-in roles are read-only; this is how a tenant tailors one. Responds 201 with a Location header, 404 for an unknown role and 409 when a role with the new name already exists.
ποΈ Get Role
Return metadata and the full permission set for a single role identified by role_id. Responds 404 when the role does not exist in the caller's tenant.
ποΈ Update Role
Partially update a role's name, description, and/or permissions. Built-in roles are read-only: renaming one answers 422 and changing its permissions answers 409 (copy it as a custom role with POST /roles/{role_id}/copies instead); its description may still be edited. Responds 404 for an unknown role and 409 when the new name clashes with an existing role.
ποΈ Delete Role
Delete a custom role along with its permission policies and user assignments. Built-in roles cannot be deleted (409). Responds 404 when the role does not exist in the caller's tenant.
ποΈ Assign Role to User
Assign the role given by role_id in the request body to the user identified by the user_id path parameter. The operation is idempotent and responds 404 when the user or role does not exist in the caller's tenant.
ποΈ Revoke Role from User
Remove the assignment of the given role from the given user. Responds 204 on success and 404 when the user or role does not exist in the caller's tenant.
ποΈ List Permissions
Return the tenant role editor's permission matrix: groups of resource rows, each with up to three levels (view, edit, manage) listing the endpoints a level grants. `permissions` keeps the flat per-group list for older clients.