wxc_sdk.as_api module

class wxc_sdk.as_api.AsAccessCodesApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

Access codes API

async read(*, location_id: str, org_id: Optional[str] = None) list[wxc_sdk.common.AuthCode][source]

Get Location Access Code

Retrieve access codes details for a customer location.

Use Access Codes to bypass the set permissions for all persons/workspaces at this location.

Retrieving access codes details requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve access codes details for this location.

  • org_id (str) – Retrieve access codes details for a customer location in this organization

Returns

list of wxc_sdk.common.CallPark

async create(*, location_id: str, access_codes: list[wxc_sdk.common.AuthCode], org_id: Optional[str] = None) list[wxc_sdk.common.AuthCode][source]
Parameters
  • location_id (str) – Add new access code for this location.

  • access_codes (list of wxc_sdk.common.AuthCode) – Access code details

  • org_id (str) – Add new access code for this organization.

async delete_codes(*, location_id: str, access_codes: list[Union[str, wxc_sdk.common.AuthCode]], org_id: Optional[str] = None) list[wxc_sdk.common.AuthCode][source]

Delete Access Code Location

Deletes the access code details for a particular location for a customer.

Use Access Codes to bypass the set permissions for all persons/workspaces at this location.

Modifying the access code location details requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Deletes the access code details for this location.

  • access_codes (list of wxc_sdk.common.AuthCode or str) – access codes to delete

  • org_id (str) – Delete access codes from this organization.

base = 'telephony/config/locations'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsAnnouncementApi(*, session: AsRestSession)[source]

Bases: object

API for call queue Announcements

list_gen(*, location_id: str, queue_id: str, org_id: Optional[str] = None) AsyncGenerator[Announcement][source]
Parameters
  • location_id

  • queue_id

  • org_id

Returns

async list(*, location_id: str, queue_id: str, org_id: Optional[str] = None) List[Announcement][source]
Parameters
  • location_id

  • queue_id

  • org_id

Returns

async delete_announcement(*, location_id: str, queue_id: str, file_name: str, org_id: Optional[str] = None)[source]
Parameters
  • location_id (str) –

  • queue_id (str) –

  • file_name (str) –

  • org_id

