wxc_sdk.telephony.webhook_interest_registrations package

class wxc_sdk.telephony.webhook_interest_registrations.WebhookInterestRegistration(*, interests: list[Interest] | None = None, expiresAt: datetime | None = None, **extra_data: Any)[source]

Bases: ApiModel

interests: list[Interest] | None

The collection of webhook interests associated with the registration. Each interest is either resource-based or actor-based. At least one interest is always present in a successful response.

expires_at: datetime | None

The date/time at which the registration expires.

class wxc_sdk.telephony.webhook_interest_registrations.Interest(*, resource: InterestResource | None = None, actor: InterestActor | None = None, **extra_data: Any)[source]

Bases: ApiModel

resource: InterestResource | None

Resource-based interest. Set exactly one of resource or actor per interest entry.

  • Hook Status - Enables webhook events for the telephony_hookstatus resource.

  • Agent - Enables webhook events for the telephony_agent resource.

  • Services - Enables webhook events for the telephony_services resource.

  • Agent Monitoring - Enables webhook events for the telephony_agentMonitoring resource.

  • Queue - Enables webhook events for the telephony_queue resource.

  • Queue Monitoring - Enables webhook events for the telephony_queueMonitoring resource.

actor: InterestActor | None

Actor-based interest. Set exactly one of resource or actor per interest entry.

  • Workspaces - Enables telephony webhook events associated with workspace actors.

  • Virtual Lines - Enables telephony webhook events associated with virtual line actors.

class wxc_sdk.telephony.webhook_interest_registrations.InterestActor(*values)[source]

Bases: str, SafeEnum

An enumeration.

workspaces = 'Workspaces'
virtual_lines = 'Virtual Lines'
class wxc_sdk.telephony.webhook_interest_registrations.InterestResource(*values)[source]

Bases: str, SafeEnum

An enumeration.

hook_status = 'Hook Status'
agent = 'Agent'
services = 'Services'
agent_monitoring = 'Agent Monitoring'
queue = 'Queue'
queue_monitoring = 'Queue Monitoring'
class wxc_sdk.telephony.webhook_interest_registrations.WebhookInterestRegistrationsApi(*, session: RestSession, base: str = None)[source]

Bases: ApiChild

Webhook Interest Registrations

Webhook interests enable the emission of Webex Calling webhook events that are not emitted by default, even when a webhook is registered for an applicable resource. Clients manage webhook interests through registrations. Once a client registers an interest, that interest applies to all applicable webhooks for the organization, not only webhooks created by that client. Webhook interests are therefore not intended to filter unwanted events.

Webhook interest registrations expire and should be refreshed periodically. The default expiration period is 60 days.

There are two types of webhook interests: actor interests and resource interests. Webhook events for actor and resource categories without a corresponding interest type do not require an interest registration and are always emitted.

Notes:

  • These APIs are reserved for administrators. Although the POST and DELETE operations are technically “write”

operations, they are exceptionally associated with the spark-admin:calls_read scope because they are used alongside the read-only Webhook APIs.

  • The client associated with a registration is derived from the access token and is not supplied by the caller.

delete() None[source]

Delete Webhook Interest Registration

Deletes the webhook interest registration associated with the authenticated user and the client derived from the access token. The client identifier is not supplied by the caller.

Registrations are managed for a specific user and client, but registered interests apply to all applicable webhooks in the organization.

This API is reserved for administrators and requires the spark-admin:calls_read scope.

Return type:

None

get() WebhookInterestRegistration[source]

Get Webhook Interest Registration

Returns the webhook interest registration associated with the authenticated user and the client derived from the access token, including the list of interests and the date/time at which the registration expires. The client identifier is not supplied by the caller.

Registrations are managed for a specific user and client, but registered interests apply to all applicable webhooks in the organization.

This API is reserved for administrators and requires the spark-admin:calls_read scope.

Return type:

WebhookInterestRegistration

create(interests: list[Interest], duration: int = None) None[source]

Create a Webhook Interest Registration

Adds or updates a webhook interest registration associated with the authenticated user and the client derived from the access token. At least one item in interests is required and duration is optional. The client identifier is not supplied in the request. If a registration does not already exist for the authenticated user and client, it is created; otherwise, it is updated with the incoming registration information.

Registrations are managed for a specific user and client, but registered interests apply to all applicable webhooks in the organization.

This API is reserved for administrators and requires the spark-admin:calls_read scope.

Parameters:
  • interests (list[Interest]) – The collection of webhook interests for this registration. At least one interest is required. Each interest is either resource-based or actor-based (exactly one of resource or actor is set).

  • duration (int) – Optional time, in days, after which the registration expires. When omitted, the registration defaults to expire after 60 days.

Return type:

None

base = 'telephony/webhookInterestRegistrations'