Skip to main content

Remove role setup

DELETE 

/groups-srv/roles/:role

This API call deletes role setup with given role (name) if it is not assigned to a user group and it is not assigned to any user.

Validation Rules:

  • The role must exist in the system.
  • The role must not be assigned to any user group (via groupType allowedRoles configuration).
  • The role must not be assigned to any user (via userGroupMap).
  • Roles with roleOwner: admin cannot be deleted.

Business Rules:

  • Before deleting a role, ensure it is removed from all groupType configurations.
  • Before deleting a role, ensure it is removed from all user group maps.
  • System roles (roleOwner: admin) are protected and cannot be deleted.

Request

Responses

OK - Role deleted successfully