wxc_sdk.telephony.jobs package

Jobs API

class wxc_sdk.telephony.jobs.StepExecutionStatus(*, id: int, startTime: datetime, endTime: datetime | None = None, lastUpdated: datetime, statusMessage: str, exitCode: str, name: str, timeElapsed: str, **extra_data: Any)[source]

Bases: ApiModel

id: int

Unique identifier that identifies each step in a job.

start_time: datetime

Step execution start time.

end_time: datetime | None

Step execution end time.

last_updated: datetime

Last updated time for a step.

status_message: str

Displays status for a step.

exit_code: str

ExitCode for a step.

name: str

Step name.

time_elapsed: str

Time lapsed since the step execution started.

class wxc_sdk.telephony.jobs.JobExecutionStatus(*, id: int, startTime: datetime | None = None, endTime: datetime | None = None, lastUpdated: datetime, statusMessage: str | None = None, exitCode: str | None = None, createdTime: datetime, timeElapsed: str | None = None, stepExecutionStatuses: list[StepExecutionStatus] = None, **extra_data: Any)[source]

Bases: ApiModel

id: int

Unique identifier that identifies each instance of the job.

start_time: datetime | None

Step execution start time.

end_time: datetime | None

Step execution end time.

last_updated: datetime

Last updated time post one of the step execution completion.

status_message: str | None

Displays status for overall steps that are part of the job.

exit_code: str | None

Exit code for a job.

created_time: datetime

Job creation time.

time_elapsed: str | None

Time lapsed since the job execution started.

step_execution_statuses: list[StepExecutionStatus]

Status of each step within a job.

class wxc_sdk.telephony.jobs.StartJobResponse(*, name: str | None = None, id: str, jobType: str | None = None, trackingId: str, sourceUserId: str, sourceCustomerId: str, targetCustomerId: str, instanceId: int, jobExecutionStatus: list[JobExecutionStatus], latestExecutionStatus: str, latestExecutionExitCode: str | None = None, locationCustomizationsEnabled: bool | None = None, target: str | None = None, locationId: str | None = None, locationName: str | None = None, percentageComplete: int | None = None, deviceCount: int | None = None, counts: RoutingPrefixCounts | MoveCounts | None = None, **extra_data: Any)[source]

Bases: ApiModel

name: str | None

Job name.

id: str

Unique identifier of the job.

job_type: str | None

Job type.

tracking_id: str

Unique identifier to track the flow of HTTP requests.

source_user_id: str

Unique identifier to identify which user has run the job.

source_customer_id: str

Unique identifier to identify the customer who has run the job.

target_customer_id: str

Unique identifier to identify the customer for which the job was run.

instance_id: int

Unique identifier to identify the instance of the job.

job_execution_status: list[JobExecutionStatus]

Displays the most recent step’s execution status. Contains execution statuses of all the steps involve in the execution of the job.

latest_execution_status: str

Indicates the most recent status (STARTING, STARTED, COMPLETED, or FAILED) of the job at the time of invocation.

latest_execution_exit_code: str | None

Most recent exit code of the job at the time of invocation.

location_customizations_enabled: bool | None

indicates if all the devices within this location will be customized with new requested customizations(if set to true) or will be overridden with the one at organization level (if set to false or any other value). This field has no effect when the job is being triggered at organization level.

target: str | None

Indicates if the job was run at organization level (‘CUSTOMER’) or location (‘LOCATION’) level.

location_id: str | None

Unique location identifier for which the job was run.

location_name: str | None

name of location for which the job was run, only present for target LOCATION

percentage_complete: int | None

Displays job completion percentage

device_count: int | None

Count of number of devices rebuilt.

counts: RoutingPrefixCounts | MoveCounts | None

Job statistics.

