wxc_sdk.webhook package

Webhook types and API

class wxc_sdk.webhook.WebhookEventType(*values)[source]

Bases: str, SafeEnum

The event type for the webhook.

created = 'created'

an object was created

updated = 'updated'

an object was updated

deleted = 'deleted'

an object was deleted

started = 'started'

a meeting was started

ended = 'ended'

a meeting was ended

joined = 'joined'

a participant joined

left = 'left'

a participant left

migrated = 'migrated'

A room was migrated to a different geography. The roomId has changed.

authorized = 'authorized'

A Service App was authorized.

deauthorized = 'deauthorized'

A Service App was deauthorized.

status_changed = 'statusChanged'

Status of admin batch job was changed.

all = 'all'
class wxc_sdk.webhook.WebhookResource(*values)[source]

Bases: str, SafeEnum

The resource type for the webhook. Creating a webhook requires ‘read’ scope on the resource the webhook is for.

attachment_actions = 'attachmentActions'

The Attachment Actions resource.

data_sources = 'dataSources'

data sources resource.

memberships = 'memberships'

The Memberships resource.

messages = 'messages'

The Messages resource.

rooms = 'rooms'

The Rooms resource.

meetings = 'meetings'

The Meetings resource.

recordings = 'recordings'

The Recordings resource.

converged_recordings = 'convergedRecordings'

The CallRecordings resource.

meeting_participants = 'meetingParticipants'

The Meeting Participants resource.

meeting_transcripts = 'meetingTranscripts'

The Meeting Transcripts resource.

service_app = 'serviceApp'

Service App authorization notification.

telephony_calls = 'telephony_calls'

Webex Calling call resources.

telephony_conference = 'telephony_conference'

Webex Calling conference controls resource.

telephony_mwi = 'telephony_mwi'

Webex Calling voicemail message waiting indicator resource.

uc_counters = 'uc_counters'

Performance counter for a dedicated instance.

admin_batch_jobs = 'adminBatchJobs'

Admin Batch Jobs notification.

all = 'all'
class wxc_sdk.webhook.WebhookStatus(*values)[source]

Bases: str, SafeEnum

An enumeration.

active = 'active'

Webhook is active.

inactive = 'inactive'

Webhook is inactive.

