...
...
...
...
...
...
...
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
About
The Extend API methods let you query information from Switchvox.
Extend is a an XML-based API. You may want to use this Sample JavaScript Library.
Connect to the Core Interface
...
If you use another administrator account, then the access levels for that account apply when you use the API. For example, if you have read-only access to 'Manage Extensions,' then you can use switchvoxuse switchvox.extensions.getInfo, but you cannot use switchvoxuse switchvox.extensions.phones.bulk.upload.
If you use an extension and its password, then you can only use the 'users' functionality of the API, and the tasks you do will apply to that extension.
...
NOTE: Extend is a an XML-based API. You may want to use this Sample JavaScript Library.
After you enter a valid username and password, Switchvox returns an XML response to your browser. The response will most likely contain an error that your request XML was empty, but that is fine because we were just testing for connectivity. If you didn't get any response, you might need to check your firewall or the Access Control section on your Switchvox.
...
Pick Your Method & Parameters
First pick which method you want to run. As an example, we have chosen "switchvox.extension.search". Every single request is encased in the parent tag "request" and the method is an attribute of that tag:
<request method="switchvox.extension.search">
...
This XML is started, but now we need to add parameters. Below are all the possible parameters for the method "switchvox.extensions.search".
Name | Required | Type | Default | Description |
min_extension | optional | string | Minimum extension number. | |
max_extension | optional | integer | Maximum extension number. If both min/max extension is provided, the max must be greater than the min. | |
extension_types | optional | string | A list of extension types to filter by. See Extension Types for a list of possible values. | |
min_create_date | optional | date | Minimum creation date of extension. | |
max_create_date | optional | date | Maximum creation date of extension. | |
sort_field | optional | string | number | The field on which to sort the returned extensions. |
sort_order | optional | string | ASC | The order in which to sort returned extensions. Possible values: ASC and DESC. |
items_per_page | optional | integer | 50 | Number of extensions to return per page. |
page_number | optional | integer | 1 | The page number of extensions to return. |
For this example, I want a list of all extensions between extension 100 and 200 and I only want extensions that are either an ivr or a call_queue.
So first we need to create the parameters parent tag that will enclose our parameter list:
<request method="switchvox.extensions.search">
...
Next we need to create a tag for each parameter we want to send, and enclose the value of each parameter between starting and closing tags:
<request method="switchvox.extensions.search">
...