Adds or updates a group type
POST/groups-srv/grouptypes
This API call adds or updates a group type.
Creating a new group type:
- You must specify
groupType(unique identifier),objectOwner(client or admin), androleMode. - The
groupTypemust be unique across all group types. - The
roleModedetermines how roles can be used in user groups of this type:allowed_roles: Only roles specified inallowedRolesarray can be assignedany_roles: Any role can be assigned to user groups of this typeno_roles: No roles can be assigned to user groups of this type
- If
roleModeisallowed_roles, you must provide theallowedRolesarray with at least one role.
Updating an existing group type:
- You can update
description,roleMode, andallowedRoles. - The
groupTypeandobjectOwnerfields are immutable after creation. - When changing
roleModefromallowed_rolesto another mode, ensure no user groups are using roles that would become invalid.
Validation Rules:
groupType: Required, must be unique, cannot be empty, case-sensitiveobjectOwner: Required, must be either "client" or "admin", immutable after creationroleMode: Required, must be one of: "allowed_roles", "any_roles", "no_roles"allowedRoles: Required ifroleModeis "allowed_roles", must be a non-empty array of valid role names- All roles in
allowedRolesmust exist in the system before they can be used
Business Rules:
- Group Types Setup with
objectOwner: adminare system-managed and cannot be created or modified via API. - Only group types with
objectOwner: clientcan be created and managed through this API. - Once a group type is created, its
groupTypeandobjectOwnercannot be changed. - If a role is removed from
allowedRolesand user groups are using that role, those assignments remain but new assignments will be rejected.
Request
Responses
- 200
- 201
- 401
- 417
OK
CREATED
UNAUTHORIZED
invalid or inconsistent group type data