Personal tools

Extend XML API Overview

From SwitchvoxExtendAPI

Jump to: navigation, search

Contents

Overview

The Extend API lets you perform a variety of tasks and query a ton of information from your Switchvox PBX. This could include getting a list of all the extensions on Switchvox, updating a global IVR variable, or even originating a call between two numbers. To get a full list of all the methods with descriptions visit the Methods section.


What is the Core Interface?

The Core Interface is an XML web service that uses digest authentication for authorization. You pass in XML requests and the Core Interface passes back an XML response.


Connecting to the Core Interface

The Core Interface can be accessed through an easy URL:

	https://YOUR.PBX.IP/xml


Test Your Connection

To see if you can connect to your Switchvox using the Extend Core API, type the above URL into your browser.

The API uses digest authentication, and requires you to be authenticated as an administrator ('admin' or another administrator) or as an extension-user. If you have recently logged into your Switchvox Admin or User Suite, then you have already been authenticated and have the proper cookies set. If you are not logged in, then you will see the following prompt. (Read more about Authentication.)

File:Api_auth.JPG‎

Log In

If you type in the username 'admin' and your admin password, then you can use all of the functionality of the API.

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 switchvox.extensions.getInfo, but you cannot use switchvox.extensions.phones.bulk.upload. The call creation method, switchvox.call, requires read/write access on 'Manage Extensions.'

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.

The XML Response

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.


Sample XML response: File:No_request_xml_response.jpg

What To Do Next

Now that you have verified that you can connect to the Extend Core API, you can try a couple of different things.

1. Learn about Constructing Requests.

2. Browse the Methods section to see what you can do with the API.

3. Test sample requests and responses through a live system using our Test Suite.

4. Check out our Client Libraries and start coding in your favorite programming language.

AltStyle によって変換されたページ (->オリジナル) /