wxc_sdk.groups package

Groups API

class wxc_sdk.groups.GroupMember(*, id: str | None = None, type: str | None = None, displayName: str | None = None, operation: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

member_id: str | None

Person ID of the group member.

member_type: str | None

Member type.

display_name: str | None
operation: str | None
class wxc_sdk.groups.Group(*, id: str | None = None, displayName: str | None = None, members: list[GroupMember] | None = None, orgId: str | None = None, description: str | None = None, created: datetime | None = None, lastModified: datetime | None = None, memberSize: int | None = None, usage: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

group_id: str | None

A unique identifier for the group.

display_name: str | None

The name of the group.

members: list[GroupMember] | None

An array of members

org_id: str | None

The ID of the organization to which this group belongs.

description: str | None
created: datetime | None

The timestamp indicating creation date/time of group

last_modified: datetime | None

The timestamp indicating lastModification time of group

member_size: int | None
usage: str | None
class wxc_sdk.groups.GroupsApi(*, session: RestSession, base: str = None)[source]

Bases: ApiChild

Groups contain a collection of members in Webex. A member represents a Webex user. A group is used to assign templates and settings to the set of members contained in a group. To create and manage a group, including adding and removing members from a group, an auth token containing the identity:groups_rw is required. Searching and viewing members of a group requires an auth token with a scope of identity:groups_read. To learn more about managing people to use as members in the /groups API please refer to the People API.

list(include_members: bool = None, attributes: str = None, sort_by: str = None, sort_order: str = None, list_filter: str = None, start_index: int = None, count: int = None, org_id: str = None, **params) Generator[Group, None, None][source]

List groups in your organization.

Parameters:
  • include_members (bool) – Optionally return group members in the response. The maximum number of members returned is 500.

  • attributes (str) – The attributes to return.

  • list_filter (str) – Searches the group by displayName with an operator and a value. The available operators are eq (equal) and sw (starts with). Only displayName can be used to filter results.

  • sort_by (str) – Sort the results based by group displayName.

  • sort_order (str) – Sort results alphabetically by group display name, in ascending or descending order.

  • start_index (int) – The index to start for group pagination.

  • count (int) – Specifies the desired number of search results per page.

  • org_id (str) – List groups in this organization. Only admin users of another organization (such as partners) may use this parameter.

  • params

Returns:

generator of Group objects

create(settings: Group) Group[source]

Create a new group using the provided settings. Only display_name is mandatory

Parameters:

settings (Group) – settings for new group

Returns:

new group

Return type:

Group

details(group_id: str, include_members: bool = None) Group[source]

Get Group Details

Get details for a group, by ID.

Optionally, the members may be retrieved with this request. The maximum number of members returned is 500.

Parameters:
  • group_id (str) – A unique identifier for the group.

  • include_members (bool) – Include the members as part of the response.

Return type:

Group

members(group_id: str, **params) Generator[GroupMember, None, None][source]

Query members of a group

Parameters:
  • group_id (str) – group id

  • params

Returns:

generator of GroupMember instances

update(group_id: str, settings: Group = None, remove_all: bool = None) Group[source]

Update a Group

Update the group details, by ID.

Parameters:
  • group_id

  • settings

  • remove_all

Returns:

delete_group(group_id: str) None[source]

Delete a Group

Remove a group from the system.

Specify the group ID in the groupId parameter in the URI.

Parameters:

group_id (str) – A unique identifier for the group.

Return type:

None

base = 'groups'