PUT /api/roles/
Updates the basic information (name and/or description) of an existing role. This endpoint does not modify the permissions assigned to the role.Authentication
This endpoint requires authentication. Include a valid JWT token in the Authorization header.Path Parameters
The unique identifier of the role to update
Request Body
The new name for the role. Must be unique if provided.
- Maximum length: 100 characters
- Example:
"Super Administrator"
The new description for the role.
- Maximum length: 200 characters
- Example:
"Enhanced admin role with additional privileges"
Response
Unique identifier of the updated role
The updated name of the role
The updated description of the role
Current status of the role (ACTIVE, INACTIVE)
Error Responses
- 400 Bad Request: Invalid data provided (e.g., exceeds length limits)
- 404 Not Found: Role with the specified ID does not exist
- 500 Internal Server Error: Unexpected server error