wxc_sdk.memberships package
Membership API
- class wxc_sdk.memberships.Membership(*, id: str | None = None, roomId: str | None = None, personId: str | None = None, personEmail: str | None = None, personDisplayName: str | None = None, personOrgId: str | None = None, isModerator: bool | None = None, isRoomHidden: bool | None = None, roomType: RoomType | None = None, isMonitor: bool | None = None, created: datetime | None = None)[source]
Bases:
ApiModel- id: str | None
A unique identifier for the membership.
- room_id: str | None
The room ID.
- person_id: str | None
The person ID.
- person_email: str | None
The email address of the person.
- person_display_name: str | None
The display name of the person.
- person_org_id: str | None
The organization ID of the person.
- is_moderator: bool | None
Whether or not the participant is a room moderator.
Whether or not the direct type room is hidden in the Webex clients.
- is_monitor: bool | None
Whether or not the participant is a monitoring bot (deprecated).
- created: datetime | None
The date and time when the membership was created.
- class wxc_sdk.memberships.MembershipsData(*, id: str | None = None, roomId: str | None = None, personId: str | None = None, personEmail: str | None = None, personDisplayName: str | None = None, personOrgId: str | None = None, isModerator: bool | None = None, isRoomHidden: bool | None = None, roomType: RoomType | None = None, isMonitor: bool | None = None, created: datetime | None = None)[source]
Bases:
WebhookEventData,MembershipData in a webhook “memberships” event
- resource: ClassVar = 'memberships'
- class wxc_sdk.memberships.MembershipApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChildManipulating Team Memberships as a Compliance Officer
As a Compliance Officer, you can indirectly manage the memberships of a team to which you do not belong. Individuals added to the team’s general space are automatically considered team members. Therefore, you can utilize your standard privilege of adding individuals to a space or room by adding them to the team’s general space.
The team ID contains the general room ID with a different prefix. To locate the general room ID of a team, you need to decode and recode the team ID using the new prefix. Below is a command-line example for this process. Note that the final sed replacement is used to remove padding characters.
Example: echo “Y2lzY29zcGFyazovL3VzL1RFQU0vYjQ5ODhmODAtN2QzMS0xMWVkLTk4Y2MtNWY5MTFhZWU1OTA0” | base64 -d | sed ‘s/TEAM/ROOM/’ | base64 | sed ‘s/=.//’
- list(room_id: str | None = None, person_id: str | None = None, person_email: str | None = None, **params) Generator[Membership, None, None][source]
Lists all room memberships. By default, lists memberships for rooms to which the authenticated user belongs. Use query parameters to filter the response. Use roomId to list memberships for a room, by ID. NOTE: For moderated team spaces, the list of memberships will include only the space moderators if the user is a team member but not a direct participant of the space. Use either personId or personEmail to filter the results. The roomId parameter is required when using these parameters. Long result sets will be split into pages.
- Parameters:
room_id (str) – List memberships associated with a room, by ID.
person_id (str) – List memberships associated with a person, by ID. The roomId parameter is required when using this parameter.
person_email (str) – List memberships associated with a person, by email address. The roomId parameter is required when using this parameter.
- create(room_id: str, person_id: str | None = None, person_email: str | None = None, is_moderator: bool | None = None) Membership[source]
Add someone to a room by Person ID or email address, optionally making them a moderator.
- Parameters:
room_id (str) – The room ID.
person_id (str) – The person ID.
person_email (str) – The email address of the person.
is_moderator (bool) – Whether or not the participant is a room moderator.
- details(membership_id: str) Membership[source]
Get details for a membership by ID. Specify the membership ID in the membershipId URI parameter.
- Parameters:
membership_id (str) – The unique identifier for the membership.
- update(update: Membership) Membership[source]
Updates properties for a membership by ID
- Parameters:
update (Membership) –
new settings; ID has to be set in update.
- These can be updated:
is_moderator: bool: Whether or not the participant is a room moderator.
is_room_hidden: bool: When set to true, hides direct spaces in the teams client. Any new message will make the room visible again.
- delete(membership_id: str)[source]
Deletes a membership by ID. Specify the membership ID in the membershipId URI parameter. The membership for the last moderator of a Team’s General space may not be deleted; promote another user to team moderator first.
- Parameters:
membership_id (str) – The unique identifier for the membership.
- base = 'memberships'