Cisco Unity Connection REST API FAQ

From DocWiki

(Difference between revisions)
Jump to: navigation, search
m (1 revision)
(Added new FAQ about the supported recroding wave file formats.)
 
(7 intermediate revisions not shown)
Line 1: Line 1:
'''Links to Other API pages:''' [[Cisco_Unity_Connection_APIs]]
'''Links to Other API pages:''' [[Cisco_Unity_Connection_APIs]]
{| align="right" border="1"
{| align="right" border="1"
-
|align="center"|'''CUPI Guide Contents'''
+
|align="center"|'''Connection APIs'''
|-
|-
-
|[[Cisco Unity Connection Provisioning Interface (CUPI) API|API Overview ]]<br>[[Cisco Unity Connection Provisioning Interface (CUPI) API -- Index of All CUPI Documentation|Index of All CUPI Documentation]]
+
|[[Cisco Unity Connection Provisioning Interface (CUPI) API|CUPI Overview ]]<br>[[Cisco Unity Connection Provisioning Interface (CUPI) API -- For End Users|CUPI for End Users Overview ]]<br>[[Cisco Unity Connection Messaging Interface (CUMI) API|CUMI Overview ]]<br>[[Cisco Unity Connection Telephony Interface (CUTI) API|CUTI Overview ]]<br>[[Cisco Unity Connection Notification Interface (CUNI) API|CUNI Overview ]]
|}
|}
 +
__TOC__
__TOC__
 +
== What can cause a 415 error? ==
== What can cause a 415 error? ==
Line 14: Line 16:
== What can cause a 503 error? ==
== What can cause a 503 error? ==
 +
A 503 error will result if there are too many requests queued up on the server. 
-
Because the CUPI API is designed for administrative tasks, it uses the same throttling as the Cisco Unity Connection Administration pages, which could lead to a 503 "Server busy" error.
+
The system will process a maximum of 5 web application requests at one time.  The throttle uses a global variable for this, so any request in any process using the throttle will count towards 1 of the 5.
-
By default, the maximum number of requests that can be processed at one time is three. All requests that come in while the three slots are in use are queued up. As soon as one request finishes processing, it releases a slot, which allows the first request in the queue to be processed. If a queued request wait time exceeds a timeout limit (20 seconds), then a 503 error is returned.
+
Any request that comes in while 5 or more others are processing will get queued and processed as soon as one of the active  requests is complete.
 +
 
 +
We can queue up to 255 requests (or the thread limit in tomcat, which is 150).
 +
 
 +
As long as requests process at a rate of 1 request per second, the other requests will remain in the queue. If the requests start processing at a rate slower than 1 per second, the queue wait mechanism times out and the client will get a “server busy” (HTTP 503) response.
Line 25: Line 32:
<pre>
<pre>
-
GET http://<connection-server>/vmrest/users?query=(aliasis jdoe)
+
GET http://<connection-server>/vmrest/users?query=(alias%20is%20jdoe)
</pre>
</pre>
Note that some languages and/or libraries require the URL to be escaped first, in which case the spaces need to be converted to %20.
Note that some languages and/or libraries require the URL to be escaped first, in which case the spaces need to be converted to %20.
-
 
== How do I find out which networked cluster a user is on? ==
== How do I find out which networked cluster a user is on? ==
Line 36: Line 42:
<pre>
<pre>
-
GET http://<connection-server>/vmrest/globalusers?query=(aliasis jdoe)
+
GET http://<connection-server>/vmrest/globalusers?query=(alias%20is%20jdoe)
</pre>
</pre>
-
 
== What is returned from a PUT? ==
== What is returned from a PUT? ==
Line 59: Line 64:
<pre>
<pre>
-
GET http://<connection-server>/vmrest/users?rowsPerPage=100&page=1
+
GET http://<connection-server>/vmrest/users?rowsPerPage=100&pageNumber=1
-
GET http://<connection-server>/vmrest/users?rowsPerPage=100&page=2
+
GET http://<connection-server>/vmrest/users?rowsPerPage=100&pageNumber=2
</pre>
</pre>
-
 