class wxc_sdk.webhook.Webhook(*, id: str | None = None, name: str, targetUrl: str, resource: WebhookResource | None = None, event: WebhookEventType | None = None, filter: str | None = None, secret: str | None = None, status: WebhookStatus, created: datetime, orgId: str | None = None, createdBy: str | None = None, appId: str | None = None, ownedBy: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

webhook_id: str | None

The unique identifier for the webhook.

name: str

A user-friendly name for the webhook.

target_url: str

URL that receives POST requests for each event.

resource: WebhookResource | None

Resource type for the webhook. Creating a webhook requires ‘read’ scope on the resource the webhook is for.

event: WebhookEventType | None

Event type for the Webhook.

filter: str | None

Filter that defines the webhook scope.

secret: str | None

Secret used to generate payload signature.

status: WebhookStatus

Status of the webhook. Use active to reactivate a disabled webhook.

created: datetime

Date and time the webhook was created.

org_id: str | None
created_by: str | None
app_id: str | None
owned_by: str | None

Specify org when creating an org/admin level webhook. Supported for meetings, recordings, convergedRecordings, meetingParticipants, meetingTranscripts, videoMeshAlerts, controlHubAlerts, rooms, messaging and adminBatchJobs (for Compliance Officers and messages with file attachments only - see inline file DLP) resources.

property app_id_uuid: str
property webhook_id_uuid: str
property org_id_uuid: str
property created_by_uuid: str
class wxc_sdk.webhook.WebhookEventData(**extra_data: Any)[source]

Bases: WebhookEventDataForbid

base class for data components of a webhook event. Subclasses of this base implement the actual data models

Examples

resource

class

telephony_calls

wxc_sdk.telephony.calls.TelephonyEventData

messages

wxc_sdk.messages.MessagesData

memberships

wxc_sdk.memberships.MembershipsData

attachmentActions

wxc_sdk.attachment_actions.AttachmentActionsApi

class wxc_sdk.webhook.WebhookEvent(*, id: str | None = None, name: str, targetUrl: str, resource: WebhookResource | None = None, event: WebhookEventType | None = None, filter: str | None = None, secret: str | None = None, status: WebhookStatus, created: datetime, orgId: str | None = None, createdBy: str | None = None, appId: str | None = None, ownedBy: str | None = None, actorId: str | None = None, data: WebhookEventDataForbid | dict, **extra_data: Any)[source]

Bases: Webhook

A webhook event. Can be used in to parse data posted to a webhook handler

actor_id: str | None
data: WebhookEventDataForbid | dict

resource specific event data; for registered subclasses of wwx_sdk.webhook.WebhookEventData an instance of this subclass is returned. If no class is registered for the given resource, then data is returned as generic WebhookEventData instance

class wxc_sdk.webhook.WebhookApi(*, session: RestSession, base: str = None)[source]

Bases: ApiChild

API for webhook management

list(owned_by: str = None, **params) Generator[Webhook, None, None][source]

List Webhooks

List all of your webhooks.

Parameters:

owned_by (str) – Limit the result list to org wide webhooks. Only allowed value is org.

Returns:

Generator yielding Webhook instances

create(name: str, target_url: str, resource: WebhookResource, event: WebhookEventType, filter: str = None, secret: str = None, owned_by: str = None) Webhook[source]

Creates a webhook.

To learn more about how to create and use webhooks, see The Webhooks Guide.

Parameters:
  • name (str) – A user-friendly name for the webhook.

  • target_url (str) – The URL that receives POST requests for each event.

  • resource (WebhookResource) – The resource type for the webhook. Creating a webhook requires ‘read’ scope on the resource the webhook is for.

  • event (WebhookEvent) – The event type for the webhook.

  • filter (str) – Filter that defines the webhook scope. See Filtering Webhooks for more information. Please note that if a filter of hostEmail, hostUserId, ownerEmail or ownerId is specified, ownedBy must be set to org.

  • secret – The secret used to generate payload signature.

  • secret – str

  • owned_by

    Specify org when creating an org/admin level webhook. Supported for meetings, recordings, convergedRecordings,`meetingParticipants`, meetingTranscripts, videoMeshAlerts, controlHubAlerts, rooms, messaging and adminBatchJobs (for Compliance Officers and messages with file attachments only - see inline file DLP) resources.

  • owned_by – str

Returns:

the new webhook

details(webhook_id: str) Webhook[source]

Get Webhook Details

Shows details for a webhook, by ID.

Parameters:

webhook_id (str) – The unique identifier for the webhook.

Returns:

Webhook details

update(webhook_id: str, update: Webhook) Webhook[source]

Updates a webhook, by ID. You cannot use this call to deactivate a webhook, only to activate a webhook that was auto deactivated. The fields that can be updated are name, targetURL, secret and status. All other fields, if supplied, are ignored.

Parameters:
  • webhook_id (str) – The unique identifier for the webhook.

  • update (Webhook) – The webhook update

Returns:

updated Webhook object

webhook_delete(webhook_id: str)[source]

Deletes a webhook, by ID.

Parameters:

webhook_id (str) – The unique identifier for the webhook.

Returns:

None

base = 'webhooks'
class wxc_sdk.webhook.WebhookCreate(*, name: str, targetUrl: str, resource: WebhookResource, event: WebhookEventType, filter: str | None = None, secret: str | None = None, ownedBy: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

Body for a webhook create call

name: str
target_url: str
resource: WebhookResource
event: WebhookEventType
filter: str | None
secret: str | None
owned_by: str | None