foliolib.folio.usersImpl.GroupsImpl
- class foliolib.folio.usersImpl.GroupsImpl(tenant: str)
Bases:
foliolib.folio.FolioAPIImplImplentations of groups related functions.
- Parameters
tenant (str) – Tenant id
Methods
add_group(name, **kwargs)Add a group.
delete_group(name_or_id)Delete a group.
get_group(name_or_id)Get group by given name or id.
get_groups([query])Get list of groups.
modify_group(name, **kwargs)Modify a group.
- add_group(name: str, **kwargs)
Add a group.
- Parameters
name (str) – Name of the group.
- Keyword Arguments
uuid (str) – Id of the group.
desc (str) – Description of the group. Defaults to None.
expirationOffsetInDays (int) – Expiration offset days. Defaults to 0.
source – (str): Origin of the group record, i.e. ‘System’ or ‘User’”. Defaults to None.
- Returns
Object of the group.
- Return type
dict
- delete_group(name_or_id: str)
Delete a group.
- Parameters
name (str) – Name of the group.
- get_group(name_or_id: str)
Get group by given name or id.
- Parameters
name_or_id (str) – Group name or id
- Raises
GroupNotFound – Group not found
- Returns
Group Object
- Return type
dict
- get_groups(query: str = None)
Get list of groups.
- Parameters
query (str, optional) – CQL string. Default to None, all objects will be returned.
- Returns
List of group Objects.
- Return type
list
- modify_group(name: str, **kwargs)
Modify a group.
In order to change the name of the group, the uuid of the group must be given.
- Parameters
name (str) – Name of the group.
- Keyword Arguments
uuid (str) – Id of the group.
desc (str) – Description of the group. Defaults to None.
expirationOffsetInDays (int) – Expiration offset days. Defaults to 0.
source – (str): Origin of the group record, i.e. ‘System’ or ‘User’”. Defaults to None.
- Returns
Object of the group.
- Return type
dict