== What causes a 302 error? ==
== What causes a 302 error? ==
Line 68: Line 72:
An HTTP 302 response is very often caused by a client trying to connect to a web application by using HTTP protocol when the web application requires HTTPS. The web server sends back a 302 response to the client in an attempt to redirect it to the secure HTTPS port.
An HTTP 302 response is very often caused by a client trying to connect to a web application by using HTTP protocol when the web application requires HTTPS. The web server sends back a 302 response to the client in an attempt to redirect it to the secure HTTPS port.
 +
== What recording wave file formats are supported with the API? ==
 +
 +
The Codecs supported for the REST API are the same as the ones supported for recording over the phone line.
 +
The supported list is - 
 +
* PCM linear
 +
* G.711 mu-law (default)
 +
* G.711 a-law
 +
* G.729a
 +
* G.726
 +
* GSM 6.10
-
[[Category:Cisco Unity Connection Provisioning Interface (CUPI) API]]
+
[[Category: Unity Connection APIs]]

Latest revision as of 23:09, 9 February 2012

Links to Other API pages: Cisco_Unity_Connection_APIs

Connection APIs
CUPI Overview
CUPI for End Users Overview
CUMI Overview
CUTI Overview
CUNI Overview


Contents


What can cause a 415 error?

415 errors are generally caused by not specifying the requested content type. Try setting the "Content-Type" header to "application/xml".


What can cause a 503 error?

A 503 error will result if there are too many requests queued up on the server.

The system will process a maximum of 5 web application requests at one time. The throttle uses a global variable for this, so any request in any process using the throttle will count towards 1 of the 5.

Any request that comes in while 5 or more others are processing will get queued and processed as soon as one of the active requests is complete.

We can queue up to 255 requests (or the thread limit in tomcat, which is 150).

As long as requests process at a rate of 1 request per second, the other requests will remain in the queue. If the requests start processing at a rate slower than 1 per second, the queue wait mechanism times out and the client will get a “server busy” (HTTP 503) response.


How do I GET the guid (objectid) of a user?

Search by alias to get the user XML, then extract the ObjectId field. For example, to find the user John Doe with alias jdoe:

GET http://<connection-server>/vmrest/users?query=(alias%20is%20jdoe)

Note that some languages and/or libraries require the URL to be escaped first, in which case the spaces need to be converted to %20.

How do I find out which networked cluster a user is on?

Search for the user in the global user list, and look at the user's location (LocationObjectId):

GET http://<connection-server>/vmrest/globalusers?query=(alias%20is%20jdoe)

What is returned from a PUT?

A successful PUT operation returns an HTTP status code of 204 No Content.

All HTTP 2xx status codes mean success. Status code 204 means (quoting from RFC 2616): "The server has fulfilled the request but does not need to return an entity-body (aka content)."

A PUT operation sends a request to the server to change/update a resource, so the server does not need to send back anything except a success code, which is what 204 is appropriate for.


Is there support for paging?

Yes. Paging is supported via two query parameters:

  • rowsPerPage: Indicates how many objects to return in a single query.
  • pageNumber: Indicates which page of objects to return.

For example:

GET http://<connection-server>/vmrest/users?rowsPerPage=100&pageNumber=1
GET http://<connection-server>/vmrest/users?rowsPerPage=100&pageNumber=2

What causes a 302 error?

An HTTP 302 response is very often caused by a client trying to connect to a web application by using HTTP protocol when the web application requires HTTPS. The web server sends back a 302 response to the client in an attempt to redirect it to the secure HTTPS port.

What recording wave file formats are supported with the API?

The Codecs supported for the REST API are the same as the ones supported for recording over the phone line. The supported list is -

  • PCM linear
  • G.711 mu-law (default)
  • G.711 a-law
  • G.729a
  • G.726
  • GSM 6.10

Rating: 0.0/5 (0 votes cast)

Personal tools