class wxc_sdk.as_api.AsApiChild(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: object

Base class for child APIs of WebexSimpleApi

session: AsRestSession

REST session

ep(path: Optional[str] = None)[source]

endpoint URL for given path

Parameters

path (str) – path after APIChild subclass specific endpoint URI prefix

Returns

endpoint URL

Return type

str

async get(*args, **kwargs) Union[str, dict][source]

GET request

Parameters
  • args

  • kwargs

Returns

async post(*args, **kwargs) Union[str, dict][source]

POST request

Parameters
  • args

  • kwargs

Returns

async put(*args, **kwargs) Union[str, dict][source]

PUT request

Parameters
  • args

  • kwargs

Returns

async delete(*args, **kwargs) None[source]

DELETE request

Parameters
  • args

  • kwargs

async patch(*args, **kwargs) Union[str, dict][source]

PATCH request

Parameters
  • args

  • kwargs

class wxc_sdk.as_api.AsAppServicesApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s app services settings

feature = 'applications'
async read(*, person_id: str, org_id: Optional[str] = None) AppServicesSettings[source]

Retrieve a Person’s Application Services Settings

Application services let you determine the ringing behavior for calls made to people in certain scenarios. You can also specify which devices can download the Webex Calling app.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

privacy settings

Return type

Privacy

async configure(*, person_id: str, settings: AppServicesSettings, org_id: Optional[str] = None)[source]

Modify a Person’s Application Services Settings

Application services let you determine the ringing behavior for calls made to users in certain scenarios. You can also specify which devices users can download the Webex Calling app on.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • settings (AppServicesSettings) – settings for update

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsAuthCodesApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s outgoing permission authorization codes

feature = 'outgoingPermission/authorizationCodes'
async read(person_id: str, org_id: Optional[str] = None) list[wxc_sdk.common.AuthCode][source]

Retrieve Authorization codes for a Workspace.

Authorization codes are used to bypass permissions.

This API requires a full or read-only administrator auth token with a scope of spark-admin:workspaces_read or a user auth token with spark:workspaces_read scope can be used to read workspace settings.

Parameters
  • person_id (str) – Unique identifier for the workspace.

  • org_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

list of authorization codes

Return type

list of AuthCode

async delete_codes(person_id: str, access_codes: list[Union[str, wxc_sdk.common.AuthCode]], org_id: Optional[str] = None)[source]

Modify Authorization codes for a workspace.

Authorization codes are used to bypass permissions.

This API requires a full or user administrator auth token with the spark-admin:workspaces_write scope or a user auth token with spark:workspaces_write scope can be used to update workspace settings.

Parameters
  • person_id (str) – Unique identifier for the workspace.

  • access_codes (list[str]) – authorization codes to remove

  • org_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

async create(person_id: str, code: str, description: str, org_id: Optional[str] = None)[source]

Modify Authorization codes for a workspace.

Authorization codes are used to bypass permissions.

This API requires a full or user administrator auth token with the spark-admin:workspaces_write scope or a user auth token with spark:workspaces_write scope can be used to update workspace settings.

Parameters
  • person_id (str) – Unique identifier for the workspace.

  • code (str) – Indicates an authorization code.

  • description (str) – Indicates the description of the authorization code.

  • org_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsAutoAttendantApi(session: AsRestSession)[source]

Bases: AsApiChild

Auto attendant API

forwarding: AsForwardingApi
list_gen(*, org_id: Optional[str] = None, location_id: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, **params) AsyncGenerator[AutoAttendant, None, None][source]

Read the List of Auto Attendants List all Auto Attendants for the organization.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • org_id (str) – List auto attendants for this organization.

  • location_id (str) – Return the list of auto attendants for this location.

  • name (str) – Only return auto attendants with the matching name.

  • phone_number (str) – Only return auto attendants with the matching phone number.

Returns

yields AutoAttendant objects

async list(*, org_id: Optional[str] = None, location_id: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, **params) List[AutoAttendant][source]

Read the List of Auto Attendants List all Auto Attendants for the organization.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • org_id (str) – List auto attendants for this organization.

  • location_id (str) – Return the list of auto attendants for this location.

  • name (str) – Only return auto attendants with the matching name.

  • phone_number (str) – Only return auto attendants with the matching phone number.

Returns

yields AutoAttendant objects

async by_name(*, name: str, location_id: Optional[str] = None, org_id: Optional[str] = None) Optional[AutoAttendant][source]

Get auto attendant info by name

Parameters
  • location_id

  • name

  • org_id

Returns

async details(*, location_id: str, auto_attendant_id: str, org_id: Optional[str] = None) AutoAttendant[source]

Get Details for an Auto Attendant Retrieve an Auto Attendant details.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Retrieving an auto attendant details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve an auto attendant details in this location.

  • auto_attendant_id (str) – Retrieve the auto attendant with the matching ID.

  • org_id (str) – Retrieve auto attendant details from this organization.

Returns

auto attendant details

Return type

AutoAttendant

async create(*, location_id: str, settings: AutoAttendant, org_id: Optional[str] = None) str[source]

Create an Auto Attendant Create new Auto Attendant for the given location.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Creating an auto attendant requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Create the auto attendant for this location.

  • settings (AutoAttendant) – auto attendant settings for new auto attendant

  • org_id (str) – Create the auto attendant for this organization.

Returns

ID of the newly created auto attendant.

Return type

str

async update(*, location_id: str, auto_attendant_id: str, settings: AutoAttendant, org_id: Optional[str] = None)[source]

Update an Auto Attendant Update the designated Auto Attendant.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Updating an auto attendant requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Location in which this auto attendant exists.

  • auto_attendant_id (str) – Update an auto attendant with the matching ID.

  • settings (AutoAttendant) – auto attendant settings for the update

  • org_id (str) – Create the auto attendant for this organization.

async delete_auto_attendant(*, location_id: str, auto_attendant_id: str, org_id: Optional[str] = None)[source]

elete the designated Auto Attendant.

Auto attendants play customized prompts and provide callers with menu options for routing their calls through your system.

Deleting an auto attendant requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Location from which to delete an auto attendant.

  • auto_attendant_id (str) – Delete the auto attendant with the matching ID.

  • org_id (str) – Delete the auto attendant from this organization.

base = 'telephony/config/autoAttendants'
class wxc_sdk.as_api.AsBargeApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s barge settings

feature = 'bargeIn'
async read(*, person_id: str, org_id: Optional[str] = None) BargeSettings[source]

Retrieve a Person’s Barge In Settings

The Barge In feature enables you to use a Feature Access Code (FAC) to answer a call that was directed to another subscriber, or barge-in on the call if it was already answered. Barge In can be used across locations.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read or a user auth token with spark:people_read scope can be used by a person to read their own settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

barge settings for specific user

Return type

BargeSettings

async configure(*, person_id: str, barge_settings: BargeSettings, org_id: Optional[str] = None)[source]

Configure a Person’s Barge In Settings

The Barge In feature enables you to use a Feature Access Code (FAC) to answer a call that was directed to another subscriber, or barge-in on the call if it was already answered. Barge In can be used across locations.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their own settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • barge_settings (BargeSettings) – new setting to be applied

  • org_id – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsCallInterceptApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s call intercept settings

feature = 'intercept'
async read(*, person_id: str, org_id: Optional[str] = None) InterceptSetting[source]

Read Call Intercept Settings for a Person

Retrieves Person’s Call Intercept Settings

The intercept feature gracefully takes a person’s phone out of service, while providing callers with informative announcements and alternative routing options. Depending on the service configuration, none, some, or all incoming calls to the specified person are intercepted. Also depending on the service configuration, outgoing calls are intercepted or rerouted to another location.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

user’s call intercept settings

Return type

InterceptSetting

async configure(*, person_id: str, intercept: InterceptSetting, org_id: Optional[str] = None)[source]

Configure Call Intercept Settings for a Person

Configures a Person’s Call Intercept Settings

The intercept feature gracefully takes a person’s phone out of service, while providing callers with informative announcements and alternative routing options. Depending on the service configuration, none, some, or all incoming calls to the specified person are intercepted. Also depending on the service configuration, outgoing calls are intercepted or rerouted to another location.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • intercept (InterceptSetting) – new intercept settings

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

async greeting(person_id: str, content: Union[BufferedReader, str], upload_as: Optional[str] = None, org_id: Optional[str] = None)[source]

Configure Call Intercept Greeting for a Person

Configure a Person’s Call Intercept Greeting by uploading a Waveform Audio File Format, .wav, encoded audio file.

Your request will need to be a multipart/form-data request rather than JSON, using the audio/wav Content-Type.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • content (Union[BufferedReader, str]) – the file to be uploaded, can be a path to a file or a buffered reader (opened file); if a reader referring to an open file is passed then make sure to open the file as binary b/c otherwise the content length might be calculated wrong

  • upload_as (str) – filename for the content. Only required if content is a reader; has to be a .wav file name.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsCallParkApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

Call Park API

list_gen(location_id: str, order: Optional[Literal['ASC', 'DSC']] = None, name: Optional[str] = None, org_id: Optional[str] = None, **params) AsyncGenerator[CallPark, None, None][source]

Read the List of Call Parks

List all Call Parks for the organization.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

NOTE: The Call Park ID will change upon modification of the Call Park name.

Parameters
  • location_id (str) – Return the list of call parks for this location.

  • order (str) – Sort the list of call parks by name, either ASC or DSC. Default is ASC.

  • name (str) – Return the list of call parks that contains the given name. The maximum length is 80.

  • org_id (str) – List call parks for this organization.

  • params (dict) – dict of additional parameters passed directly to endpoint

:return yields CallPark objects

async list(location_id: str, order: Optional[Literal['ASC', 'DSC']] = None, name: Optional[str] = None, org_id: Optional[str] = None, **params) List[CallPark][source]

Read the List of Call Parks

List all Call Parks for the organization.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

NOTE: The Call Park ID will change upon modification of the Call Park name.

Parameters
  • location_id (str) – Return the list of call parks for this location.

  • order (str) – Sort the list of call parks by name, either ASC or DSC. Default is ASC.

  • name (str) – Return the list of call parks that contains the given name. The maximum length is 80.

  • org_id (str) – List call parks for this organization.

  • params (dict) – dict of additional parameters passed directly to endpoint

:return yields CallPark objects

async create(location_id: str, settings: CallPark, org_id: Optional[str] = None) str[source]

Create a Call Park

Create new Call Parks for the given location.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Creating a call park requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

NOTE: The Call Park ID will change upon modification of the Call Park name.

Parameters
  • location_id (str) – Create the call park for this location.

  • settings (CallPark) – settings for new call park

  • org_id – Create the call park for this organization.

Returns

ID of the newly created call park.

Return type

str

async delete_callpark(location_id: str, callpark_id: str, org_id: Optional[str] = None)[source]

Delete a Call Park

Delete the designated Call Park.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Deleting a call park requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

NOTE: The Call Park ID will change upon modification of the Call Park name.

Parameters
  • location_id (str) – Location from which to delete a call park.

  • callpark_id (str) – Delete the call park with the matching ID.

  • org_id (str) – Delete the call park from this organization.

async details(location_id: str, callpark_id: str, org_id: Optional[str] = None) CallPark[source]

Get Details for a Call Park

Retrieve Call Park details.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Retrieving call park details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

NOTE: The Call Park ID will change upon modification of the Call Park name.

Parameters
  • location_id (str) – Retrieve settings for a call park in this location.

  • callpark_id (str) – Retrieve settings for a call park with the matching ID.

  • org_id (str) – Retrieve call park settings from this organization.

Returns

call park info

Return type

CallPark

async update(location_id: str, callpark_id: str, settings: CallPark, org_id: Optional[str] = None) str[source]

Update a Call Park

Update the designated Call Park.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Updating a call park requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

NOTE: The Call Park ID will change upon modification of the Call Park name.

Parameters
  • location_id (str) – RLocation in which this call park exists.

  • callpark_id (str) – Update settings for a call park with the matching ID.

  • settings (CallPark) – updates

  • org_id (str) – Update call park settings from this organization.

available_agents_gen(location_id: str, call_park_name: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, order: Optional[str] = None, org_id: Optional[str] = None) AsyncGenerator[PersonPlaceAgent, None, None][source]

Get available agents from Call Parks Retrieve available agents from call parks for a given location.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Retrieving available agents from call parks requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return the available agents for this location.

  • call_park_name (str) – Only return available agents from call parks with the matching name.

  • name (str) – Only return available agents with the matching name.

  • phone_number (str) – Only return available agents with the matching primary number.

  • order (str) – Order the available agents according to the designated fields. Up to three vertical bar (|) separated sort order fields may be specified. Available sort fields: fname, lname, number and extension. The maximum supported sort order value is 3.

  • org_id (str) – Return the available agents for this organization.

Returns

yields PersonPlaceCallPark objects

async available_agents(location_id: str, call_park_name: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, order: Optional[str] = None, org_id: Optional[str] = None) List[PersonPlaceAgent][source]

Get available agents from Call Parks Retrieve available agents from call parks for a given location.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Retrieving available agents from call parks requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return the available agents for this location.

  • call_park_name (str) – Only return available agents from call parks with the matching name.

  • name (str) – Only return available agents with the matching name.

  • phone_number (str) – Only return available agents with the matching primary number.

  • order (str) – Order the available agents according to the designated fields. Up to three vertical bar (|) separated sort order fields may be specified. Available sort fields: fname, lname, number and extension. The maximum supported sort order value is 3.

  • org_id (str) – Return the available agents for this organization.

Returns

yields PersonPlaceCallPark objects

available_recalls_gen(location_id: str, name: Optional[str] = None, order: Optional[str] = None, org_id: Optional[str] = None) AsyncGenerator[AvailableRecallHuntGroup, None, None][source]

Get available recall hunt groups from Call Parks

Retrieve available recall hunt groups from call parks for a given location.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Retrieving available recall hunt groups from call parks requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return the available recall hunt groups for this location.

  • name (str) – Only return available recall hunt groups with the matching name.

  • order – Order the available recall hunt groups according to the designated fields. Available sort fields: lname.

  • order – str

  • org_id (str) – Return the available recall hunt groups for this organization.

Returns

yields AvailableRecallHuntGroup objects

async available_recalls(location_id: str, name: Optional[str] = None, order: Optional[str] = None, org_id: Optional[str] = None) List[AvailableRecallHuntGroup][source]

Get available recall hunt groups from Call Parks

Retrieve available recall hunt groups from call parks for a given location.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Retrieving available recall hunt groups from call parks requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return the available recall hunt groups for this location.

  • name (str) – Only return available recall hunt groups with the matching name.

  • order – Order the available recall hunt groups according to the designated fields. Available sort fields: lname.

  • order – str

  • org_id (str) – Return the available recall hunt groups for this organization.

Returns

yields AvailableRecallHuntGroup objects

async call_park_settings(location_id: str, org_id: Optional[str] = None) LocationCallParkSettings[source]

Get Call Park Settings

Retrieve Call Park Settings from call parks for a given location.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Retrieving settings from call parks requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return the call park settings for this location.

  • org_id (str) – Return the call park settings for this organization.

Returns

async update_call_park_settings(location_id: str, settings: LocationCallParkSettings, org_id: Optional[str] = None)[source]

Update Call Park settings

Update Call Park settings for the designated location.

Call Park allows call recipients to place a call on hold so that it can be retrieved from another device.

Updating call park settings requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Location for which call park settings will be updated.

  • settings (LocationCallParkSettings) – update settings

  • org_id (str) – Update call park settings from this organization.

base = 'telephony/config/callParks'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsCallPickupApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

Call Pickup API

list_gen(location_id: str, order: Optional[Literal['ASC', 'DSC']] = None, name: Optional[str] = None, org_id: Optional[str] = None, **params) AsyncGenerator[CallPickup, None, None][source]

Read the List of Call Pickups

List all Call Pickups for the organization.

Call Pickup enables a user(agent) to answer any ringing line within their pickup group.

Retrieving this list requires a full, user, or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

NOTE: The Call Pickup ID will change upon modification of the Call Pickup name.

Parameters
  • location_id (str) – Return the list of call pickups for this location.

  • order (str) – Sort the list of call pickups by name, either ASC or DSC. Default is ASC.

  • name (str) – Return the list of call pickups that contains the given name. The maximum length is 80.

  • org_id (str) – List call pickups for this organization.

:return yields CallPickup objects

async list(location_id: str, order: Optional[Literal['ASC', 'DSC']] = None, name: Optional[str] = None, org_id: Optional[str] = None, **params) List[CallPickup][source]

Read the List of Call Pickups

List all Call Pickups for the organization.

Call Pickup enables a user(agent) to answer any ringing line within their pickup group.

Retrieving this list requires a full, user, or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

NOTE: The Call Pickup ID will change upon modification of the Call Pickup name.

Parameters
  • location_id (str) – Return the list of call pickups for this location.

  • order (str) – Sort the list of call pickups by name, either ASC or DSC. Default is ASC.

  • name (str) – Return the list of call pickups that contains the given name. The maximum length is 80.

  • org_id (str) – List call pickups for this organization.

:return yields CallPickup objects

async create(location_id: str, settings: CallPickup, org_id: Optional[str] = None) str[source]

Create a Call Pickup

Create new Call Pickups for the given location.

Call Pickup enables a user(agent) to answer any ringing line within their pickup group.

Creating a call pickup requires a full or user administrator auth token with a scope of spark-admin:telephony_config_write.

NOTE: The Call Pickup ID will change upon modification of the Call Pickup name.

Parameters
  • location_id (str) – Create the call pickup for this location.

  • settings (CallPickup) – settings for new call pickup

  • org_id – Create the call pickup for this organization.

Returns

ID of the newly created call pickup.

Return type

str

async delete_pickup(location_id: str, pickup_id: str, org_id: Optional[str] = None)[source]

Delete a Call Pickup

Delete the designated Call Pickup.

Call Pickup enables a user(agent) to answer any ringing line within their pickup group.

Deleting a call pickup requires a full or user administrator auth token with a scope of spark-admin:telephony_config_write.

NOTE: The Call Pickup ID will change upon modification of the Call Pickup name.

Parameters
  • location_id (str) – Location from which to delete a call pickup.

  • pickup_id (str) – Delete the call pickup with the matching ID.

  • org_id (str) – Delete the call pickup from this organization.

async details(location_id: str, pickup_id: str, org_id: Optional[str] = None) CallPickup[source]

Get Details for a Call Pickup

Retrieve Call Pickup details.

Call Pickup enables a user(agent) to answer any ringing line within their pickup group.

Retrieving call pickup details requires a full, user, or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

NOTE: The Call Pickup ID will change upon modification of the Call Pickup name.

Parameters
  • location_id (str) – Retrieve settings for a call pickup in this location.

  • pickup_id (str) – Retrieve settings for a call pickup with the matching ID.

  • org_id (str) – Retrieve call pickup settings from this organization.

Returns

call pickup info

Return type

CallPickup

async update(location_id: str, pickup_id: str, settings: CallPickup, org_id: Optional[str] = None) str[source]

Update a Call Pickup

Update the designated Call Pickup.

Call Pickup enables a user(agent) to answer any ringing line within their pickup group.

Updating a call pickup requires a full or user administrator auth token with a scope of spark-admin:telephony_config_write.

NOTE: The Call Pickup ID will change upon modification of the Call Pickup name.

Parameters
  • location_id (str) – Location in which this call pickup exists.

  • pickup_id (str) – Update settings for a call pickup with the matching ID.

  • settings (CallPickup) – updates

  • org_id (str) – Update call pickup settings from this organization.

available_agents_gen(location_id: str, call_pickup_name: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, order: Optional[str] = None, org_id: Optional[str] = None) AsyncGenerator[PersonPlaceAgent, None, None][source]

Get available agents from Call Pickups Retrieve available agents from call pickups for a given location.

Call Pickup enables a user(agent) to answer any ringing line within their pickup group.

Retrieving available agents from call pickups requires a full, user, or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return the available agents for this location.

  • call_pickup_name (str) – Only return available agents from call pickups with the matching name.

  • name (str) – Only return available agents with the matching name.

  • phone_number (str) – Only return available agents with the matching primary number.

  • order (str) – Order the available agents according to the designated fields. Up to three vertical bar (|) separated sort order fields may be specified. Available sort fields: fname, lname, number and extension. The maximum supported sort order value is 3.

  • org_id (str) – Return the available agents for this organization.

Returns

yields PersonPlaceCallPark objects

async available_agents(location_id: str, call_pickup_name: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, order: Optional[str] = None, org_id: Optional[str] = None) List[PersonPlaceAgent][source]

Get available agents from Call Pickups Retrieve available agents from call pickups for a given location.

Call Pickup enables a user(agent) to answer any ringing line within their pickup group.

Retrieving available agents from call pickups requires a full, user, or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return the available agents for this location.

  • call_pickup_name (str) – Only return available agents from call pickups with the matching name.

  • name (str) – Only return available agents with the matching name.

  • phone_number (str) – Only return available agents with the matching primary number.

  • order (str) – Order the available agents according to the designated fields. Up to three vertical bar (|) separated sort order fields may be specified. Available sort fields: fname, lname, number and extension. The maximum supported sort order value is 3.

  • org_id (str) – Return the available agents for this organization.

Returns

yields PersonPlaceCallPark objects

base = 'telephony/config/callPickups'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsCallQueueApi(session: AsRestSession)[source]

Bases: object

Call Queue APÍ

forwarding: AsForwardingApi
announcement: AsAnnouncementApi
list_gen(*, location_id: Optional[str] = None, name: Optional[str] = None, org_id: Optional[str] = None, **params) AsyncGenerator[CallQueue, None, None][source]

Read the List of Call Queues List all Call Queues for the organization.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned an internal extension, which can be dialed internally to reach users assigned to the call queue.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Only return call queues with matching location ID.

  • name (str) – Only return call queues with the matching name.

  • org_id (str) – List call queues for this organization

  • params (dict) – dict of additional parameters passed directly to endpoint

Returns

yields CallQueue objects

async list(*, location_id: Optional[str] = None, name: Optional[str] = None, org_id: Optional[str] = None, **params) List[CallQueue][source]

Read the List of Call Queues List all Call Queues for the organization.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned an internal extension, which can be dialed internally to reach users assigned to the call queue.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Only return call queues with matching location ID.

  • name (str) – Only return call queues with the matching name.

  • org_id (str) – List call queues for this organization

  • params (dict) – dict of additional parameters passed directly to endpoint

Returns

yields CallQueue objects

async by_name(*, name: str, location_id: Optional[str] = None, org_id: Optional[str] = None) Optional[CallQueue][source]

Get queue info by name

Parameters
  • location_id

  • name

  • org_id

Returns

async create(*, location_id: str, settings: CallQueue, org_id: Optional[str] = None) str[source]

Create a Call Queue Create new Call Queues for the given location.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned an internal extension, which can be dialed internally to reach users assigned to the call queue.

Creating a call queue requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Create the call queue for this location.

  • settings (CallQueue) – parameters for queue creation.

  • org_id (str) – Create the call queue for this organization.

Returns

queue id

Return type

str

async delete_queue(*, location_id: str, queue_id: str, org_id: Optional[str] = None)[source]

Delete a Call Queue Delete the designated Call Queue.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned an internal extension, which can be dialed internally to reach users assigned to the call queue.

Deleting a call queue requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Location from which to delete a call queue.

  • queue_id (str) – Delete the call queue with the matching ID.

  • org_id (str) – Delete the call queue from this organization.

async details(*, location_id: str, queue_id: str, org_id: Optional[str] = None) CallQueue[source]

Get Details for a Call Queue Retrieve Call Queue details.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned anvinternal extension, which can be dialed internally to reach users assigned to the call queue.

Retrieving call queue details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve settings for a call queue in this location

  • queue_id (str) – Retrieve settings for the call queue with this identifier.

  • org_id (str) – Retrieve call queue settings from this organization.

Returns

call queue details

Return type

CallQueue

async update(*, location_id: str, queue_id: str, update: CallQueue, org_id: Optional[str] = None)[source]

Update a Call Queue

Update the designated Call Queue.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned an internal extension, which can be dialed internally to reach users assigned to the call queue.

Updating a call queue requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Examples:

api = WebexSimpleApi()

# shortcut
cq = api.telephony.callqueue

# disable a call queue
update = CallQueue(enabled=False)
cq.update(location_id=...,
          queue_id=...,
          update=update)

# set the call routing policy to SIMULTANEOUS
update = CallQueue(call_policies=CallPolicies(policy=Policy.simultaneous))
cq.update(location_id=...,
          queue_id=...,
          update=update)
# don't bounce calls after the set number of rings.
update = CallQueue(
    call_policies=CallPolicies(
        call_bounce=CallBounce(
            enabled=False)))
cq.update(location_id=...,
          queue_id=...,
          update=update)

Alternatively you can also read call queue details, update them in place and then call update().

details = cq.details(location_id=...,
                     queue_id=...)
details.call_policies.call_bounce.agent_unavailable_enabled=False
details.call_policies.call_bounce.on_hold_enabled=False
cq.update(location_id=...,
          queue_id=...,
          update=details)
Parameters
  • location_id (str) – Location in which this call queue exists.

  • queue_id (str) – Update setting for the call queue with the matching ID.

  • update (CallQueue) – updates

  • org_id – Update call queue settings from this organization.

class wxc_sdk.as_api.AsCallRecordingApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s call recording settings

feature = 'callRecording'
async read(*, person_id: str, org_id: Optional[str] = None) CallRecordingSetting[source]

Read Call Recording Settings for a Person

Retrieve a Person’s Call Recording Settings

The Call Recording feature provides a hosted mechanism to record the calls placed and received on the Carrier platform for replay and archival. This feature is helpful for quality assurance, security, training, and more.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

async configure(*, person_id: str, recording: CallRecordingSetting, org_id: Optional[str] = None)[source]

Configure Call Recording Settings for a Person

Configure a Person’s Call Recording Settings

The Call Recording feature provides a hosted mechanism to record the calls placed and received on the Carrier platform for replay and archival. This feature is helpful for quality assurance, security, training, and more.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • recording (CallRecordingSetting) – the new recording settings

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsCallWaitingApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s call waiting settings

feature = 'callWaiting'
async read(*, person_id: str, org_id: Optional[str] = None) bool[source]

Read Call Waiting Settings for a Person

Retrieve a Person’s Call Waiting Settings

With this feature, a person can place an active call on hold and answer an incoming call. When enabled, while you are on an active call, a tone alerts you of an incoming call and you can choose to answer or ignore the call.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

call waiting setting

Return type

bool

async configure(*, person_id: str, enabled: bool, org_id: Optional[str] = None)[source]

Configure Call Waiting Settings for a Person

Configure a Person’s Call Waiting Settings

With this feature, a person can place an active call on hold and answer an incoming call. When enabled, while you are on an active call, a tone alerts you of an incoming call and you can choose to answer or ignore the call.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • enabled (bool) – true if the Call Waiting feature is enabled.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsCallerIdApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s caller id settings

feature = 'callerId'
async read(*, person_id: str, org_id: Optional[str] = None) CallerId[source]

Retrieve a Person’s Caller ID Settings

Caller ID settings control how a person’s information is displayed when making outgoing calls.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read or a user auth token with spark:people_read scope can be used by a person to read their settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

async configure(*, person_id: str, org_id: Optional[str] = None, selected: Optional[CallerIdSelectedType] = None, custom_number: Optional[str] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, external_caller_id_name_policy: Optional[ExternalCallerIdNamePolicy] = None, custom_external_caller_id_name: Optional[str] = None)[source]

Configure a Person’s Caller ID Settings

Caller ID settings control how a person’s information is displayed when making outgoing calls.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their own settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

  • selected (CallerIdSelectedType) – Which type of outgoing Caller ID will be used.

  • custom_number (str) – This value must be an assigned number from the person’s location.

  • first_name (str) – Person’s Caller ID first name. Characters of %, +, `, ” and Unicode characters are not allowed.

  • last_name (str) – Person’s Caller ID last name. Characters of %, +, `, ” and Unicode characters are not allowed.

  • external_caller_id_name_policy (ExternalCallerIdNamePolicy) – Designates which type of External Caller Id Name policy is used. Default is DIRECT_LINE.

  • custom_external_caller_id_name (str) – Custom External Caller Name, which will be shown if External Caller Id Name is OTHER.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsCallingBehaviorApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s calling behavior settings

feature = 'callingBehavior'
async read(*, person_id: str, org_id: Optional[str] = None) CallingBehavior[source]

Read Person’s Calling Behavior

Retrieves the calling behavior and UC Manager Profile settings for the person which includes overall calling behavior and calling UC Manager Profile ID.

Webex Calling Behavior controls which Webex telephony application is to be used.

An organization has an organization-wide default Calling Behavior that may be overridden for individual persons.

In addition, UC Manager Profiles are applicable if your organization uses Jabber in Team Messaging mode or Calling in Webex Teams (Unified CM).

The UC Manager Profile also has an organization-wide default and may be overridden for individual persons.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

calling behavior setting

Return type

CallingBehavior

async configure(*, person_id: str, settings: CallingBehavior, org_id: Optional[str] = None)[source]

Configure a Person’s Calling Behavior

Modifies the calling behavior settings for the person which includes overall calling behavior and UC Manager Profile ID.

Webex Calling Behavior controls which Webex telephony application is to be used.

An organization has an organization-wide default Calling Behavior that may be overridden for individual persons.

In addition, UC Manager Profiles are applicable if your organization uses Jabber in Team Messaging mode or Calling in Webex Teams (Unified CM).

The UC Manager Profile also has an organization-wide default and may be overridden for individual persons.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • settings (CallingBehavior) – new settings

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsCallparkExtensionApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

Call Park Extension API

list_gen(org_id: Optional[str] = None, extension: Optional[str] = None, name: Optional[str] = None, location_id: Optional[str] = None, location_name: Optional[str] = None, order: Optional[str] = None, **params) AsyncGenerator[CallParkExtension, None, None][source]

Read the List of Call Park Extensions

List all Call Park Extensions for the organization.

The Call Park service, enabled for all users by default, allows a user to park a call against an available user’s extension or to a Call Park Extension. Call Park Extensions are extensions defined within the Call Park service for holding parked calls.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • org_id (str) – List call park extensions for this organization.

  • extension (str) – Only return call park extensions with the matching extension.

  • name (str) – Only return call park extensions with the matching name.

  • location_id (str) – Only return call park extensions with matching location ID.

  • location_name (str) – Only return call park extensions with matching location name.

  • order (str) – Order the available agents according to the designated fields. Available sort fields: groupName, callParkExtension, callParkExtensionName, callParkExtensionExternalId.

  • params – additional parameters

Returns

yields wxc_sdk.common.CallParkExtension instances

async list(org_id: Optional[str] = None, extension: Optional[str] = None, name: Optional[str] = None, location_id: Optional[str] = None, location_name: Optional[str] = None, order: Optional[str] = None, **params) List[CallParkExtension][source]

Read the List of Call Park Extensions

List all Call Park Extensions for the organization.

The Call Park service, enabled for all users by default, allows a user to park a call against an available user’s extension or to a Call Park Extension. Call Park Extensions are extensions defined within the Call Park service for holding parked calls.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • org_id (str) – List call park extensions for this organization.

  • extension (str) – Only return call park extensions with the matching extension.

  • name (str) – Only return call park extensions with the matching name.

  • location_id (str) – Only return call park extensions with matching location ID.

  • location_name (str) – Only return call park extensions with matching location name.

  • order (str) – Order the available agents according to the designated fields. Available sort fields: groupName, callParkExtension, callParkExtensionName, callParkExtensionExternalId.

  • params – additional parameters

Returns

yields wxc_sdk.common.CallParkExtension instances

async details(location_id: str, cpe_id: str, org_id: Optional[str] = None) CallParkExtension[source]

Get Details for a Call Park Extension

Retrieve Call Park Extension details.

The Call Park service, enabled for all users by default, allows a user to park a call against an available user’s extension or to a Call Park Extension. Call Park Extensions are extensions defined within the Call Park service for holding parked calls.

Retrieving call park extension details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve details for a call park extension in this location.

  • cpe_id (str) – Retrieve details for a call park extension with the matching ID.

  • org_id (str) – Retrieve call park extension details from this organization

Returns

call park extension details

Return type

wxc_sdk.common.CallParkExtension instance (only name and extension are set)

base = 'telephony/config/huntGroups'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsCallsApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

async dial(destination: str) DialResponse[source]

Initiate an outbound call to a specified destination. This is also commonly referred to as Click to Call or Click to Dial. Alerts on all the devices belonging to the user. When the user answers on one of these alerting devices, an outbound call is placed from that device to the destination.

Parameters

destination (str) – The destination to be dialed. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, sip:user@company.domain

Returns

Call id and call session id

async answer(call_id: str)[source]

Answer an incoming call on the user’s primary device.

Parameters

call_id (str) – The call identifier of the call to be answered.

async reject(call_id: str, action: Optional[RejectAction] = None)[source]

Reject an unanswered incoming call.

Parameters
  • call_id (str) – The call identifier of the call to be rejected.

  • action – The rejection action to apply to the call. The busy action is applied if no specific action is provided.

async hangup(call_id: str)[source]

Hangup a call. If used on an unanswered incoming call, the call is rejected and sent to busy.

Parameters

call_id (str) – The call identifier of the call to hangup.

async hold(call_id: str)[source]

Hold a connected call.

Parameters

call_id (str) – The call identifier of the call to hold.

async resume(call_id: str)[source]

Resume a held call.

Parameters

call_id (str) – The call identifier of the call to resume.

async divert(call_id: str, destination: Optional[str] = None, to_voicemail: Optional[bool] = None)[source]

Divert a call to a destination or a user’s voicemail. This is also commonly referred to as Blind Transfer

Parameters
  • call_id (str) – The call identifier of the call to divert.

  • destination (str) – The destination to divert the call to. If toVoicemail is false, destination is required. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, sip:user@company.domain

  • to_voicemail (bool) – If set to true, the call is diverted to voicemail. If no destination is specified, the call is diverted to the user’s own voicemail. If a destination is specified, the call is diverted to the specified user’s voicemail.

async transfer(call_id1: Optional[str] = None, call_id2: Optional[str] = None, destination: Optional[str] = None)[source]

Transfer two calls together. Unanswered incoming calls cannot be transferred but can be diverted using the divert API. If the user has only two calls and wants to transfer them together, the callId1 and callId2 parameters are optional and when not provided the calls are automatically selected and transferred. If the user has more than two calls and wants to transfer two of them together, the callId1 and callId2 parameters are mandatory to specify which calls are being transferred. These are also commonly referred to as Attended Transfer, Consultative Transfer, or Supervised Transfer and will return a 204 response. If the user wants to transfer one call to a new destination but only when the destination responds, the callId1 and destination parameters are mandatory to specify the call being transferred and the destination. This is referred to as a Mute Transfer and is similar to the divert API with the difference of waiting for the destination to respond prior to transferring the call. If the destination does not respond, the call is not transferred. This will return a 201 response.

Parameters
  • call_id1 (str) – The call identifier of the first call to transfer. This parameter is mandatory if either call_id2 or destination is provided.

  • call_id2 – The call identifier of the first call to transfer. This parameter is mandatory if either callId2 or destination is provided.

  • destination (str) – The destination to be transferred to. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, sip:user@company.domain. This parameter is mandatory if call_id1 is provided and call_id2 is not provided.

async park(call_id: str, destination: Optional[str] = None, is_group_park: Optional[bool] = None) ParkedAgainst[source]

Park a connected call. The number field in the response can be used as the destination for the retrieve command to retrieve the parked call.

Parameters
  • call_id (str) – The call identifier of the call to park.

  • destination (str) – Identifies where the call is to be parked. If not provided, the call is parked against the parking user. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, sip:user@company.domain

  • is_group_park (bool) – If set to true, the call is parked against an automatically selected member of the user’s call park group and the destination parameter is ignored.

Returns

The details of where the call has been parked.

Return type

ParkedAgainst

async retrieve(destination: str) CallInfo[source]
Parameters

destination – Identifies where the call is parked. The number field from the park command response can be used as the destination for the retrieve command. If not provided, the call parked against the retrieving user is retrieved. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, sip:user@company.domain

Returns

call id and call session id of retreived call

Return type

CallInfo

async start_recording(call_id: str)[source]

Start recording a call. Use of this API is only valid when the user’s call recording mode is set to “On Demand”.

Parameters

call_id (str) – The call identifier of the call to start recording.

async stop_recording(call_id: str)[source]

Stop recording a call. Use of this API is only valid when a call is being recorded and the user’s call recording mode is set to “On Demand”.

Parameters

call_id (str) – The call identifier of the call to stop recording.

async pause_recording(call_id: str)[source]

Pause recording on a call. Use of this API is only valid when a call is being recorded and the user’s call recording mode is set to “On Demand” or “Always with Pause/Resume”.

Parameters

call_id (str) – The call identifier of the call to pause recording.

async resume_recording(call_id: str)[source]

Resume recording a call. Use of this API is only valid when a call’s recording is paused and the user’s call recording mode is set to “On Demand” or “Always with Pause/Resume”.

Parameters

call_id (str) – The call identifier of the call to resume recording.

async transmit_dtmf(call_id: str, dtmf: str)[source]

Transmit DTMF digits to a call.

Parameters
  • call_id (str) – The call identifier of the call to hold.

  • dtmf – The DTMF digits to transmit. Each digit must be part of the following set: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, #, A, B, C, D]. A comma “,” may be included to indicate a pause between digits. For the value “1,234”, the DTMF 1 digit is initially sent. After a pause, the DTMF 2, 3, and 4 digits are sent successively.

async push(call_id: str)[source]

Pushes a call from the assistant to the executive the call is associated with. Use of this API is only valid when the assistant’s call is associated with an executive.

Parameters

call_id (str) – The call identifier of the call to push.

async pickup(target: str) CallInfo[source]

Picks up an incoming call to another user. A new call is initiated to perform the pickup in a similar manner to the dial command. When target is not present, the API pickups up a call from the user’s call pickup group. When target is present, the API pickups an incoming call from the specified target user.

Parameters

target (str) – Identifies the user to pickup an incoming call from. If not provided, an incoming call to the user’s call pickup group is picked up. The target can be digits or a URI. Some examples for target include: 1234, 2223334444, +12223334444, tel:+12223334444, user@company.domain, sip:user@company.domain

Returns

call info of picked up call

Return type

CallInfo

async barge_in(target: str)[source]

Barge-in on another user’s answered call. A new call is initiated to perform the barge-in in a similar manner to the dial command.

Parameters

target (str) – Identifies the user to barge-in on. The target can be digits or a URI. Some examples for target include: 1234, 2223334444, +12223334444, tel:+12223334444, user@company.domain, sip:user@company.domain

Returns

call info of picked up call

Return type

CallInfo

list_calls_gen() AsyncGenerator[TelephonyCall, None, None][source]

Get the list of details for all active calls associated with the user.

Returns

yield TelephonyCall

async list_calls() List[TelephonyCall][source]

Get the list of details for all active calls associated with the user.

Returns

yield TelephonyCall

async call_details(call_id: str) TelephonyCall[source]

Get the details of the specified active call for the user.

Parameters

call_id (str) – The call identifier of the call.

Returns

call details

Return type

TelephonyCall

call_history_gen(history_type: Optional[Union[str, HistoryType]] = None) AsyncGenerator[CallHistoryRecord, None, None][source]

List Call History Get the list of call history records for the user. A maximum of 20 call history records per type (placed, missed, received) are returned.

Parameters

history_type (HistoryType or str) – The type of call history records to retrieve. If not specified, then all call history records are retrieved. Possible values: placed, missed, received

Returns

yields CallHistoryRecord objects

async call_history(history_type: Optional[Union[str, HistoryType]] = None) List[CallHistoryRecord][source]

List Call History Get the list of call history records for the user. A maximum of 20 call history records per type (placed, missed, received) are returned.

Parameters

history_type (HistoryType or str) – The type of call history records to retrieve. If not specified, then all call history records are retrieved. Possible values: placed, missed, received

Returns

yields CallHistoryRecord objects

base = 'telephony/calls'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsDndApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s DND settings

feature = 'doNotDisturb'
async read(*, person_id: str, org_id: Optional[str] = None) DND[source]

Read Do Not Disturb Settings for a Person Retrieve a Person’s Do Not Disturb Settings

When enabled, this feature will give all incoming calls the busy treatment. Optionally, you can enable a Ring Reminder to play a brief tone on your desktop phone when you receive incoming calls.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read or a user auth token with spark:people_read scope can be used by a person to read their settings. :param person_id: Unique identifier for the person. :type person_id: str :param org_id: Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API. :type org_id: str :return:

async configure(*, person_id: str, dnd_settings: DND, org_id: Optional[str] = None)[source]

Configure Do Not Disturb Settings for a Person Configure a Person’s Do Not Disturb Settings

When enabled, this feature will give all incoming calls the busy treatment. Optionally, you can enable a Ring Reminder to play a brief tone on your desktop phone when you receive incoming calls.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • dnd_settings (DND) – new setting to be applied

  • org_id – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsExecAssistantApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s exec assistant settings

feature = 'executiveAssistant'
async read(*, person_id: str, org_id: Optional[str] = None) ExecAssistantType[source]

Retrieve Executive Assistant Settings for a Person

Retrieve the executive assistant settings for the specified personId.

People with the executive service enabled, can select from a pool of assistants who have been assigned the executive assistant service and who can answer or place calls on their behalf. Executive assistants can set the call forward destination and join or leave an executive’s pool.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

exec assistant setting

Return type

ExecAssistantType

async configure(*, person_id: str, setting: ExecAssistantType, org_id: Optional[str] = None)[source]

Modify Executive Assistant Settings for a Person

Modify the executive assistant settings for the specified personId.

People with the executive service enabled, can select from a pool of assistants who have been assigned the executive assistant service and who can answer or place calls on their behalf. Executive assistants can set the call forward destination and join or leave an executive’s pool.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • setting (ExecAssistantType) – New exex assistant settings

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsForwardingApi(session: AsRestSession, feature_selector: FeatureSelector)[source]

Bases: object

API for forwarding settings on call queues, hunt groups, and auto attendants

async settings(location_id: str, feature_id: str, org_id: Optional[str] = None) CallForwarding[source]

Retrieve Call Forwarding settings for the designated feature including the list of call forwarding rules.

Parameters
  • location_id (str) – Location in which this feature exists.

  • feature_id (str) – Retrieve the call forwarding settings for this entity

  • org_id (str) – Retrieve call forwarding settings from this organization.

Returns

call forwarding settings

Return type

class:CallForwarding

async update(location_id: str, feature_id: str, forwarding: CallForwarding, org_id: Optional[str] = None)[source]

Update Call Forwarding Settings for a feature

Update Call Forwarding settings for the designated feature.

Updating call forwarding settings for a feature requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Location in which this feature exists.

  • feature_id (str) – Update call forwarding settings for this feature.

  • forwarding (CallForwarding) – Forwarding settings

  • org_id (str) – Update feature forwarding settings from this organization.

async create_call_forwarding_rule(location_id: str, feature_id: str, forwarding_rule: ForwardingRuleDetails, org_id: Optional[str] = None) str[source]

Create a Selective Call Forwarding Rule feature

A selective call forwarding rule for feature to be forwarded or not forwarded to the designated number, based on the defined criteria.

Note that the list of existing call forward rules is available feature’s call forwarding settings. :param location_id: Location in which the call queue exists. :type location_id: str :param feature_id: Create the rule for this feature :type feature_id: str :param forwarding_rule: details of rule to be created :type forwarding_rule: ForwardingRuleDetails :param org_id: Create the feature forwarding rule for this organization. :type org_id: str :return: forwarding rule id :rtype; str

async call_forwarding_rule(location_id: str, feature_id: str, rule_id: str, org_id: Optional[str] = None) ForwardingRuleDetails[source]

Retrieve a Selective Call Forwarding Rule’s settings for the designated Call Queue.

A selective call forwarding rule for feature allows calls to be forwarded or not forwarded to the designated number, based on the defined criteria.

Note that the list of existing call forward rules is available in the feature’s call forwarding settings. :param location_id: Location in which the feature exists. :type location_id: stre :param feature_id: Retrieve setting for a rule for this feature. :type feature_id: str :param rule_id: feature rule you are retrieving settings for. :type rule_id: str :param org_id: Retrieve feature forwarding settings from this organization. :type org_id: str :return: call forwarding rule details :rtype: ForwardingRuleDetails

async update_call_forwarding_rule(location_id: str, feature_id: str, rule_id: str, forwarding_rule: ForwardingRuleDetails, org_id: Optional[str] = None) str[source]

Update a Selective Call Forwarding Rule’s settings for the designated feature.

A selective call forwarding rule for feature allows calls to be forwarded or not forwarded to the designated number, based on the defined criteria.

Note that the list of existing call forward rules is available in the feature’s call forwarding settings.

NOTE: The Call Forwarding Rule ID will change upon modification of the Call Forwarding Rule name.

Parameters
  • location_id (str) – Location in which the feature exists.

  • feature_id (str) – Update settings for a rule for this feature.

  • rule_id (str) – feature you are updating settings for.

  • forwarding_rule (ForwardingRuleDetails) – forwarding rule details for update

  • org_id (str) – Update feature rule settings for this organization.

Returns

new call forwarding rule id

Return type

str

async delete_call_forwarding_rule(location_id: str, feature_id: str, rule_id: str, org_id: Optional[str] = None)[source]

Delete a Selective Call Forwarding Rule for the designated feature.

A selective call forwarding rule for a feature allows calls to be forwarded or not forwarded to the designated number, based on the defined criteria.

Note that the list of existing call forward rules is available in the feature’s call forwarding settings.

class wxc_sdk.as_api.AsGroupsApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

list_gen(*, include_members: Optional[bool] = None, attributes: Optional[str] = None, sort_by: Optional[str] = None, sort_order: Optional[str] = None, list_filter: Optional[str] = None, org_id: Optional[str] = None, **params) AsyncGenerator[Group, None, None][source]

List groups

Parameters
  • include_members (bool) – Include members in list response

  • attributes (str) – comma separated list of attributes to return

  • sort_by (str) – attribute to sort by

  • sort_order (str) – sort order, ascending or descending

  • org_id (str) – organisation ID

  • list_filter (str) – filter expression. Example: displayName eq “test”

  • params

Returns

generator of Group objects

async list(*, include_members: Optional[bool] = None, attributes: Optional[str] = None, sort_by: Optional[str] = None, sort_order: Optional[str] = None, list_filter: Optional[str] = None, org_id: Optional[str] = None, **params) List[Group][source]

List groups

Parameters
  • include_members (bool) – Include members in list response

  • attributes (str) – comma separated list of attributes to return

  • sort_by (str) – attribute to sort by

  • sort_order (str) – sort order, ascending or descending

  • org_id (str) – organisation ID

  • list_filter (str) – filter expression. Example: displayName eq “test”

  • params

Returns

generator of Group objects

async 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

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

Get group details

Parameters
  • group_id (str) – group id

  • include_members (bool) – return members in response

Returns

group details

Return type

Group

members_gen(*, group_id: str, **params) AsyncGenerator[GroupMember, None, None][source]

Query members of a group

Parameters
  • group_id (str) – group id

  • params

Returns

generator of GroupMember instances

async members(*, group_id: str, **params) List[GroupMember][source]

Query members of a group

Parameters
  • group_id (str) – group id

  • params

Returns

generator of GroupMember instances

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

update group information.

Options: change displayName, add new members, remove some or all members, replace all members

Parameters
  • group_id

  • settings

  • remove_all

Returns

async delete_group(group_id: str)[source]

Delete a group

Parameters

group_id (str) – group id

base = 'groups'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsHotelingApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s hoteling settings

feature = 'hoteling'
async read(*, person_id: str, org_id: Optional[str] = None) bool[source]

Read Hoteling Settings for a Person

Retrieve a person’s hoteling settings.

As an administrator, you can enable hoteling for people so that their phone profile (phone number, features, and calling plan) is temporarily loaded onto a shared (host) phone.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

hoteling setting

Return type

bool

async configure(*, person_id: str, enabled: bool, org_id: Optional[str] = None)[source]

Configure Hoteling Settings for a Person

Configure a person’s hoteling settings.

As an administrator, you can enable hoteling for people so that their phone profile (phone number, features, and calling plan) is temporarily loaded onto a shared (host) phone.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • enabled (bool) – When true, allow this person to connect to a Hoteling host device.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsHuntGroupApi(session: AsRestSession)[source]

Bases: AsApiChild

Hunt Group API

forwarding: AsForwardingApi
list_gen(org_id: Optional[str] = None, location_id: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, **params) AsyncGenerator[HuntGroup, None, None][source]

Read the List of Hunt Groups

List all calling Hunt Groups for the organization.

Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • org_id – List hunt groups for this organization.

  • location_id – Only return hunt groups with matching location ID.

  • name – Only return hunt groups with the matching name.

  • phone_number – Only return hunt groups with the matching primary phone number or extension.

Returns

yields HuntGroup instances

async list(org_id: Optional[str] = None, location_id: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, **params) List[HuntGroup][source]

Read the List of Hunt Groups

List all calling Hunt Groups for the organization.

Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • org_id – List hunt groups for this organization.

  • location_id – Only return hunt groups with matching location ID.

  • name – Only return hunt groups with the matching name.

  • phone_number – Only return hunt groups with the matching primary phone number or extension.

Returns

yields HuntGroup instances

async by_name(name: str, location_id: Optional[str] = None, org_id: Optional[str] = None) Optional[HuntGroup][source]

Get hunt group info by name :param location_id: :param name: :param org_id: :return:

async create(location_id: str, settings: HuntGroup, org_id: Optional[str] = None) str[source]

Create a Hunt Group

Create new Hunt Groups for the given location.

Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.

Creating a hunt group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Create the hunt group for the given location.

  • settings (HuntGroup) – hunt group details

  • org_id (str) – Create the hunt group for this organization.

Returns

ID of the newly created hunt group.

Return type

str

async delete_huntgroup(location_id: str, huntgroup_id: str, org_id: Optional[str] = None)[source]

Delete a Hunt Group

Delete the designated Hunt Group.

Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.

Deleting a hunt group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Location from which to delete a hunt group.

  • huntgroup_id (str) – Delete the hunt group with the matching ID.

  • org_id (str) – Delete the hunt group with the matching ID.

async details(location_id: str, huntgroup_id: str, org_id: Optional[str] = None) HuntGroup[source]

Get Details for a Hunt Group

Retrieve Hunt Group details.

Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.

Retrieving hunt group details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve settings for a hunt group in this location.

  • huntgroup_id (str) – Retrieve settings for the hunt group with this identifier.

  • org_id (str) – Retrieve hunt group settings from this organization.

Returns

hunt group details

async update(location_id: str, huntgroup_id: str, update: HuntGroup, org_id: Optional[str] = None)[source]

Update a Hunt Group

Update the designated Hunt Group.

Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.

Updating a hunt group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Update the hunt group for this location.

  • huntgroup_id (str) – Update setting for the hunt group with the matching ID.

  • update (HuntGroup) – hunt group settings

  • org_id – Update hunt group settings from this organization.

base = 'telephony/config/huntGroups'
class wxc_sdk.as_api.AsIncomingPermissionsApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s incoming permissions settings

feature = 'incomingPermission'
async read(*, person_id: str, org_id: Optional[str] = None) IncomingPermissions[source]

Read Incoming Permission Settings for a Person

Retrieve a Person’s Incoming Permission Settings

You can change the incoming calling permissions for a person if you want them to be different from your organization’s default.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

incoming permission settings for specific user

Return type

IncomingPermissions

async configure(*, person_id: str, settings: IncomingPermissions, org_id: Optional[str] = None)[source]

Configure a Person’s Barge In Settings

The Barge In feature enables you to use a Feature Access Code (FAC) to answer a call that was directed to another subscriber, or barge-in on the call if it was already answered. Barge In can be used across locations.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their own settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • settings (IncomingPermissions) – new setting to be applied

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsLicensesApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

Licenses

An allowance for features and services that are provided to users on a Webex services subscription. Cisco and its partners manage the amount of licenses provided to administrators and users. This license resource can be accessed only by an admin.

list_gen(org_id: Optional[str] = None) AsyncGenerator[License, None, None][source]

List all licenses for a given organization. If no org_id is specified, the default is the organization of the authenticated user.

Response properties that are not applicable to the license will not be present in the response.

Parameters

org_id (str) – List licenses for this organization.

Returns

yields License instances

async list(org_id: Optional[str] = None) List[License][source]

List all licenses for a given organization. If no org_id is specified, the default is the organization of the authenticated user.

Response properties that are not applicable to the license will not be present in the response.

Parameters

org_id (str) – List licenses for this organization.

Returns

yields License instances

async details(license_id) License[source]

Shows details for a license, by ID.

Response properties that are not applicable to the license will not be present in the response.

Parameters

license_id (str) – The unique identifier for the license.

Returns

license details

Return type

License

base = 'licenses'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsLocationInterceptApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

API for location’s call intercept settings

async read(*, location_id: str, org_id: Optional[str] = None) InterceptSetting[source]

Get Location Intercept

Retrieve intercept location details for a customer location.

Intercept incoming or outgoing calls for persons in your organization. If this is enabled, calls are either routed to a designated number the person chooses, or to the person’s voicemail.

Retrieving intercept location details requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve intercept details for this location.

  • org_id (str) – Retrieve intercept location details for a customer location.

Returns

user’s call intercept settings

Return type

wxc_sdk.person_settings.call_intercept.InterceptSetting

async configure(*, location_id: str, settings: InterceptSetting, org_id: Optional[str] = None)[source]

Put Location Intercept

Modifies the intercept location details for a customer location.

Intercept incoming or outgoing calls for users in your organization. If this is enabled, calls are either routed to a designated number the user chooses, or to the user’s voicemail.

Modifying the intercept location details requires a full, user administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Unique identifier for the person.

  • settings (InterceptSetting) – new intercept settings

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = 'telephony/config/locations'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsLocationMoHApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

Access codes API

async read(*, location_id: str, org_id: Optional[str] = None) LocationMoHSetting[source]

Get Music On Hold

Retrieve the location’s music on hold settings.

Location’s music on hold settings allows you to play music when a call is placed on hold or parked.

Retrieving location’s music on hold settings requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve access codes details for this location.

  • org_id (str) – Retrieve access codes details for a customer location in this organization

Returns

MoH settings

Return type

LocationMoHSetting

async update(*, location_id: str, settings: LocationMoHSetting, org_id: Optional[str] = None) LocationMoHSetting[source]

Get Music On Hold

Retrieve the location’s music on hold settings.

Location’s music on hold settings allows you to play music when a call is placed on hold or parked.

Retrieving location’s music on hold settings requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve access codes details for this location.

  • settings (LocationMoHSetting) – new settings

  • org_id (str) – Retrieve access codes details for a customer location in this organization

Returns

list of wxc_sdk.common.CallPark

async create(*, location_id: str, access_codes: list[wxc_sdk.common.AuthCode], org_id: Optional[str] = None) list[wxc_sdk.common.AuthCode][source]
Parameters
  • location_id (str) – Add new access code for this location.

  • access_codes (list of wxc_sdk.common.AuthCode) – Access code details

  • org_id (str) – Add new access code for this organization.

async delete_codes(*, location_id: str, access_codes: list[Union[str, wxc_sdk.common.AuthCode]], org_id: Optional[str] = None) list[wxc_sdk.common.AuthCode][source]

Delete Access Code Location

Deletes the access code details for a particular location for a customer.

Use Access Codes to bypass the set permissions for all persons/workspaces at this location.

Modifying the access code location details requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Deletes the access code details for this location.

  • access_codes (list of wxc_sdk.common.AuthCode or str) – access codes to delete

  • org_id (str) – Delete access codes from this organization.

base = 'telephony/config/locations'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsLocationVoicemailSettingsApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

location voicemail settings API, for now only enable/disable Vm transcription

async read(*, location_id: str, org_id: Optional[str] = None) LocationVoiceMailSettings[source]

Get Location Voicemail

Retrieve voicemail settings for a specific location.

Location’s voicemail settings allows you to enable voicemail transcription for a specific location.

Retrieving location’s voicemail settings requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve access codes details for this location.

  • org_id (str) – Retrieve access codes details for a customer location in this organization

Returns

location voicemail settings

Return type

LocationVoiceMailSettings

async update(*, location_id: str, settings: LocationVoiceMailSettings, org_id: Optional[str] = None)[source]

Get Location Voicemail

Retrieve voicemail settings for a specific location.

Location’s voicemail settings allows you to enable voicemail transcription for a specific location.

Retrieving location’s voicemail settings requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve access codes details for this location.

  • settings (LocationVoiceMailSettings) – new settings

  • org_id (str) – Retrieve access codes details for a customer location in this organization

base = 'telephony/config/locations'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsLocationsApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

Location API

Locations are used to organize Webex Calling (BroadCloud) features within physical locations. Webex Control Hub may be used to define new locations.

Searching and viewing locations in your organization requires an administrator auth token with the spark-admin:people_read and spark-admin:people_write or spark-admin:device_read AND spark-admin:device_write scope combinations.

list_gen(name: Optional[str] = None, location_id: Optional[str] = None, org_id: Optional[str] = None, **params) AsyncGenerator[Location, None, None][source]

List locations for an organization.

Parameters
  • name (str) – List locations whose name contains this string (case-insensitive).

  • location_id (str) – List locations by ID.

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

Returns

generator of Location instances

async list(name: Optional[str] = None, location_id: Optional[str] = None, org_id: Optional[str] = None, **params) List[Location][source]

List locations for an organization.

Parameters
  • name (str) – List locations whose name contains this string (case-insensitive).

  • location_id (str) – List locations by ID.

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

Returns

generator of Location instances

async by_name(name: str, org_id: Optional[str] = None) Optional[Location][source]

Get a location by name

Parameters
  • name (str) – name of the location to search

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

Returns

locations

Return type

Location

async details(location_id) Location[source]

Shows details for a location, by ID.

This API only works for Customer administrators and for Partner administrators to query their own organization. Partner administrators looking to query customer organizations should use the List Locations endpoint to retrieve information about locations.

Parameters

location_id (str) – A unique identifier for the location.

Returns

location details

Return type

Location

base = 'locations'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsMonitoringApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s call monitoring settings

feature = 'monitoring'
async read(*, person_id: str, org_id: Optional[str] = None) Monitoring[source]

Retrieve a Person’s Monitoring Settings

Retrieves the monitoring settings of the person, which shows specified people, places or, call park extensions under monitoring. Monitors the line status which indicates if a person or place is on a call and if a call has been parked on that extension.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

monitoring settings

Return type

Monitoring

async configure(*, person_id: str, settings: Monitoring, org_id: Optional[str] = None)[source]

Configure Call Waiting Settings for a Person

Configure a Person’s Call Waiting Settings

With this feature, a person can place an active call on hold and answer an incoming call. When enabled, while you are on an active call, a tone alerts you of an incoming call and you can choose to answer or ignore the call.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • settings (Monitoring) – settings for update

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsNumbersApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s numbers

feature = 'numbers'
async read(*, person_id: str, org_id: Optional[str] = None) PersonNumbers[source]

Read Do Not Disturb Settings for a Person Retrieve a Person’s Do Not Disturb Settings

When enabled, this feature will give all incoming calls the busy treatment. Optionally, you can enable a Ring Reminder to play a brief tone on your desktop phone when you receive incoming calls.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read or a user auth token with spark:people_read scope can be used by a person to read their settings. :param person_id: Unique identifier for the person. :type person_id: str :param org_id: Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API. :type org_id: str :return:

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsOrganisationVoicemailSettingsAPI(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

API for Organisation voicemail settings

async read(*, org_id: Optional[str] = None) OrganisationVoicemailSettings[source]

Get Voicemail Settings

Retrieve the organization’s voicemail settings.

Organizational voicemail settings determines what voicemail features a person can configure and automatic message expiration.

Retrieving organization’s voicemail settings requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters

org_id (str) – Retrieve voicemail settings for this organization.

Returns

VM settings

Return type

OrganisationVoicemailSettings

async update(*, settings: OrganisationVoicemailSettings, org_id: Optional[str] = None)[source]

Update the organization’s voicemail settings.

Organizational voicemail settings determines what voicemail features a person can configure and automatic message expiration.

Updating organization’s voicemail settings requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
base = 'telephony/config/voicemail/settings'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsOutgoingPermissionsApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s outgoing permissions settings

also used for workspace and location outgoing permissions

feature = 'outgoingPermission'
transfer_numbers: AsTransferNumbersApi

Only available for workspaces

auth_codes: AsAuthCodesApi

Only available for workspaces

async read(*, person_id: str, org_id: Optional[str] = None) OutgoingPermissions[source]

Retrieve a Person’s Outgoing Calling Permissions Settings

You can change the outgoing calling permissions for a person if you want them to be different from your organization’s default.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

outgoing permission settings for specific user

Return type

OutgoingPermissions

async configure(*, person_id: str, settings: OutgoingPermissions, org_id: Optional[str] = None)[source]

Configure a Person’s Outgoing Calling Permissions Settings

Turn on outgoing call settings for this person to override the calling settings from the location that are used by default.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their own settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • settings (OutgoingPermissions) – new setting to be applied

  • org_id – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
class wxc_sdk.as_api.AsPagingApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

list_gen(*, location_id: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, org_id: Optional[str] = None, **params) AsyncGenerator[Paging, None, None][source]

Read the List of Paging Groups List all Paging Groups for the organization.

Group Paging allows a person to place a one-way call or group page to up to 75 people and/or workspaces by dialing a number or extension assigned to a specific paging group. The Group Paging service makes a simultaneous call to all the assigned targets.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return only paging groups with matching location ID. Default is all locations

  • name (str) – Return only paging groups with the matching name.

  • phone_number (str) – Return only paging groups with matching primary phone number or extension.

  • org_id (str) – List paging groups for this organization.

Returns

generator of class:Paging objects

async list(*, location_id: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, org_id: Optional[str] = None, **params) List[Paging][source]

Read the List of Paging Groups List all Paging Groups for the organization.

Group Paging allows a person to place a one-way call or group page to up to 75 people and/or workspaces by dialing a number or extension assigned to a specific paging group. The Group Paging service makes a simultaneous call to all the assigned targets.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return only paging groups with matching location ID. Default is all locations

  • name (str) – Return only paging groups with the matching name.

  • phone_number (str) – Return only paging groups with matching primary phone number or extension.

  • org_id (str) – List paging groups for this organization.

Returns

generator of class:Paging objects

async create(*, location_id: str, settings: Paging, org_id: Optional[str] = None) str[source]

Create a new Paging Group Create a new Paging Group for the given location.

Group Paging allows a person to place a one-way call or group page to up to 75 people and/or workspaces by dialing a number or extension assigned to a specific paging group. The Group Paging service makes a simultaneous call to all the assigned targets.

Creating a paging group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Create the paging group for this location.

  • settings (Paging) – new paging group

  • org_id (str) – Create the paging group for this organization.

Returns

ID of the newly created paging group.

Return type

str

async delete_paging(*, location_id: str, paging_id: str, org_id: Optional[str] = None)[source]

Delete a Paging Group Delete the designated Paging Group.

Group Paging allows a person to place a one-way call or group page to up to 75 people and/or workspaces by dialing a number or extension assigned to a specific paging group. The Group Paging service makes a simultaneous call to all the assigned targets.

Deleting a paging group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Location from which to delete a paging group.

  • paging_id – Delete the paging group with the matching ID.

  • org_id – Delete the paging group from this organization.

async details(*, location_id: str, paging_id: str, org_id: Optional[str] = None) Paging[source]

Get Details for a Paging Group Retrieve Paging Group details.

Group Paging allows a person to place a one-way call or group page to up to 75 people and/or workspaces by dialing a number or extension assigned to a specific paging group. The Group Paging service makes a simultaneous call to all the assigned targets.

Retrieving paging group details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read. :param location_id: Retrieve settings for a paging group in this location. :param paging_id: Retrieve settings for the paging group with this identifier. :param org_id: Retrieve paging group settings from this organization. :return: Paging object

async update(*, location_id: str, update: Paging, paging_id: str, org_id: Optional[str] = None)[source]

Update the designated Paging Group.

Group Paging allows a person to place a one-way call or group page to up to 75 people and/or workspaces by dialing a number or extension assigned to a specific paging group. The Group Paging service makes a simultaneous call to all the assigned targets.

Updating a paging group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Update settings for a paging group in this location.

  • update (Paging) – update parameters

  • paging_id (str) – Update settings for the paging group with this identifier.

  • org_id (str) – Update paging group settings from this organization.

base = 'telephony/config'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsPeopleApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

People API

list_gen(email: Optional[str] = None, display_name: Optional[str] = None, id_list: Optional[list[str]] = None, org_id: Optional[str] = None, calling_data: Optional[bool] = None, location_id: Optional[str] = None, **params) AsyncGenerator[Person, None, None][source]

List people in your organization. For most users, either the email or display_name parameter is required. Admin users can omit these fields and list all users in their organization.

Response properties associated with a user’s presence status, such as status or last_activity, will only be displayed for people within your organization or an organization you manage. Presence information will not be shown if the authenticated user has disabled status sharing.

Admin users can include Webex Calling (BroadCloud) user details in the response by specifying calling_data parameter as True. Admin users can list all users in a location or with a specific phone number.

Parameters
  • email (str) – List people with this email address. For non-admin requests, either this or displayName are required.

  • display_name (str) – List people whose name starts with this string. For non-admin requests, either this or email are required.

  • id_list (list[str]) – List people by ID. Accepts up to 85 person IDs. If this parameter is provided then presence information (such as the last_activity or status properties) will not be included in the response.

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

  • calling_data (bool) – Include Webex Calling user details in the response. Default: False

  • location_id (str) – List people present in this location.

Returns

yield Person instances

async list(email: Optional[str] = None, display_name: Optional[str] = None, id_list: Optional[list[str]] = None, org_id: Optional[str] = None, calling_data: Optional[bool] = None, location_id: Optional[str] = None, **params) List[Person][source]

List people in your organization. For most users, either the email or display_name parameter is required. Admin users can omit these fields and list all users in their organization.

Response properties associated with a user’s presence status, such as status or last_activity, will only be displayed for people within your organization or an organization you manage. Presence information will not be shown if the authenticated user has disabled status sharing.

Admin users can include Webex Calling (BroadCloud) user details in the response by specifying calling_data parameter as True. Admin users can list all users in a location or with a specific phone number.

Parameters
  • email (str) – List people with this email address. For non-admin requests, either this or displayName are required.

  • display_name (str) – List people whose name starts with this string. For non-admin requests, either this or email are required.

  • id_list (list[str]) – List people by ID. Accepts up to 85 person IDs. If this parameter is provided then presence information (such as the last_activity or status properties) will not be included in the response.

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

  • calling_data (bool) – Include Webex Calling user details in the response. Default: False

  • location_id (str) – List people present in this location.

Returns

yield Person instances

async create(settings: Person, calling_data: bool = False) Person[source]

Create a Person

Create a new user account for a given organization. Only an admin can create a new user account.

At least one of the following body parameters is required to create a new user: displayName, firstName, lastName.

Currently, users may have only one email address associated with their account. The emails parameter is an array, which accepts multiple values to allow for future expansion, but currently only one email address will be used for the new user.

Admin users can include Webex calling (BroadCloud) user details in the response by specifying callingData parameter as true.

When doing attendee management, to make the new user an attendee for a site: append #attendee to the siteUrl parameter (eg: mysite.webex.com#attendee).

Parameters
  • settings (Person) – settings for new user

  • calling_data (bool) – Include Webex Calling user details in the response.

Returns

new user

Return type

Person

async details(person_id: str, calling_data: bool = False) Person[source]

Shows details for a person, by ID.

Response properties associated with a user’s presence status, such as status or last_activity, will only be displayed for people within your organization or an organization you manage. Presence information will not be shown if the authenticated user has disabled status sharing.

Admin users can include Webex Calling (BroadCloud) user details in the response by specifying calling_data parameter as True.

Parameters
  • person_id (str) – A unique identifier for the person.

  • calling_data (bool) – Include Webex Calling user details in the response. Default: false

Returns

person details

Return type

Person

async delete_person(person_id: str)[source]

Remove a person from the system. Only an admin can remove a person.

Parameters

person_id – A unique identifier for the person.

Returns

async update(person: Person, calling_data: bool = False, show_all_types: bool = False) Person[source]

Update details for a person, by ID.

Only an admin can update a person details.

Include all details for the person. This action expects all user details to be present in the request. A common approach is to first GET the person’s details, make changes, then PUT both the changed and unchanged values.

Admin users can include Webex Calling (BroadCloud) user details in the response by specifying calling_data parameter as True.

Note: The location_id can only be set when adding a calling license to a user. It cannot be changed if a user is already an existing calling user.

When doing attendee management, to update a user “from host to attendee” for a site append #attendee to the respective site_url and remove the meeting host license for this site from the license array. To update a person “from attendee to host” for a site, add the meeting license for this site in the meeting array and remove that site from the site_url parameter.

Removing the attendee privilege for a user on a meeting site is done by removing that sitename#attendee from the siteUrls array. The show_all_types parameter must be set to True.

Parameters
  • person (Person) – The person to update

  • calling_data (bool) – Include Webex Calling user details in the response. Default: False

  • show_all_types (bool) – Include Webex Calling user details in the response. Default: False

Returns

Person details

Return type

Person

async me(calling_data: bool = False) Person[source]

Show the profile for the authenticated user. This is the same as GET /people/{personId} using the Person ID associated with your Auth token.

Admin users can include Webex Calling (BroadCloud) user details in the response by specifying callingData parameter as true.

Parameters

calling_data (bool) – True -> return calling data

Return type

Person

Returns

profile of authenticated user

base = 'people'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsPersonForwardingApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s call forwarding settings

feature = 'callForwarding'
async read(*, person_id: str, org_id: Optional[str] = None) PersonForwardingSetting[source]

Retrieve a Person’s Call Forwarding Settings

Three types of call forwarding are supported:

  • Always – forwards all incoming calls to the destination you choose.

  • When busy – forwards all incoming calls to the destination you chose while the phone is in use or the person is busy.

  • When no answer – forwarding only occurs when you are away or not answering your phone.

In addition, the Business Continuity feature will send calls to a destination of your choice if your phone is not connected to the network for any reason, such as power outage, failed Internet connection, or wiring problem

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read or a user auth token with spark:people_read scope can be used by a person to read their own settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

user’s forwarding settings

Return type

PersonForwardingSetting

async configure(*, person_id: str, forwarding: PersonForwardingSetting, org_id: Optional[str] = None)[source]

Configure a Person’s Call Forwarding Settings

Three types of call forwarding are supported:

  • Always – forwards all incoming calls to the destination you choose.

  • When busy – forwards all incoming calls to the destination you chose while the phone is in use or the person is busy.

  • When no answer – forwarding only occurs when you are away or not answering your phone.

In addition, the Business Continuity feature will send calls to a destination of your choice if your phone is not connected to the network for any reason, such as power outage, failed Internet connection, or wiring problem

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • forwarding (PersonForwardingSetting) – new forwarding settings

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsPersonSettingsApi(session: AsRestSession)[source]

Bases: AsApiChild

API for all user level settings

appservices: AsAppServicesApi
barge: AsBargeApi
dnd: AsDndApi
call_intercept: AsCallInterceptApi
call_recording: AsCallRecordingApi
call_waiting: AsCallWaitingApi
calling_behavior: AsCallingBehaviorApi
caller_id: AsCallerIdApi
exec_assistant: AsExecAssistantApi
forwarding: AsPersonForwardingApi
hoteling: AsHotelingApi
monitoring: AsMonitoringApi
numbers: AsNumbersApi
permissions_in: AsIncomingPermissionsApi
permissions_out: AsOutgoingPermissionsApi
privacy: AsPrivacyApi
push_to_talk: AsPushToTalkApi
receptionist: AsReceptionistApi
schedules: AsScheduleApi
voicemail: AsVoicemailApi
async reset_vm_pin(person_id: str, org_id: Optional[str] = None)[source]

Reset Voicemail PIN

Reset a voicemail PIN for a person.

The voicemail feature transfers callers to voicemail based on your settings. You can then retrieve voice messages via Voicemail. A voicemail PIN is used to retrieve your voicemail messages.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id – Unique identifier for the person.

  • org_id – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = 'people'
class wxc_sdk.as_api.AsPersonSettingsApiChild(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsApiChild

Base class for all classes implementing person settings APIs

feature = None
f_ep(*, person_id: str, path: Optional[str] = None) str[source]

person specific feature endpoint like v1/people/{uid}/features/….

Parameters
  • person_id (str) – Unique identifier for the person.

  • path (str) – path in the endpoint after the feature base URL

Returns

full endpoint

Return type

str

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsPrivacyApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s call monitoring settings

feature = 'privacy'
async read(*, person_id: str, org_id: Optional[str] = None) Privacy[source]

Get a person’s Privacy Settings

Get a person’s privacy settings for the specified person id.

The privacy feature enables the person’s line to be monitored by others and determine if they can be reached by Auto Attendant services.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

privacy settings

Return type

Privacy

async configure(*, person_id: str, settings: Privacy, org_id: Optional[str] = None)[source]

Configure Call Waiting Settings for a Person

Configure a Person’s Call Waiting Settings

With this feature, a person can place an active call on hold and answer an incoming call. When enabled, while you are on an active call, a tone alerts you of an incoming call and you can choose to answer or ignore the call.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • settings (Monitoring) – settings for update

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsPrivateNetworkConnectApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

API for location private network connect API settings

async read(*, location_id: str, org_id: Optional[str] = None) NetworkConnectionType[source]

Get Private Network Connect

Retrieve the location’s network connection type.

Network Connection Type determines if the location’s network connection is public or private.

Retrieving location’s network connection type requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve network connection type for this location.

  • org_id (str) – Retrieve network connection type for this organization.

Returns

location PNC settings

Return type

NetworkConnectionType

async update(*, location_id: str, connection_type: NetworkConnectionType, org_id: Optional[str] = None)[source]

Get Private Network Connect

Retrieve the location’s network connection type.

Network Connection Type determines if the location’s network connection is public or private.

Retrieving location’s network connection type requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Update network connection type for this location.

  • connection_type (NetworkConnectionType) – Network Connection Type for the location.

  • org_id (str) – Update network connection type for this organization.

base = 'telephony/config/locations'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsPushToTalkApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s PTT settings

feature = 'pushToTalk'
async read(*, person_id: str, org_id: Optional[str] = None) PushToTalkSettings[source]

Read Push-to-Talk Settings for a Person Retrieve a Person’s Push-to-Talk Settings

Push-to-Talk allows the use of desk phones as either a one-way or two-way intercom that connects people in different parts of your organization.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

PTT settings for specific user

Return type

PushToTalkSettings

async configure(*, person_id: str, settings: PushToTalkSettings, org_id: Optional[str] = None)[source]

Configure Push-to-Talk Settings for a Person

Configure a Person’s Push-to-Talk Settings

Push-to-Talk allows the use of desk phones as either a one-way or two-way intercom that connects people in different parts of your organization.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • settings (PushToTalkSettings) – new setting to be applied. For members only the ID needs to be set

  • org_id – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsReceptionistApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s receptionist client settings

feature = 'reception'
async read(*, person_id: str, org_id: Optional[str] = None) ReceptionistSettings[source]

Read Receptionist Client Settings for a Person

Retrieve a Person’s Receptionist Client Settings

To help support the needs of your front-office personnel, you can set up people or workspaces as telephone attendants so that they can screen all incoming calls to certain numbers within your organization.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

receptionist client settings

Return type

ReceptionistSettings

async configure(*, person_id: str, settings: ReceptionistSettings, org_id: Optional[str] = None)[source]

Modify Executive Assistant Settings for a Person

Modify the executive assistant settings for the specified personId.

People with the executive service enabled, can select from a pool of assistants who have been assigned the executive assistant service and who can answer or place calls on their behalf. Executive assistants can set the call forward destination and join or leave an executive’s pool.

This API requires a full or user administrator auth token with the spark-admin:people_write scope.

Parameters
  • person_id (str) – Unique identifier for the person.

  • settings (ReceptionistSettings) – New receptionist client settings

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsRestSession(*, tokens: Tokens, concurrent_requests: int)[source]

Bases: ClientSession

REST session used for API requests:
  • includes an Authorization header in reach request

  • implements retries on 429

  • loads deserializes JSON data if needed

BASE = 'https://webexapis.com/v1'

base URL for all Webex API requests

property access_token: str

access token used for all requests

Returns

access token

Return type

str

async rest_get(*args, **kwargs) Union[str, dict][source]

GET request

Parameters
  • args

  • kwargs

Returns

deserialized JSON content or body text

async rest_post(*args, **kwargs) Union[str, dict][source]

POST request

Parameters
  • args

  • kwargs

Returns

deserialized JSON content or body text

async rest_put(*args, **kwargs) Union[str, dict][source]

PUT request

Parameters
  • args

  • kwargs

Returns

deserialized JSON content or body text

async rest_delete(*args, **kwargs) None[source]

DELETE request

Parameters
  • args

  • kwargs

async rest_patch(*args, **kwargs) Union[str, dict][source]

PATCH request

Parameters
  • args

  • kwargs

async follow_pagination(*, url: str, model: Type[ApiModel], params: Optional[dict] = None, item_key: Optional[str] = None, **kwargs) AsyncGenerator[ApiModel, None, None][source]

Handling RFC5988 pagination of list requests. Generator of parsed objects

Parameters
  • url (str) – start url for 1st GET

  • model (ApiModel) – data type to return

  • params (Optional[dict]) – URL parameters, optional

  • item_key (str) – key to list of values

Returns

yields parsed objects

class wxc_sdk.as_api.AsScheduleApi(*, session: AsRestSession, base: ScheduleApiBase)[source]

Bases: AsApiChild

Schedules API

list_gen(*, obj_id: str, org_id: Optional[str] = None, schedule_type: Optional[ScheduleType] = None, name: Optional[str] = None, **params) AsyncGenerator[Schedule, None, None][source]

List of Schedules for a Person or location

List schedules for a person or location in an organization.

Schedules are used to support calling features and can be defined at the location or person level. businessHours schedules allow you to apply specific call settings at different times of the day or week by defining one or more events. holidays schedules define exceptions to normal business hours by defining one or more events.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • obj_id (str) – Return the list of schedules for this location or user

  • org_id (str) – List schedules for this organization.

  • schedule_type – Type of the schedule. businessHours - Business hours schedule type. holidays - Holidays schedule type.

  • name – Only return schedules with the matching name.

Returns

yields schedules

async list(*, obj_id: str, org_id: Optional[str] = None, schedule_type: Optional[ScheduleType] = None, name: Optional[str] = None, **params) List[Schedule][source]

List of Schedules for a Person or location

List schedules for a person or location in an organization.

Schedules are used to support calling features and can be defined at the location or person level. businessHours schedules allow you to apply specific call settings at different times of the day or week by defining one or more events. holidays schedules define exceptions to normal business hours by defining one or more events.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.

Parameters
  • obj_id (str) – Return the list of schedules for this location or user

  • org_id (str) – List schedules for this organization.

  • schedule_type – Type of the schedule. businessHours - Business hours schedule type. holidays - Holidays schedule type.

  • name – Only return schedules with the matching name.

Returns

yields schedules

async details(*, obj_id: str, schedule_type: Union[str, ScheduleType], schedule_id: str, org_id: Optional[str] = None) Schedule[source]

Get Details for a Schedule

Retrieve Schedule details.

A time schedule establishes a set of times during the day or holidays in the year in which a feature, for example auto attendants, can perform a specific action.

Retrieving schedule details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • obj_id (str) – Retrieve schedule details in this location or user

  • schedule_type (ScheduleTypeOrStr) – Type of the schedule. businessHours - Business hours schedule type. holidays - Holidays schedule type.

  • schedule_id (str) – Retrieve the schedule with the matching ID.

  • org_id (str) – Retrieve schedule details from this organization.

Returns

async create(*, obj_id: str, schedule: Schedule, org_id: Optional[str] = None) str[source]

Create a Schedule

Create new Schedule for the given location.

A time schedule establishes a set of times during the day or holidays in the year in which a feature, for example auto attendants, can perform a specific action.

Creating a schedule requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • obj_id (str) – Create the schedule for this location or user

  • schedule (Schedule) – Schedule to be created

  • org_id (str) – Create the schedule for this organization.

Returns

ID of the newly created schedule.

Return type

str

async update(*, obj_id: str, schedule: Schedule, schedule_type: Optional[Union[str, ScheduleType]] = None, schedule_id: Optional[str] = None, org_id: Optional[str] = None) str[source]

Update a Schedule

Update the designated Schedule.

A time schedule establishes a set of times during the day or holidays in the year in which a feature, for example auto attendants, can perform a specific action.

Updating a schedule requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

NOTE: The Schedule ID will change upon modification of the Schedule name

Parameters
  • obj_id (str) – Location or user for which this schedule exists

  • schedule (Schedule) – data for the update

  • schedule_type (ScheduleTypeOrStr) – Type of the schedule. Default: schedule_type from schedule businessHours - Business hours schedule type. holidays - Holidays schedule type.

  • schedule_id (str) – Update schedule with the matching ID. Default: schedule_id from schedule

  • org_id (str) – Update schedule from this organization.

Returns

schedule id

async delete_schedule(*, obj_id: str, schedule_type: Union[str, ScheduleType], schedule_id: str, org_id: Optional[str] = None)[source]

Delete a Schedule

Delete the designated Schedule.

A time schedule establishes a set of times during the day or holidays in the year in which a feature, for example auto attendants, can perform a specific action.

Deleting a schedule requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • obj_id (str) – Location or user from which to delete a schedule.

  • schedule_type (ScheduleTypeOrStr) – Type of the schedule. businessHours - Business hours schedule type. holidays - Holidays schedule type.

  • schedule_id (str) – Delete the schedule with the matching ID.

  • org_id (str) – Retrieve schedule details from this organization.

Returns

async event_details(*, obj_id: str, schedule_type: Union[str, ScheduleType], schedule_id: str, event_id: str, org_id: Optional[str] = None) Event[source]

Get Details for a Schedule Event

Retrieve Schedule Event details.

A time schedule establishes a set of times during the day or holidays in the year in which a feature, for example auto attendants, can perform a specific action.

Retrieving schedule event details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • obj_id (str) – Retrieve schedule event details for this location or user

  • schedule_type (ScheduleTypeOrStr) – Type of the schedule. businessHours - Business hours schedule type. holidays - Holidays schedule type.

  • schedule_id (str) – Retrieve schedule event details for schedule with the matching ID.

  • event_id (str) – Retrieve the schedule event with the matching schedule event ID.

  • org_id (str) – Retrieve schedule event details from this organization.

Returns

async event_create(*, obj_id: str, schedule_type: Union[str, ScheduleType], schedule_id: str, event: Event, org_id: Optional[str] = None) str[source]

Create a Schedule Event

Create new Event for the given location or user Schedule.

A time schedule establishes a set of times during the day or holidays in the year in which a feature, for example auto attendants, can perform a specific action.

Creating a schedule event requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • obj_id (str) – Create the schedule for this location.

  • schedule_type (ScheduleTypeOrStr) – Type of the schedule. businessHours - Business hours schedule type. holidays - Holidays schedule type.

  • schedule_id (str) – Create event for a given schedule ID.

  • event (Event) – event data

  • org_id (str) – Retrieve schedule event details from this organization.

Returns

event id

Return type

str

async event_update(*, obj_id: str, schedule_type: Union[str, ScheduleType], schedule_id: str, event: Event, event_id: Optional[str] = None, org_id: Optional[str] = None) str[source]

Update a Schedule Event

Update the designated Schedule Event.

A time schedule establishes a set of times during the day or holidays in the year in which a feature, for example auto attendants, can perform a specific action.

Updating a schedule event requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

NOTE: The Schedule Event ID will change upon modification of the Schedule event name.

Parameters
  • obj_id (str) – Location or user for which this schedule event exists.

  • schedule_type (ScheduleTypeOrStr) – Type of the schedule. businessHours - Business hours schedule type. holidays - Holidays schedule type.

  • schedule_id (str) – Update schedule event with the matching schedule ID.

  • event (Event) – update settings

  • event_id (str) – Update the schedule event with the matching schedule event ID. Default: event id from event

  • org_id (str) – Update schedule from this organization.

Returns

event id; changed if name changed

async event_delete(*, obj_id: str, schedule_type: Union[str, ScheduleType], schedule_id: str, event_id: str, org_id: Optional[str] = None)[source]

Delete a Schedule Event

Delete the designated Schedule Event.

A time schedule establishes a set of times during the day or holidays in the year in which a feature, for example auto attendants, can perform a specific action.

Deleting a schedule event requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • obj_id (str) – Location or user from which to delete a schedule.

  • schedule_type (ScheduleTypeOrStr) – Type of the schedule. businessHours - Business hours schedule type. holidays - Holidays schedule type.

  • schedule_id (str) – Delete schedule event with the matching schedule ID.

  • event_id (str) – Delete the schedule event with the matching schedule event ID. Default: event id from event

  • org_id (str) – Delete schedule from this organization.

base = 'telephony/config/locations'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsTelephonyApi(session: AsRestSession)[source]

Bases: AsApiChild

The telephony settings (features) API.

access_codes: AsAccessCodesApi

access or authentication codes

auto_attendant: AsAutoAttendantApi
calls: AsCallsApi
callpark: AsCallParkApi
callpark_extension: AsCallparkExtensionApi
callqueue: AsCallQueueApi
huntgroup: AsHuntGroupApi
location_intercept: AsLocationInterceptApi
location_moh: AsLocationMoHApi
location_voicemail: AsLocationVoicemailSettingsApi

Location VM settings (only enable/disable transcription for now)

base = 'telephony'
organisation_voicemail: AsOrganisationVoicemailSettingsAPI

organisation voicemail settings

paging: AsPagingApi
permissions_out: AsOutgoingPermissionsApi
pickup: AsCallPickupApi
pnc: AsPrivateNetworkConnectApi
schedules: AsScheduleApi
voicemail_groups: AsVoicemailGroupsApi
voicemail_rules: AsVoicemailRulesApi
voiceportal: AsVoicePortalApi
phone_numbers_gen(*, location_id: Optional[str] = None, phone_number: Optional[str] = None, available: Optional[bool] = None, order: Optional[str] = None, owner_name: Optional[str] = None, owner_id: Optional[str] = None, owner_type: Optional[OwnerType] = None, extension: Optional[str] = None, number_type: Optional[NumberType] = None, phone_number_type: Optional[NumberListPhoneNumberType] = None, state: Optional[NumberState] = None, toll_free_numbers: Optional[bool] = None, org_id: Optional[str] = None, **params) AsyncGenerator[NumberListPhoneNumber, None, None][source]

Get Phone Numbers for an Organization with given criteria.

List all the phone numbers for the given organization along with the status and owner (if any).

PSTN phone numbers are associated with a specific location and can be active/inactive and assigned/unassigned. The owner is the person, workspace, or feature to which the number is assigned.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return the list of phone numbers for this location within the given organization.

  • phone_number (str) – Search for this phone number.

  • available (bool) – Search among the available phone numbers. This parameter cannot be used along with owner_type parameter when set to true.

  • order (str) – Sort the list of phone numbers based on the following:lastName,dn,extension. Default sort will be based on number and extension in an Ascending order

  • owner_name (str) – Return the list of phone numbers that is owned by given owner name. Maximum length is 255.

  • owner_id (str) – Returns only the matched number/extension entries assigned to the feature with specified uuid/broadsoftId.

  • owner_type (OwnerType) – Returns the list of phone numbers that are of given owner_type.

  • extension (str) – Returns the list of PSTN phone numbers with given extension.

  • number_type (NumberType) – Returns the filtered list of PSTN phone numbers that contains given type of numbers. This parameter cannot be used along with available or state.

  • phone_number_type (NumberListPhoneNumberType) – Returns the filtered list of PSTN phone numbers that are of given phoneNumberType.

  • state (NumberState) – Returns the list of PSTN phone numbers with matching state.

  • toll_free_numbers (bool) – Returns the list of toll free phone numbers.

  • org_id (str) – List numbers for this organization.

Returns

yields NumberListPhoneNumber instances

async phone_numbers(*, location_id: Optional[str] = None, phone_number: Optional[str] = None, available: Optional[bool] = None, order: Optional[str] = None, owner_name: Optional[str] = None, owner_id: Optional[str] = None, owner_type: Optional[OwnerType] = None, extension: Optional[str] = None, number_type: Optional[NumberType] = None, phone_number_type: Optional[NumberListPhoneNumberType] = None, state: Optional[NumberState] = None, toll_free_numbers: Optional[bool] = None, org_id: Optional[str] = None, **params) List[NumberListPhoneNumber][source]

Get Phone Numbers for an Organization with given criteria.

List all the phone numbers for the given organization along with the status and owner (if any).

PSTN phone numbers are associated with a specific location and can be active/inactive and assigned/unassigned. The owner is the person, workspace, or feature to which the number is assigned.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Return the list of phone numbers for this location within the given organization.

  • phone_number (str) – Search for this phone number.

  • available (bool) – Search among the available phone numbers. This parameter cannot be used along with owner_type parameter when set to true.

  • order (str) – Sort the list of phone numbers based on the following:lastName,dn,extension. Default sort will be based on number and extension in an Ascending order

  • owner_name (str) – Return the list of phone numbers that is owned by given owner name. Maximum length is 255.

  • owner_id (str) – Returns only the matched number/extension entries assigned to the feature with specified uuid/broadsoftId.

  • owner_type (OwnerType) – Returns the list of phone numbers that are of given owner_type.

  • extension (str) – Returns the list of PSTN phone numbers with given extension.

  • number_type (NumberType) – Returns the filtered list of PSTN phone numbers that contains given type of numbers. This parameter cannot be used along with available or state.

  • phone_number_type (NumberListPhoneNumberType) – Returns the filtered list of PSTN phone numbers that are of given phoneNumberType.

  • state (NumberState) – Returns the list of PSTN phone numbers with matching state.

  • toll_free_numbers (bool) – Returns the list of toll free phone numbers.

  • org_id (str) – List numbers for this organization.

Returns

yields NumberListPhoneNumber instances

async phone_number_details(*, org_id: Optional[str] = None) NumberDetails[source]

get summary (counts) of phone numbers

Parameters

org_id (str) – detaild for numbers in this organization.

Returns

phone number details

Return type

NumberDetails

async validate_extensions(*, extensions: list[str]) ValidateExtensionsResponse[source]

Validate the List of Extensions

Validate the List of Extensions. Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters

extensions – Array of Strings of ID of Extensions.

Returns

async ucm_profiles(*, org_id: Optional[str] = None) list[wxc_sdk.telephony.UCMProfile][source]

Read the List of UC Manager Profiles

List all calling UC Manager Profiles for the organization.

UC Manager Profiles are applicable if your organization uses Jabber in Team Messaging mode or Calling in Webex Teams (Unified CM).

The UC Manager Profile has an organization-wide default and may be overridden for individual persons, although currently only setting at a user level is supported by Webex APIs.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:people_read as this API is designed to be used in conjunction with calling behavior at the user level.

Parameters

org_id (str) – List manager profiles in this organization.

Returns

list of UCMProfile

async change_announcement_language(*, location_id: str, language_code: str, agent_enabled: Optional[bool] = None, service_enabled: Optional[bool] = None, org_id: Optional[str] = None)[source]

Change Announcement Language

Change announcement language for the given location.

Change announcement language for current people/workspaces and/or existing feature configurations. This does not change the default announcement language which is applied to new users/workspaces and new feature configurations.

Changing announcement language for the given location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Change announcement language for this location.

  • language_code (str) – Language code.

  • agent_enabled (bool) – Set to true to change announcement language for existing people and workspaces.

  • service_enabled (bool) – Set to true to change announcement language for existing feature configurations.

  • org_id (str) – Change announcement language for this organization.

class wxc_sdk.as_api.AsTransferNumbersApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for outgoing permission auto transfer numbers

feature = 'outgoingPermission/autoTransferNumbers'
async read(person_id: str, org_id: Optional[str] = None) AutoTransferNumbers[source]

Retrieve Transfer Numbers Settings for a Workspace.

When calling a specific call type, this workspace will be automatically transferred to another number. The person assigned the Auto Transfer Number can then approve the call and send it through or reject the call type. You can add up to 3 numbers.

This API requires a full or read-only administrator auth token with a scope of spark-admin:workspaces_read or a user auth token with spark:workspaces_read scope can be used to read workspace settings.

Parameters
  • person_id (str) – Unique identifier for the workspace.

  • org_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

auto transfer numbers

Return type

AutoTransferNumbers

async configure(person_id: str, settings: AutoTransferNumbers, org_id: Optional[str] = None)[source]

Modify Transfer Numbers Settings for a Place.

When calling a specific call type, this workspace will be automatically transferred to another number. The person assigned the Auto Transfer Number can then approve the call and send it through or reject the call type. You can add up to 3 numbers.

This API requires a full or user administrator auth token with the spark-admin:workspaces_write scope or a user auth token with spark:workspaces_write scope can be used to update workspace settings.

Parameters
  • person_id (str) – Unique identifier for the workspace.

  • settings (AutoTransferNumbers) – new auto transfer numbers

  • org_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsVoicePortalApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

location voice portal API

async read(*, location_id: str, org_id: Optional[str] = None) VoicePortalSettings[source]
Parameters
  • location_id (str) – Location to which the voice portal belongs.

  • org_id (str) – Organization to which the voice portal belongs.

Returns

location voice portal settings

Return type

VoicePortalSettings

async update(*, location_id: str, settings: VoicePortalSettings, passcode: Optional[str] = None, org_id: Optional[str] = None)[source]

Update VoicePortal

Update Voice portal information for the location.

Voice portals provide an interactive voice response (IVR) system so administrators can manage auto attendant announcements.

Updating voice portal information for organization and/or rules requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • location_id (str) – Location to which the voice portal belongs.

  • settings (VoicePortalSettings) – new settings

  • passcode (str) – new passcode

  • org_id (str) – Organization to which the voice portal belongs.

async passcode_rules(*, location_id: str, org_id: Optional[str] = None) PasscodeRules[source]

Get VoicePortal Passcode Rule

Retrieve the voice portal passcode rule for a location.

Voice portals provide an interactive voice response (IVR) system so administrators can manage auto attendant announcements

Retrieving the voice portal passcode rule requires a full read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters
  • location_id (str) – Retrieve voice portal passcode rules for this location.

  • org_id (str) – Retrieve voice portal passcode rules for this organization.

Returns

passcode rules

Return type

PasscodeRules

base = 'telephony/config/locations'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsVoicemailApi(*, session: AsRestSession, base: Optional[str] = None, workspaces: bool = False, locations: bool = False)[source]

Bases: AsPersonSettingsApiChild

API for person’s call voicemail settings

feature = 'voicemail'
async read(*, person_id: str, org_id: Optional[str] = None) VoicemailSettings[source]

Read Voicemail Settings for a Person Retrieve a Person’s Voicemail Settings

The voicemail feature transfers callers to voicemail based on your settings. You can then retrieve voice messages via Voicemail. Voicemail audio is sent in Waveform Audio File Format, .wav, format.

Optionally, notifications can be sent to a mobile phone via text or email. These notifications will not include the voicemail files.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read or a user auth token with spark:people_read scope can be used by a person to read their settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns

user’s voicemail settings

Return type

VoicemailSettings

async configure(*, person_id: str, settings: VoicemailSettings, org_id: Optional[str] = None)[source]

Configure Voicemail Settings for a Person Configure a person’s Voicemail Settings

The voicemail feature transfers callers to voicemail based on your settings. You can then retrieve voice messages via Voicemail. Voicemail audio is sent in Waveform Audio File Format, .wav, format.

Optionally, notifications can be sent to a mobile phone via text or email. These notifications will not include the voicemail files.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings. :return:

configure_busy_greeting(*, person_id: str, content: Union[BufferedReader, str], upload_as: Optional[str] = None, org_id: Optional[str] = None)[source]

Configure Busy Voicemail Greeting for a Person Configure a Person’s Busy Voicemail Greeting by uploading a Waveform Audio File Format, .wav, encoded audio file.

Your request will need to be a multipart/form-data request rather than JSON, using the audio/wav Content-Type.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • content (Union[BufferedReader, str]) – the file to be uploaded, can be a path to a file or a buffered reader (opened file); if a reader referring to an open file is passed then make sure to open the file as binary b/c otherwise the content length might be calculated wrong

  • upload_as (str) – filename for the content. Only required if content is a reader; has to be a .wav file name.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

configure_no_answer_greeting(person_id: str, content: Union[BufferedReader, str], upload_as: Optional[str] = None, org_id: Optional[str] = None)[source]

Configure No Answer Voicemail Greeting for a Person Configure a Person’s No Answer Voicemail Greeting by uploading a Waveform Audio File Format, .wav, encoded audio file.

Your request will need to be a multipart/form-data request rather than JSON, using the audio/wav Content-Type.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings.

Parameters
  • person_id (str) – Unique identifier for the person.

  • content (Union[BufferedReader, str]) – the file to be uploaded, can be a path to a file or a buffered reader (opened file); if a reader referring to an open file is passed then make sure to open the file as binary b/c otherwise the content length might be calculated wrong

  • upload_as (str) – filename for the content. Only required if content is a reader; has to be a .wav file name.

  • org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

base = ''
session: AsRestSession

REST session

class wxc_sdk.as_api.AsVoicemailGroupsApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

API for location private network connect API settings

list(*, location_id: Optional[str] = None, name: Optional[str] = None, phone_number: Optional[str] = None, org_id: Optional[str] = None)[source]
base = 'telephony/config/voicemailGroups'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsVoicemailRulesApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

API for voicemail rules settings

async read(*, org_id: Optional[str] = None) VoiceMailRules[source]

Get Voicemail Rules

Retrieve the organization’s voicemail rules.

Organizational voicemail rules specify the default passcode requirements.

Retrieving the organization’s voicemail rules requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters

org_id (str) – Retrieve voicemail settings for this organization.

Returns

VM settings

Return type

OrganisationVoicemailSettings

async update(*, settings: VoiceMailRules, org_id: Optional[str] = None)[source]

Update Voicemail Rules

Update the organization’s default voicemail passcode and/or rules.

Organizational voicemail rules specify the default passcode requirements.

If you choose to set default passcode for new people added to your organization, communicate to your people what that passcode is, and that it must be reset before they can access their voicemail. If this feature is not turned on, each new person must initially set their own passcode.

Updating organization’s voicemail passcode and/or rules requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters
  • settings (VoiceMailRules) – new settings

  • org_id (str) – Update voicemail rules for this organization.

base = 'telephony/config/voicemail/rules'
session: AsRestSession

REST session

class wxc_sdk.as_api.AsWebexSimpleApi(*, tokens: Optional[Union[str, Tokens]] = None, concurrent_requests: int = 10)[source]

Bases: object

The main API object

Parameters
  • tokens – token to be used by the API. Can be a tokens.Tokens instance, a string or None. If None then an access token is expected in the WEBEX_ACCESS_TOKEN environment variable.

  • concurrent_requests (int) – number of concurrent requests when using multi-threading

groups: AsGroupsApi

groups API AsGroupsApi

licenses: AsLicensesApi

Licenses API AsLicensesApi

locations: AsLocationsApi

Location API AsLocationsApi

person_settings: AsPersonSettingsApi

Person settings API AsPersonSettingsApi

people: AsPeopleApi

People API AsPeopleApi

telephony: AsTelephonyApi

Telephony (features) API AsTelephonyApi

webhook: AsWebhookApi

Webhooks API AsWebhookApi

workspaces: AsWorkspacesApi

Workspaces API AsWorkspacesApi

workspace_settings: AsWorkspaceSettingsApi

Workspace setting API AsWorkspaceSettingsApi

session: AsRestSession

AsRestSession used for all API requests

property access_token: str

access token used for all requests

Returns

access token

Return type

str

async close()[source]
class wxc_sdk.as_api.AsWebhookApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

API for webhook management

base = 'webhooks'
session: AsRestSession

REST session

list_gen() AsyncGenerator[WebHook, None, None][source]

List all of your webhooks.

Returns

yields webhooks

async list() List[WebHook][source]

List all of your webhooks.

Returns

yields webhooks

async create(*, name: str, target_url: str, resource: WebHookResource, event: WebHookEvent, filter: Optional[str] = None, secret: Optional[str] = None, owned_by: Optional[str] = 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

async 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

async 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

async webhook_delete(*, webhook_id: str)[source]

Deletes a webhook, by ID.

Parameters

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

Returns

None

class wxc_sdk.as_api.AsWorkspaceSettingsApi(session: AsRestSession)[source]

Bases: AsApiChild

API for all workspace settings.

Most of the workspace settings are equivalent to corresponding user settings. For these settings the attributes of this class are instances of the respective user settings APIs. When calling endpoints of these APIs workspace IDs need to be passed to the person_id parameter of the called function.

base = 'workspaces'
call_intercept: AsCallInterceptApi
call_waiting: AsCallWaitingApi
caller_id: AsCallerIdApi
forwarding: AsPersonForwardingApi
monitoring: AsMonitoringApi
numbers: AsNumbersApi
permissions_in: AsIncomingPermissionsApi
permissions_out: AsOutgoingPermissionsApi
class wxc_sdk.as_api.AsWorkspacesApi(*, session: AsRestSession, base: Optional[str] = None)[source]

Bases: AsApiChild

Workspaces API

Workspaces represent where people work, such as conference rooms, meeting spaces, lobbies, and lunch rooms. Devices may be associated with workspaces.

Viewing the list of workspaces in an organization requires an administrator auth token with the spark-admin:workspaces_read scope. Adding, updating, or deleting workspaces in an organization requires an administrator auth token with the spark-admin:workspaces_write scope.

The Workspaces API can also be used by partner administrators acting as administrators of a different organization than their own. In those cases an orgId value must be supplied, as indicated in the reference documentation for the relevant endpoints.

base = 'workspaces'
session: AsRestSession

REST session

list_gen(*, workspace_location_id: Optional[str] = None, floor_id: Optional[str] = None, display_name: Optional[str] = None, capacity: Optional[int] = None, workspace_type: Optional[WorkSpaceType] = None, calling: Optional[CallingType] = None, calendar: Optional[CalendarType] = None, org_id: Optional[str] = None, **params) AsyncGenerator[Workspace, None, None][source]

List Workspaces

List workspaces. Use query parameters to filter the response. The orgId parameter can only be used by admin users of another organization (such as partners). The workspaceLocationId, floorId, capacity and type fields will only be present for workspaces that have a value set for them. The special values notSet (for filtering on category) and -1 (for filtering on capacity) can be used to filter for workspaces without a type and/or capacity.

Parameters
  • workspace_location_id (str) – Location associated with the workspace

  • floor_id (str) – Floor associated with the workspace.

  • display_name (str) – List workspaces by display name.

  • capacity (int) – List workspaces with the given capacity. Must be -1 or higher. A value of -1 lists workspaces with no capacity set.

  • workspace_type (WorkSpaceType) – List workspaces by type.

  • calling (CallingType) – List workspaces by calling type.

  • calendar (CalendarType) – List workspaces by calendar type.

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

Returns

generator of Workspace instances

async list(*, workspace_location_id: Optional[str] = None, floor_id: Optional[str] = None, display_name: Optional[str] = None, capacity: Optional[int] = None, workspace_type: Optional[WorkSpaceType] = None, calling: Optional[CallingType] = None, calendar: Optional[CalendarType] = None, org_id: Optional[str] = None, **params) List[Workspace][source]

List Workspaces

List workspaces. Use query parameters to filter the response. The orgId parameter can only be used by admin users of another organization (such as partners). The workspaceLocationId, floorId, capacity and type fields will only be present for workspaces that have a value set for them. The special values notSet (for filtering on category) and -1 (for filtering on capacity) can be used to filter for workspaces without a type and/or capacity.

Parameters
  • workspace_location_id (str) – Location associated with the workspace

  • floor_id (str) – Floor associated with the workspace.

  • display_name (str) – List workspaces by display name.

  • capacity (int) – List workspaces with the given capacity. Must be -1 or higher. A value of -1 lists workspaces with no capacity set.

  • workspace_type (WorkSpaceType) – List workspaces by type.

  • calling (CallingType) – List workspaces by calling type.

  • calendar (CalendarType) – List workspaces by calendar type.

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

Returns

generator of Workspace instances

async create(*, settings: Workspace, org_id: Optional[str] = None)[source]

Create a Workspace

Create a workspace. The workspaceLocationId, floorId, capacity, type and notes parameters are optional, and omitting them will result in the creation of a workspace without these values set, or set to their default. A workspaceLocationId must be provided when the floorId is set. Calendar and calling can also be set for a new workspace. Omitting them will default to free calling and no calendaring. The orgId parameter can only be used by admin users of another organization (such as partners).

Parameters
  • settings (Workspace) – settings for new Workspace

  • org_id (str) – OrgId associated with the workspace. Only admin users of another organization (such as partners) may use this parameter.

Returns

new workspace

Return type

Workspace

async details(workspace_id) Workspace[source]

Get Workspace Details

Shows details for a workspace, by ID. The workspaceLocationId, floorId, capacity, type and notes fields will only be present if they have been set for the workspace.

Parameters

workspace_id (str) – A unique identifier for the workspace.

Returns

workspace details

Return type

Workspace

async update(*, workspace_id, settings: Workspace) Workspace[source]

Update a Workspace

Updates details for a workspace, by ID. Specify the workspace ID in the workspaceId parameter in the URI. Include all details for the workspace that are present in a GET request for the workspace details. Not including the optional capacity, type or notes fields will result in the fields no longer being defined for the workspace. A workspaceLocationId must be provided when the floorId is set. The workspaceLocationId, floorId, calendar and calling fields do not change when omitted from the update request. Updating the calling parameter is not supported.

Parameters
  • workspace_id (str) – A unique identifier for the workspace.

  • settings (Workspace) – new workspace settings

Returns

updated workspace

Return type

Workspace

async delete_workspace(workspace_id)[source]

Delete a Workspace

Deletes a workspace, by ID. Will also delete all devices associated with the workspace. Any deleted devices will need to be reactivated.

Parameters

workspace_id (str) – A unique identifier for the workspace.