Key Concepts
- Roles: Named groups that can have associated permissions
- Permissions: String-based capabilities that can be assigned to roles
- App-specific operations: Creating roles and managing their permissions
- Tenant-specific operations: Assigning roles to users
Available Endpoints
Role Management
PUT /recipe/role- Create a new role or modify its permissionsGET /recipe/roles- Get all rolesGET /recipe/role/permissions- Get permissions for a specific rolePOST /recipe/role/permissions- Add permissions to a roleDELETE /recipe/role/permissions- Remove permissions from a roleDELETE /recipe/role- Delete a role
User Role Assignment
PUT /recipe/user/role- Assign a role to a userGET /recipe/user/roles- Get all roles for a userDELETE /recipe/user/role- Remove a role from a user
Querying
GET /recipe/role/users- Get all users with a specific roleGET /recipe/permission/roles- Get all roles that have a specific permission
Response Format
All endpoints return JSON responses with astatus field. Common status values:
OK- Request succeededUNKNOWN_ROLE_ERROR- The specified role does not exist
Next Steps
Create Role
Learn how to create a new role with permissions
Assign Role
Assign roles to users in your application