class wxc_sdk.telephony.jobs.JobErrorMessage(*, description: str, code: str | None = None, location: str | None = None, locationId: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

description: str

Error message.

code: str | None

Internal error code.

location: str | None

Message describing the location or point of failure.

location_id: str | None
class wxc_sdk.telephony.jobs.JobError(*, key: str, message: list[JobErrorMessage], **extra_data: Any)[source]

Bases: ApiModel

key: str

HTTP error code.

message: list[JobErrorMessage]
class wxc_sdk.telephony.jobs.JobErrorItem(*, item: str | None = None, itemNumber: int, trackingId: str, error: JobError, **extra_data: Any)[source]

Bases: ApiModel

item: str | None
item_number: int

Index of error number.

tracking_id: str

Unique identifier to track the HTTP requests.

error: JobError
class wxc_sdk.telephony.jobs.JobsApi(*, session: RestSession)[source]

Bases: ApiChild

Jobs API

__init__(*, session: RestSession)[source]
base = 'telephony/config/jobs'
apply_line_key_templates: ApplyLineKeyTemplatesJobsApi

API for apply line key template jobs

device_settings: DeviceSettingsJobsApi

API for device settings jobs

manage_numbers: ManageNumbersJobsApi

API for manage numbers jobs

move_users: MoveUsersJobsApi
rebuild_phones: RebuildPhonesJobsApi

API for rebuild phone jobs

update_routing_prefix: UpdateRoutingPrefixJobsApi

API for update routing prefix jobs

class wxc_sdk.telephony.jobs.DeviceSettingsJobsApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

API for jobs to update device settings at the location and organization level

change(location_id: str | None, customization: DeviceCustomization, org_id: str | None = None) StartJobResponse[source]

Change device settings across organization or locations jobs.

Performs bulk and asynchronous processing for all types of device settings initiated by organization and system admins in a stateful persistent manner. This job will modify the requested device settings across all non-customized devices. Whenever a location ID is specified in the request, it will modify the requested device settings only for non-customized devices that are part of the provided location within an organization.

Returns a unique job ID which can then be utilized further to retrieve status and errors for the same.

Only one job per customer can be running at any given time within the same organization. An attempt to run multiple jobs at the same time will result in a 409 error response.

Running a job requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Location within an organization where changes of device settings will be applied to all the devices within it.

  • customization (DeviceCustomization) – customization. Atttribute custom_enabled Indicates if all the devices within this location will be customized with new requested customizations(if set to true) or will be overridden with the one at organization level (if set to false or any other value). This field has no effect when the job is being triggered at organization level.

  • org_id (str) – Apply change device settings for all the devices under this organization.

Returns:

information about the created job

Return type:

StartJobResponse

list(org_id: str | None = None, **params) Generator[StartJobResponse, None, None][source]

List change device settings jobs.

Lists all the jobs for jobType calldevicesettings for the given organization in order of most recent one to oldest one irrespective of its status.

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

Parameters:
  • org_id (str) – Retrieve list of ‘calldevicesettings’ jobs for this organization.

  • params – optional parameters

Returns:

Generator of StartJobResponse instances

status(job_id: str, org_id: str | None = None) StartJobResponse[source]

Get change device settings job status.

Provides details of the job with jobId of jobType calldevicesettings.

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

Parameters:
  • job_id (str) – Retrieve job details for this jobId.

  • org_id (str) – Retrieve job details for this org

Returns:

job details

Return type:

StartJobResponse

errors(job_id: str, org_id: str | None = None) Generator[JobErrorItem, None, None][source]

List change device settings job errors.

Lists all error details of the job with jobId of jobType calldevicesettings.

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

Parameters:
  • job_id – Retrieve job details for this jobId.

  • org_id – Retrieve list of jobs for this organization.

Returns:

base = 'telephony/config/jobs/devices/callDeviceSettings'
class wxc_sdk.telephony.jobs.NumberItem(*, locationId: str | None = None, numbers: list[str] | None = None, **extra_data: Any)[source]

Bases: ApiModel

location_id: str | None

The source location of the numbers to be moved.

numbers: list[str] | None

Indicates the numbers to be moved from one location to another location.

class wxc_sdk.telephony.jobs.MoveNumberCounts(*, totalNumbers: int | None = None, numbersDeleted: int | None = None, numbersMoved: int | None = None, numbersFailed: int | None = None, numbersActivated: int | None = None, numbersUsageChanged: int | None = None, **extra_data: Any)[source]

Bases: ApiModel

total_numbers: int | None

Indicates the total number of phone numbers requested to be moved.

numbers_deleted: int | None

Indicates the total number of phone numbers successfully deleted.

numbers_moved: int | None

Indicates the total number of phone numbers successfully moved.

numbers_failed: int | None

Indicates the total number of phone numbers failed.

numbers_activated: int | None
numbers_usage_changed: int | None

Count of phone numbers for which usage changed.

class wxc_sdk.telephony.jobs.NumberJob(*, id: str | None = None, name: str | None = None, jobType: str | None = None, trackingId: str | None = None, sourceUserId: str | None = None, sourceCustomerId: str | None = None, targetCustomerId: str | None = None, instanceId: int | None = None, jobExecutionStatus: list[JobExecutionStatus] | None = None, latestExecutionStatus: str | None = None, latestExecutionExitCode: str | None = None, operationType: str | None = None, sourceLocationId: str | None = None, targetLocationId: str | None = None, sourceLocationName: str | None = None, targetLocationName: str | None = None, counts: MoveNumberCounts | None = None, **extra_data: Any)[source]

Bases: ApiModel

id: str | None

Unique identifier of the job.

name: str | None

job name

job_type: str | None

Job type.

tracking_id: str | None

Unique identifier to track the flow of HTTP requests.

source_user_id: str | None

Unique identifier to identify which user has run the job.

source_customer_id: str | None

Unique identifier to identify the customer who has run the job.

target_customer_id: str | None

Unique identifier to identify the customer for which the job was run.

instance_id: int | None

Unique identifier to identify the instance of the job.

job_execution_status: list[JobExecutionStatus] | None
latest_execution_status: str | None

Indicates the most recent status (STARTING, STARTED, COMPLETED, FAILED) of the job at the time of invocation.

latest_execution_exit_code: str | None

Most recent exit code of the job at the time of invocation.

operation_type: str | None

Indicates operation type that was carried out.

source_location_id: str | None

Unique location identifier for which the job was run.

target_location_id: str | None

Unique location identifier for which the numbers have been moved.

source_location_name: str | None

The location name for which the job was run.

target_location_name: str | None

The location name for which the numbers have been moved.

counts: MoveNumberCounts | None

Job statistics.

class wxc_sdk.telephony.jobs.ErrorMessageObject(*, code: str | None = None, description: str | None = None, locationId: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

code: str | None
description: str | None
location_id: str | None
class wxc_sdk.telephony.jobs.ErrorObject(*, key: str | None = None, message: list[ErrorMessageObject] | None = None, **extra_data: Any)[source]

Bases: ApiModel

key: str | None

HTTP error code.

message: list[ErrorMessageObject] | None
class wxc_sdk.telephony.jobs.ManageNumberErrorItem(*, item: str | None = None, itemNumber: int | None = None, trackingId: str | None = None, error: ErrorObject | None = None, **extra_data: Any)[source]

Bases: ApiModel

item: str | None

Phone number

item_number: int | None

Index of error number.

tracking_id: str | None

Unique identifier to track the HTTP requests.

error: ErrorObject | None
class wxc_sdk.telephony.jobs.ManageNumbersJobsApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

API for jobs to manage numbers

list(org_id: str | None = None, **params) Generator[NumberJob, None, None][source]

Lists all Manage Numbers jobs for the given organization in order of most recent one to oldest one irrespective of its status.

The public API only supports initiating jobs which move numbers between locations.

Via Control Hub they can initiate both the move and delete, so this listing can show both.

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

Parameters:

org_id (str) – Retrieve list of Manage Number jobs for this organization.

Returns:

Generator yielding NumberJob instances

initiate_job(operation: str, number_list: List[NumberItem], target_location_id: str | None = None, number_usage_type: str | None = None) NumberJob[source]

Starts the execution of an operation on a set of numbers. Supported operations are: MOVE, NUMBER_USAGE_CHANGE.

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Notes Although the job can internally perform the DELETE action, only the MOVE and NUMBER_USAGE_CHANGE operations are publicly supported.

Although the numbers field is an array, we currently only support a single number with each request.

Only one number can be moved at any given time. If a move of another number is initiated while a move job is in progress the API call will receive a 409 http status code.

In order to move a number,

  • The number must be unassigned.

  • Both locations must have the same PSTN Connection Type.

  • Both locations must have the same PSTN Provider.

  • Both locations have to be in the same country.

For example, you can move from Cisco Calling Plan to Cisco Calling Plan, but you cannot move from Cisco Calling Plan to a location with Cloud Connected PSTN.

In order to change the number usage,

  • The number must be unassigned.

  • Number Usage Type can be set to NONE if carrier has the PSTN service GEOGRAPHIC_NUMBERS.

  • Number Usage Type can be set to SERVICE if carrier has the PSTN service SERVICE_NUMBERS.

For example, you can initiate a NUMBER_USAGE_CHANGE job to change the number type from Standard number to Service number, or the other way around.

Parameters:
  • operation (str) – Indicates the kind of operation to be carried out.

  • number_list (list[NumberItem]) – Numbers on which to execute the operation.

  • target_location_id (str) – Mandatory for a MOVE operation. The target location within organization where the unassigned numbers will be moved from the source location.

  • number_usage_type (str) – Mandatory for NUMBER_USAGE_CHANGE operation. Indicates the number usage type.

Return type:

NumberJob

status(job_id: str | None = None) NumberJob[source]

Returns the status and other details of the job. This API requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:

job_id (str) – Retrieve job details for this jobId.

pause(job_id: str | None = None, org_id: str | None = None)[source]

Pause the running Manage Numbers Job. A paused job can be resumed or abandoned. This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • job_id (str) – Pause the Manage Numbers job for this jobId.

  • org_id (str) – Pause the Manage Numbers job for this organization.

resume(job_id: str | None = None, org_id: str | None = None)[source]

Resume the paused Manage Numbers Job. A paused job can be resumed or abandoned. This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • job_id (str) – Resume the Manage Numbers job for this jobId.

  • org_id (str) – Resume the Manage Numbers job for this organization.

abandon(job_id: str | None = None, org_id: str | None = None)[source]

Abandon the Manage Numbers Job. This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • job_id (str) – Abandon the Manage Numbers job for this jobId.

  • org_id (str) – Abandon the Manage Numbers job for this organization.

errors(job_id: str | None = None, org_id: str | None = None, **params) Generator[ManageNumberErrorItem, None, None][source]

Lists all error details of Manage Numbers job. This will not list any errors if exitCode is COMPLETED. If the status is COMPLETED_WITH_ERRORS then this lists the cause of failures. List of possible Errors: This API requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • job_id (str) – Retrieve the error details for this jobId.

  • org_id (str) – Retrieve list of jobs for this organization.

base = 'telephony/config/jobs/numbers'
class wxc_sdk.telephony.jobs.InitiateMoveNumberJobsBody(*, operation: str | None = None, targetLocationId: str | None = None, numberList: list[NumberItem] | None = None, **extra_data: Any)[source]

Bases: ApiModel

operation: str | None

Indicates the kind of operation to be carried out.

target_location_id: str | None

The target location within organization where the unassigned numbers will be moved from the source location.

number_list: list[NumberItem] | None

Indicates the numbers to be moved from source to target locations.

class wxc_sdk.telephony.jobs.ApplyLineKeyTemplatesJobsApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

apply(action: ApplyLineKeyTemplateAction, template_id: str | None = None, location_ids: list[str] | None = None, exclude_devices_with_custom_layout: bool | None = None, include_device_tags: list[str] | None = None, exclude_device_tags: list[str] | None = None, advisory_types: LineKeyTemplateAdvisoryTypes | None = None, org_id: str | None = None) ApplyLineKeyTemplateJobDetails[source]

Apply a Line key Template

Apply a Line Key Template or reset devices to their factory Line Key settings.

Line Keys also known as Programmable Line Keys (PLK) are the keys found on either sides of a typical desk phone display.

A Line Key Template is a definition of actions that will be performed by each of the Line Keys for a particular device model.

This API allows users to apply a line key template or apply factory default Line Key settings to devices in a set of locations or across all locations in the organization.

Applying a Line Key Template or resetting devices to their default Line Key configuration requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • action (PostApplyLineKeyTemplateRequestAction) – Line key Template action to perform.

  • template_id (str) – templateId is required for APPLY_TEMPLATE action.

  • location_ids (list[str]) – Used to search for devices only in the given locations.

  • exclude_devices_with_custom_layout (bool) – Indicates whether to exclude devices with custom layout.

  • include_device_tags (list[str]) – Include devices only with these tags.

  • exclude_device_tags (list[str]) – Exclude devices with these tags.

  • advisory_types (LineKeyTemplateAdvisoryTypes) – Refine search with advisories.

  • org_id (str) – Apply Line Key Template for this organization.

Return type:

ApplyLineKeyTemplateJobDetails

list(org_id: str | None = None) list[ApplyLineKeyTemplateJobDetails][source]

Get List of Apply Line Key Template jobs

Get the list of all apply line key templates jobs in an organization.

Line Keys also known as Programmable Line Keys (PLK) are the keys found on either sides of a typical desk phone display. A Line Key Template is a definition of actions that will be performed by each of the Line Keys for a particular device model. This API allows users to retrieve all the apply line key templates jobs in an organization.

Retrieving the list of apply line key templates jobs in an organization requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:

org_id (str) – Retrieve list of line key templates jobs in this organization.

Return type:

list[ApplyLineKeyTemplateJobDetails]

status(job_id: str, org_id: str | None = None) ApplyLineKeyTemplateJobDetails[source]

Get the job status of an Apply Line Key Template job

Get the status of an apply line key template job by its job ID.

Line Keys also known as Programmable Line Keys (PLK) are the keys found on either sides of a typical desk phone display. A Line Key Template is a definition of actions that will be performed by each of the Line Keys for a particular device model. This API allows users to check the status of an apply line key templates job by job ID in an organization.

Checking the the status of an apply line key templates job in an organization requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • job_id (str) – Retrieve job status for this jobId.

  • org_id (str) – Check a line key template job status in this organization.

Return type:

ApplyLineKeyTemplateJobDetails

errors(job_id: str, org_id: str | None = None) Generator[JobErrorItem, None, None][source]

Get job errors for an Apply Line Key Template job

GET job errors for an apply Line Key Template job in an organization.

Line Keys also known as Programmable Line Keys (PLK) are the keys found on either sides of a typical desk phone display. A Line Key Template is a definition of actions that will be performed by each of the Line Keys for a particular device model. This API allows users to retrieve all the errors of an apply line key templates job by job ID in an organization.

Retrieving all the errors of an apply line key templates job in an organization requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • job_id (str) – Retrieve job errors for this jobId.

  • org_id (str) – Retrieve list of errors for an apply line key template job in this organization.

base = 'telephony/config/jobs/devices/applyLineKeyTemplate'
class wxc_sdk.telephony.jobs.LineKeyTemplateAdvisoryTypes(*, moreSharedAppearancesEnabled: bool | None = None, fewSharedAppearancesEnabled: bool | None = None, moreMonitorAppearancesEnabled: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

more_shared_appearances_enabled: bool | None

Refine search by warnings for More shared appearances than shared users.

few_shared_appearances_enabled: bool | None

Refine search by warnings for Fewer shared appearances than shared users.

more_monitor_appearances_enabled: bool | None

Refine search by warnings for More monitor appearances than monitors.

class wxc_sdk.telephony.jobs.ApplyLineKeyTemplateJobDetails(*, name: str | None = None, id: str | None = None, trackingId: str | None = None, sourceUserId: str | None = None, sourceCustomerId: str | None = None, targetCustomerId: str | None = None, instanceId: int | None = None, jobExecutionStatus: list[JobExecutionStatus] | None = None, latestExecutionStatus: str | None = None, latestExecutionExitCode: str | None = None, percentageComplete: int | None = None, updatedCount: int | None = None, advisoryCount: int | None = None, **extra_data: Any)[source]

Bases: ApiModel

name: str | None

Job name.

id: str | None

Unique identifier of the job.

tracking_id: str | None

Unique identifier to track the flow of HTTP requests.

source_user_id: str | None

Unique identifier to identify which user has run the job.

source_customer_id: str | None

Unique identifier to identify the customer who has run the job.

target_customer_id: str | None

Unique identifier to identify the customer for which the job was run.

instance_id: int | None

Unique identifier to identify the instance of the job.

job_execution_status: list[JobExecutionStatus] | None

Displays the most recent step’s execution status. Contains execution statuses of all the steps involved in the execution of the job.

latest_execution_status: str | None

Indicates the most recent status (STARTING, STARTED, COMPLETED, FAILED) of the job at the time of invocation.

latest_execution_exit_code: str | None

Most recent exit code of the job at the time of invocation.

percentage_complete: int | None

Indicates the progress of the job.

updated_count: int | None

Number of job steps completed.

advisory_count: int | None

Number of job steps completed with advisories.

class wxc_sdk.telephony.jobs.RebuildPhonesJobsApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

rebuild_phones_configuration(location_id: str, org_id: str | None = None) StartJobResponse[source]

Rebuild Phones Configuration

Not supported for Webex for Government (FedRAMP)

Rebuild all phone configurations for the specified location.

Rebuild phones jobs are used when there is a change in the network configuration of phones in a location, i.e. a change in the network configuration of devices in a location from public to private and vice-versa.

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Unique identifier of the location.

  • org_id (str) – Rebuild phones for this organization.

Return type:

RebuildPhonesJob

list(org_id: str | None = None) list[StartJobResponse][source]

List Rebuild Phones Jobs

Not supported for Webex for Government (FedRAMP)

Get the list of all Rebuild Phones jobs in an organization.

Rebuild phones jobs are used when there is a change in the network configuration of phones in a location, i.e. a change in the network configuration of devices in a location from public to private and vice-versa.

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:

org_id (str) – List of rebuild phones jobs in this organization.

Return type:

list[RebuildPhonesJob]

status(job_id: str, org_id: str | None = None) StartJobResponse[source]

Get the Job Status of a Rebuild Phones Job

Not supported for Webex for Government (FedRAMP)

Get the details of a rebuild phones job by its job ID.

Rebuild phones jobs are used when there is a change in the network configuration of phones in a location, i.e. a change in the network configuration of devices in a location from public to private and vice-versa.

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • job_id (str) – Retrieve job status for this jobId.

  • org_id (str) – Check a rebuild phones job status in this organization.

Return type:

RebuildPhonesJob

errors(job_id: str, org_id: str | None = None) Generator[JobErrorItem, None, None][source]

Get Job Errors for a Rebuild Phones Job

Not supported for Webex for Government (FedRAMP)

Get errors for a rebuild phones job in an organization.

Rebuild phones jobs are used when there is a change in the network configuration of phones in a location, i.e. a change in the network configuration of devices in a location from public to private and vice-versa.

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • job_id (str) – Retrieve job errors for this jobId.

  • org_id (str) – Retrieve list of errors for a rebuild phones job in this organization.

Return type:

list[ItemObject]

base = 'telephony/config/jobs/devices/rebuildPhones'
class wxc_sdk.telephony.jobs.UpdateRoutingPrefixJobsApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

list(org_id: str | None = None) Generator[StartJobResponse, None, None][source]

Get a List of Update Routing Prefix jobs

Get the list of all update routing prefix jobs in an organization.

The routing prefix is associated with a location and is used to route calls belonging to that location. This API allows users to retrieve all the update routing prefix jobs in an organization.

Retrieving the list of update routing prefix jobs in an organization requires a full, user, or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:

org_id (str) – Retrieve list of update routing prefix jobs in this organization.

Return type:

list[StartJobResponse]

status(job_id: str, org_id: str | None = None) StartJobResponse[source]

Get the job status of Update Routing Prefix job

Get the status of the update routing prefix job by its job ID.

The routing prefix is associated with a location and is used to route calls belonging to that location. This API allows users to check the status of update routing prefix job by job ID in an organization.

Checking the status of the update routing prefix job in an organization requires a full, user, or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • job_id (str) – Retrieve job status for this jobId.

  • org_id (str) – Check update routing prefix job status in this organization.

Return type:

StartJobResponse

errors(job_id: str, org_id: str | None = None) Generator[JobErrorItem, None, None][source]

Get job errors for update routing prefix job

GET job errors for the update routing prefix job in an organization.

The routing prefix is associated with a location and is used to route calls belonging to that location. This API allows users to retrieve all the errors of the update routing prefix job by job ID in an organization.

Retrieving all the errors of the update routing prefix job in an organization requires a full, user, or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • job_id (str) – Retrieve job errors for this jobId.

  • org_id (str) – Retrieve list of errors for update routing prefix job in this organization.

base = 'telephony/config/jobs/updateRoutingPrefix'
class wxc_sdk.telephony.jobs.RoutingPrefixCounts(*, routingPrefixUpdated: int | None = None, routingPrefixFailed: int | None = None, **extra_data: Any)[source]

Bases: ApiModel

routing_prefix_updated: int | None

Indicates the total number of records whose routing prefix update is successful.

routing_prefix_failed: int | None

Indicates the total number of records whose routing prefix update failed.

class wxc_sdk.telephony.jobs.MoveCounts(*, totalMoves: int | None = None, moved: int | None = None, failed: int | None = None, **extra_data: Any)[source]

Bases: ApiModel

total_moves: int | None

Indicates the total number of user moves requested.

moved: int | None

Indicates the total number of user moves completed.

failed: int | None

Indicates the total number of user moves that failed.

class wxc_sdk.telephony.jobs.MoveUser(*, userId: str | None = None, extension: str | None = None, phoneNumber: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

user_id: str | None

User ID to be moved.

extension: str | None

Extension to be moved.

phone_number: str | None

Phone number to be moved.

class wxc_sdk.telephony.jobs.MoveUsersList(*, locationId: str | None = None, validate: bool | None = None, users: list[MoveUser] | None = None, **extra_data: Any)[source]

Bases: ApiModel

location_id: str | None

The target location for the user move.

validate_only: bool | None

When true, validate the user move. When false, perform the user move.

users: list[MoveUser] | None

A list of users to be moved.

class wxc_sdk.telephony.jobs.MoveUserJobDetails(*, name: str | None = None, id: str | None = None, trackingId: str | None = None, sourceUserId: str | None = None, sourceCustomerId: str | None = None, targetCustomerId: str | None = None, instanceId: int | None = None, jobExecutionStatus: list[JobExecutionStatus] | None = None, latestExecutionStatus: str | None = None, latestExecutionExitCode: str | None = None, counts: MoveCounts | None = None, csvFile: str | None = None, csvFileExpiryTime: str | None = None, fileFormat: str | None = None, csvFileDownloadUrl: str | None = None, **extra_data: Any)[source]

Bases: ApiModel

name: str | None

Job name

id: str | None

Unique identifier of the job.

tracking_id: str | None

Unique identifier to track the flow of HTTP requests.

source_user_id: str | None

Unique identifier to identify which user has run the job.

source_customer_id: str | None

Unique identifier to identify the customer who has run the job.

target_customer_id: str | None

Unique identifier to identify the customer for which the job was run.

instance_id: int | None

Unique identifier to identify the instance of the job.

job_execution_status: list[JobExecutionStatus] | None

Displays the most recent step’s execution status. Contains execution statuses of all the steps involved in the execution of the job.

latest_execution_status: str | None

Indicates the most recent status (STARTING,`STARTED`,`COMPLETED`,`FAILED`) of the job at the time of invocation.

latest_execution_exit_code: str | None

Most recent exit code of the job at the time of invocation.

counts: MoveCounts | None

Job statistics.

csv_file: str | None

Reference ID for the file that holds the errors and impacts.

csv_file_expiry_time: str | None

The date and time with seconds, the file expires in UTC format.

file_format: str | None

‘text/csv’, Format of the file generated.

csv_file_download_url: str | None

URL to the CSV file containing errors and impacts.

class wxc_sdk.telephony.jobs.MoveUsersJobsApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

validate_or_initiate(users_list: list[MoveUsersList], org_id: str | None = None) StartMoveUsersJobResponse[source]

Validate or Initiate Move Users Job

This API allows the user to perform any one of the following operations:

  • When the validate attribute is true, this validates the user move from one location to another location.

  • When the validate attribute is false, this performs the user move from one location to another location.

In order to validate or move a user,

  • Maximum of one calling user can be moved at a time.

  • The target location must be a calling location.

  • Only one new extension can be moved to the target location, which is optional. An empty value will

remove the

already configured extension. If not provided, the existing extension will be retained to the user.

  • Only one new phone number belonging to the target location can be assigned to the user, which is optional. Phone number must follow E.164 format. An empty value will remove the already configured phone number. If not provided, the existing phone number of the user will be moved to the target location.

Any errors that occur during initial API request validation will be captured directly in error response with appropriate HTTP status code.

List of possible Errors:

  • 1026005 - Request is supported only for single user.

  • 1026006 - Attribute ‘Location ID’ is required.

  • 1026006 - Attribute ‘User ID’ is required.

  • 1026006 - Attribute ‘Validate’ is required.

  • 1026010 - User is not a valid Calling User.

  • 1026011 - Users list should not be empty.

  • 1026012 - Users should not be empty.

  • 1026013 - The source and the target location cannot be the same.

  • 1026014 - Error occurred while processing the move users request.

  • 1026015 - Error occurred while moving user number to target location.

  • 1026016 - User should have either phone number or extension.

  • 1026017 - Phone number is not in e164 format.

When the validate is set to be true, the errors and impacts associated with the user move will be identified and returned in the response.

List of possible Errors:

  • 4003 - User Not Found

  • 4007 - User Not Found

  • 4152 - Location Not Found

  • 5620 - Location Not Found

  • 4202 - The extension is not available. It is already assigned to a user : {0}

  • 8264 - Routing profile is different with new group: {0}

  • 19600 - User has to be within an enterprise to be moved.

  • 19601 - User can only be moved to a different group within the same enterprise.

  • 19602 - Only regular end user can be moved. Service instance virtual user cannot be moved.

  • 19603 - New group already reaches maximum number of user limits.

  • 19604 - The {0} number of the user is the same as the calling line ID of the group.

  • 19605 - User is assigned services not authorized to the new group: {0}.

  • 19606 - User is in an active hoteling/flexible seating association.

  • 19607 - User is pilot user of a trunk group.

  • 19608 - `User is using group level device profiles which is used by other users in current group.

Following

are the device profiles shared with other users: {0}.`

  • 19609 - Following device profiles cannot be moved to the new group because there are already devices with the same name defined in the new group: {0}.

  • 19610 - The extension of the user is used as transfer to operator number for following Auto Attendent : {0}.

  • 19611 - Fail to move announcement file from {0} to {1}.

  • 19612 - Fail to move device management file from {0} to {1}.

  • 19613 - User is assigned service packs not authorized to the new group: {0}.

  • 25008 - Missing Mandatory field name: {0}

  • 25110 - {fieldName} cannot be less than {0} or greater than {1} characters.

  • 25378 - Target location is same as user’s current location.

  • 25379 - Error Occurred while Fetching User’s Current Location Id.

  • 25381 - Error Occurred while rolling back to Old Location Call recording Settings

  • 25382 - `Error Occurred while Disabling Call Recording for user which is required Before User can be

Moved`

  • 25383 - OCI Error while moving user

  • 25384 - Error Occurred while checking for Possible Call Recording Impact.

  • 25385 - Error Occurred while getting Call Recording Settings

  • 27559 - The groupExternalId search criteria contains groups with different calling zone.

  • 27960 - Parameter isWebexCalling, newPhoneNumber, or newExtension can only be set in Webex Calling deployment mode.

  • 27961 - Parameter isWebexCalling shall be set if newPhoneNumber or newExtension is set.

  • 27962 - Work space cannot be moved.

  • 27963 - Virtual profile user cannot be moved.

  • 27965 - The user’s phone number: {0}, is same as the current group charge number.

  • 27966 - The phone number, {0}, is not available in the new group.

  • 27967 - User is configured as the ECBN user for another user in the current group.

  • 27968 - User is configured as the ECBN user for the current group.

  • 27969 - User is associated with DECT handset(s): {0}

  • 27970 - User is using a customer managed device: {0}

  • 27971 - User is using an ATA device: {0}

  • 27972 - User is in an active hotdesking association.

  • 27975 - Need to unassign CLID number from group before moving the number to the new group. Phone number: {0}

  • 27976 - Local Gateway configuration is different with new group. Phone number: {0}

  • 1026015 - Error occurred while moving user number to target location

  • 10010000 - Total numbers exceeded maximum limit allowed

  • 10010001 - to-location and from-location cannot be same

  • 10010002 - to-location and from-location should belong to same customer

  • 10010003 - to-location must have a carrier

  • 10010004 - from-location must have a carrier

  • 10010005 - Different Carrier move is not supported for non-Cisco PSTN carriers.

  • 10010006 - Number move not supported for WEBEX_DIRECT carriers.

  • 10010007 - Numbers out of sync, missing on CPAPI

  • 10010008 - from-location not found or pstn connection missing in CPAPI

  • 10010010 - from-location is in transition

  • 10010009 - to-location not found or pstn connection missing in CPAPI

  • 10010011 - to-location is in transition

  • 10010012 - Numbers don’t have a carrier Id

  • 10010013 - Location less numbers don’t have a carrier Id

  • 10010014 - Different Carrier move is not supported for numbers with different country or region.

  • 10010015 - Numbers contain mobile and non-mobile types.

  • 10010016 - To/From location carriers must be same for mobile numbers.

  • 10010017 - Move request for location less number not supported

  • 10010200 - Move request for more than one block number is not supported

  • 10010201 - Cannot move block number as few numbers not from the block starting %s to %s

  • 10010202 - Cannot move block number as few numbers failed VERIFICATION from the block %s to %s

  • 10010203 - Cannot move block number as few numbers missing from the block %s to %s

  • 10010204 - Cannot move number as it is NOT a part of the block %s to %s

  • 10010205 - Move request for Cisco PSTN block order not supported.

  • 10010299 - Move order couldn’t be created as no valid number to move

  • 10030000 - Number not found

  • 10030001 - Number does not belong to from-location

  • 10030002 - Number is not present in CPAPI

  • 10030003 - Number assigned to an user or device

  • 10030004 - Number not in Active status

  • 10030005 - Number is set as main number of the location

  • 10030006 - Number has pending order associated with it

  • 10030007 - Number belongs to a location but a from-location was not set

  • 10030008 - Numbers from multiple carrier ids are not supported

  • 10030009 - `Location less number belongs to a location. from-location value is set to null or no

location id`

  • 10030010 - One or more numbers are not portable.

  • 10030011 - Mobile number carrier was not set

  • 10030012 - Number must be assigned for assigned move

  • 10050000 - Failed to update customer reference for phone numbers on carrier

  • 10050001 - Failed to update customer reference

  • 10050002 - Order is not of operation type MOVE

  • 10050003 - CPAPI delete call failed

  • 10050004 - Not found in database

  • 10050005 - Error sending notification to WxcBillingService

  • 10050006 - CPAPI provision number as active call failed with status %s ,reason %s

  • 10050007 - Failed to update E911 Service

  • 10050008 - Target location does not have Inbound Toll Free license

  • 10050009 - Source location or Target location subscription found cancelled or suspended

  • 10050010 - `Moving On Premises or Non Integrated CCP numbers from one location to another is not

supported.`

  • 10099999 - {Error Code} - {Error Message}

List of possible Impacts:

  • 19701 - The identity/device profile the user is using is moved to the new group: {0}.

  • 19702 - `The user level customized incoming digit string setting is removed from the user. User is set

to use

the new group setting.`

  • 19703 - `The user level customized outgoing digit plan setting is removed from the user. User is set to

use

the new group setting.`

  • 19704 - `The user level customized enhanced outgoing calling plan setting is removed from the user.

User is

set to use the new group setting.`

  • 19705 - User is removed from following group services: {0}.

  • 19706 - The current group schedule used in any criteria is removed from the service settings.

  • 19707 - User is removed from the department of the old group.

  • 19708 - User is changed to use the default communication barring profile of the new group.

  • 19709 - The communication barring profile of the user is assigned to the new group: {0}.

  • 19710 - The charge number for the user is removed.

  • 19711 - The disabled FACs for the user are removed because they are not available in the new group.

  • 19712 - User is removed from trunk group.

  • 19713 - The extension of the user is reset to empty due to either the length is out of bounds of the new group, or the extension is already taken in new group.

  • 19714 - The extension of the following alternate number is reset to empty due to either the length out of bounds of the new group or the extension is already taken in new group: {0}.

  • 19715 - The collaborate room using current group default collaborate bridge is moved to the default collaborate bridge of the new group.

  • 19716 - Previously stored voice messages of the user are no longer available. The new voice message will be stored on the mail server of the new group.

  • 19717 - The primary number, alternate numbers or fax messaging number of the user are assigned to the new group: {0}.

  • 19718 - Following domains are assigned to the new group: {0}.

  • 19719 - The NCOS of the user is assigned to the new group: {0}.

  • 19720 - The office zone of the user is assigned to the new group: {0}.

  • 19721 - The announcement media files are relocated to the new group directory.

  • 19722 - User CLID number is set to use the new group CLID number: {0}.

  • 19723 - New group CLID number is not configured.

  • 19724 - The group level announcement file(s) are removed from the user’s music on hold settings.

  • 25388 - Target Location Does not Have Vendor Configured. Call Recording for user will be disabled

  • 25389 - Call Recording Vendor for user will be changed from:{0} to:{1}

  • 25390 - Dub point of user is moved to new external group

  • 25391 - Error Occurred while moving Call recording Settings to new location

  • 25392 - Error Occurred while checking for Possible Call Recording Impact.

  • 25393 - Sending Billing Notification Failed

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write, spark-admin:people_write and identity:groups_rw.

Parameters:
  • users_list (list[MoveUsersList]) – The user to be moved from the source location.

  • org_id (str) – Create Move Users job for this organization.

Return type:

StartJobResponse

list(org_id: str | None = None, **params) Generator[MoveUserJobDetails, None, None][source]

List Move Users Jobs

Lists all the Move Users jobs for the given organization in order of most recent job to oldest job irrespective of its status.

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

Parameters:

org_id (str) – Retrieve list of Move Users jobs for this organization.

Returns:

Generator yielding JobDetailsResponse instances

status(job_id: str, org_id: str | None = None) MoveUserJobDetails[source]

Get Move Users Job Status

Returns the status and other details of the job.

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

Parameters:
  • job_id (str) – Retrieve job details for this jobId.

  • org_id (str) – Retrieve job details for this organization.

Return type:

MoveUserJobDetails

abandon(job_id: str, org_id: str | None = None)[source]

Abandon the Move Users Job.

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • job_id (str) – Abandon the Move Users job for this jobId.

  • org_id (str) – Abandon the Move Users job for this organization.

Return type:

None

pause(job_id: str, org_id: str | None = None)[source]

Pause the Move Users Job

Pause the running Move Users Job. A paused job can be resumed or abandoned.

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • job_id (str) – Pause the Move Users job for this jobId.

  • org_id (str) – Pause the Move Users job for this organization.

Return type:

None

resume(job_id: str, org_id: str | None = None)[source]

Resume the Move Users Job

Resume the paused Move Users Job that is in paused status.

This API requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • job_id (str) – Resume the Move Users job for this jobId.

  • org_id (str) – Resume the Move Users job for this organization.

Return type:

None

errors(job_id: str, org_id: str | None = None, **params) Generator[JobErrorItem, None, None][source]

List Move Users Job errors

Lists all error details of Move Users job. This will not list any errors if exitCode is COMPLETED. If the status is COMPLETED_WITH_ERRORS then this lists the cause of failures.

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

Parameters:
  • job_id (str) – Retrieve the error details for this jobId.

  • org_id (str) – Retrieve list of jobs for this organization.

Returns:

Generator yielding JobErrorItem instances

base = 'telephony/config/jobs/person/moveLocation'
class wxc_sdk.telephony.jobs.StartMoveUsersJobResponse(*, usersList: list[MoveUserItem] | None = None, jobDetails: StartJobResponse | None = None, **extra_data: Any)[source]

Bases: ApiModel

users_list: list[MoveUserItem] | None
job_details: StartJobResponse | None