DELETE /api/users//roles/
Revokes a role from a user, removing the associated permissions. This endpoint requires write privileges or admin role.Authentication
This endpoint requires JWT authentication with one of the following:WRITE_PRIVILEGESauthorityADMINrole
Path Parameters
The unique identifier of the user
The unique identifier of the role to revoke
Response
This endpoint returns no content on success (HTTP 204).Error Codes
204- Role revoked successfully (no content returned)401- Unauthorized: Missing or invalid JWT token403- Forbidden: Insufficient permissions404- Not Found: User or role does not exist
Example Request
Example Success Response
Example Error Response
Notes
- Revoking a role removes all permissions associated with that role from the user
- If the user does not have the role assigned, the operation will succeed without changes
- This action is logged in the audit log with module “USUARIOS” and action “REVOCAR_ROL”
- Be careful when revoking roles, as it may prevent users from accessing resources they previously could access