Adds or updates a role setup
POST/groups-srv/roles
This API call adds or updates a role setup.
Creating a new role:
- You can specify the
role(unique identifier),roleOwner(client or admin), anddescription. - The
roleOwnermust be set during creation and cannot be changed afterwards. - The
rolefield is required and must be unique across all roles in the system. - Role names are case-sensitive and must be valid identifiers (alphanumeric characters and underscores recommended).
Updating an existing role:
- Only the
descriptionfield can be updated. - The
roleOwnerfield is immutable and cannot be modified after the role is created. - The
rolefield cannot be changed (it serves as the unique identifier). - Attempting to change
roleOwnerorrolewill be ignored.
Validation Rules:
role: Required, must be unique, cannot be empty, case-sensitiveroleOwner: Required for new roles, must be either "client" or "admin", immutable after creationdescription: Optional, can be updated for existing roles
Business Rules:
- Roles with
roleOwner: adminare system-managed and cannot be created or modified via API. - Only roles with
roleOwner: clientcan be created and managed through this API. - Once a role is created, its
roleandroleOwnercannot be changed.
Request
Responses
- 200
- 201
- 401
- 417
OK
CREATED
UNAUTHORIZED
storing role setup failed due to incorrect data