Skip to content

User Groups

get_usergroup(group_id) async

Get a user group by ID.

Parameters:

Name Type Description Default
group_id int

The group ID to get.

required

Returns:

Type Description
UserGroup

The user group.

create_usergroup(usergroup) async

Create a new user group. Returns location of the created user group.

Parameters:

Name Type Description Default
usergroup UserGroup

The user group to create

required

Returns:

Type Description
str

The location of the created user group

update_usergroup(group_id, usergroup) async

Update group information.

Parameters:

Name Type Description Default
group_id int

The group ID to update.

required
usergroup UserGroup

The new definition for the usergroup.

required

delete_usergroup(group_id, missing_ok=None) async

Delete a user group.

Parameters:

Name Type Description Default
group_id int

The group ID to delete.

required
missing_ok Optional[bool]

DEPRECATED: If True, Do not raise an error if the group does not exist.

None

get_usergroups(group_name=None, ldap_group_dn=None, page=1, page_size=10, limit=None) async

Get all user groups.

Parameters:

Name Type Description Default
group_name Optional[str]

The group name to search for (fuzzy matching).

None
ldap_group_dn Optional[str]

The LDAP group DN to search with.

None
page int

The page of results to return

1
page_size int

The number of results to return per page

10
limit Optional[int]

The maximum number of results to return

None

Returns:

Type Description
List[UserGroup]

List of user groups.

search_usergroups(group_name, page=1, page_size=10, limit=None) async

Search for user groups by group name.

Parameters:

Name Type Description Default
group_name str

The group name to search for.

required
page int

The page of results to return

1
page_size int

The number of results to return per page

10
limit Optional[int]

The maximum number of results to return.

None

Returns:

Type Description
List[UserGroupSearchItem]

List of user groups.