create_group()

Creates a new user group on the ECM server. The server-assigned fields (id, guid) are returned in the result.

1. Signature

  • Sync

  • Async

ecm.security.create_group(
    name: str,
    *,
    profile_id: int = 0,
    description: str = "",
) -> ECMGroup
await ecm.security.create_group(...) -> ECMGroup

2. Parameters

Parameter Default Description

name

Name of the group.

profile_id

0

ID of the profile user assigned to the group; 0 = none.

description

""

Optional description of the group.

3. Return value

ECMGroup with id and guid populated.

4. Errors

  • ECMException (or subclass) – when the server rejects the request, e.g. a duplicate group name.

5. Examples

5.1. Minimal call

  • Sync

  • Async

group = ecm.security.create_group("Sales", description="Sales EMEA")
print(group.guid, group.id)
group = await ecm.security.create_group("Sales", description="Sales EMEA")

6. See also