Role & Permission Endpoints
Manage roles, permissions, and role-permission assignments. Roles define what actions users can perform within a tenant.
Base Paths
| Resource | Path |
|---|---|
| Roles | /api/roles |
| Role Permissions | /api/role-permissions |
Built-in Roles
| Role | Description |
|---|---|
SUPER_ADMIN | Full system access, tenant management |
ADMIN | Organization management, user management |
DATA_ENTRY | Data input and basic CRUD operations |
EMPLOYEE | Standard employee with limited access |
CANDIDATE | Job candidate with minimal access |
MANAGER | Team/department management |
VIEWER | Read-only access |
Role Endpoints
List All Roles
GET /api/roles
Authorization: Bearer {token}
Response 200 OK:
{
"items": [
{
"id": "uuid",
"name": "ADMIN",
"isSystem": true,
"tenantId": "uuid"
}
],
"total": 7
}
Find Role by Options
GET /api/roles/options?name=EMPLOYEE
Authorization: Bearer {token}
Create Role
POST /api/roles
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "CUSTOM_ROLE"
}
Update Role
PUT /api/roles/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "UPDATED_ROLE_NAME"
}
Delete Role
DELETE /api/roles/:id
Authorization: Bearer {token}
Import Roles (Cloud Migration)
POST /api/roles/import/migrate
Authorization: Bearer {token}
Content-Type: application/json
[
{ "name": "CUSTOM_ROLE_1", "isSystem": false }
]