Skip to main content

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), and description.
  • The roleOwner must be set during creation and cannot be changed afterwards.
  • The role field 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 description field can be updated.
  • The roleOwner field is immutable and cannot be modified after the role is created.
  • The role field cannot be changed (it serves as the unique identifier).
  • Attempting to change roleOwner or role will be ignored.

Validation Rules:

  • role: Required, must be unique, cannot be empty, case-sensitive
  • roleOwner: Required for new roles, must be either "client" or "admin", immutable after creation
  • description: Optional, can be updated for existing roles

Business Rules:

  • Roles with roleOwner: admin are system-managed and cannot be created or modified via API.
  • Only roles with roleOwner: client can be created and managed through this API.
  • Once a role is created, its role and roleOwner cannot be changed.

Request

Responses

OK