Create Role
Create a new role in the system.Endpoint
Authorization
Requires Administrator role.Request Body
Name of the role. Must be unique.
Response
HTTP status code: 201 Created
The ID of the newly created role
Location header with URL to the created role:
/api/roles/{id}Example Request
Example Response
Update Role
Update an existing role’s properties.Endpoint
Authorization
Requires Administrator role.Path Parameters
ID of the role to update
Request Body
ID of the role (must match path parameter)
New name for the role
Response
HTTP status code: 204 No Content on success
Example Request
Delete Role
Delete a role from the system.Endpoint
Authorization
Requires Administrator role.Path Parameters
ID of the role to delete
Response
HTTP status code: 204 No Content on success
Example Request
Get All Roles
Retrieve a list of all roles in the system.Endpoint
Authorization
Requires Administrator role.Response
Array of role objects
Example Request
Example Response
Get Role by ID
Retrieve details of a specific role.Endpoint
Authorization
Requires Administrator role.Path Parameters
ID of the role to retrieve
Response
Role ID
Role name
Normalized role name
Number of permissions assigned to this role
Example Request
Example Response
Error Responses
Bad Request - Invalid request parameters or RoleId mismatch
Not Found - Role does not exist
Forbidden - User does not have Administrator role