wxc_sdk.webhook package
Webhook types and API
- class wxc_sdk.webhook.WebhookEventType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[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.
- all = 'all'
- class wxc_sdk.webhook.WebhookResource(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[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.
- memberships = 'memberships'
The Memberships resource.
- recordings = 'recordings'
The Recordings 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'
- telephony_mwi = 'telephony_mwi'
- all = 'all'
- class wxc_sdk.webhook.WebhookStatus(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
An enumeration.
- active = 'active'
- inactive = '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)[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
The URL that receives POST requests for each event.
- resource: WebhookResource | None
The resource type for the webhook. Creating a webhook requires ‘read’ scope on the resource the webhook is for.
- event: WebhookEventType | None
The event type for the Webhook.
- filter: str | None
The filter that defines the webhook scope.
- secret: str | None
The secret used to generate payload signature.
- status: WebhookStatus
The status of the webhook. Use active to reactivate a disabled webhook.
- created: datetime
The date and time the webhook was created.
- org_id: str | None
- created_by: str | None
- app_id: str | None
- owned_by: str | None
- 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
messages
memberships
attachmentActions
- 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)[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 = None)[source]
Bases:
ApiChild
API for webhook management
- create(name: str, target_url: str, resource: WebhookResource, event: WebhookEventType, filter: str | None = None, secret: str | None = None, owned_by: str | None = None) Webhook [source]
Creates a webhook.
- Parameters:
name – A user-friendly name for the webhook.
target_url – The URL that receives POST requests for each event.
resource – The resource type for the webhook. Creating a webhook requires ‘read’ scope on the resource the webhook is for.
event – The event type for the webhook.
filter – The filter that defines the webhook scope.
secret – The secret used to generate payload signature.
owned_by – Specified when creating an org/admin level webhook. Supported for meetings, recordings and meetingParticipants resources for now.
- 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.
- 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)[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