REST

From ip tuning
Jump to: navigation, search
This page is still under construction

The objective of this page is to include some REST tips and tricks.

CUCM UDS - Cisco User Data Services

UDS URL

The basic URL for UDS services is:

https://<cucm-server>/cucm-uds/

WADL - Web Application Description Language

The WADL file that describes the services provided by CUCM is located at:

https://<cucm-server>/cucm-uds/application.wadl

If you are using SoapUI to show all resources that are available, you need to clean-up a trailing slash on the resource base property or SoapUI will include the requests with two slashes and CUCM will throw an error:

https://10.1.1.70/cucm-uds//version

The answer will be:

<error>
 <code>HTTP404</code>
 <message>Not Found</message>
</error>

Even though some web-servers ignore multiple slashes, Apache seems not to, so the correct method should be:

https://10.1.1.70/cucm-uds/version

And it will correctly output:

<versionInformation uri="https://10.1.1.70/cucm-uds/version" version="10.5.2">
 <version>10.5.2</version>
</versionInformation>

Available UDS resources

The official source of the UDS API is here: https://developer.cisco.com/site/user-data-services/develop-and-test/api-reference/index.gsp

With CUCM 10.5.2.10000-5, the WADL describes these groups of resources:

Base URL Description Documented
/ccmcip/* Cisco CCMIP services
/ccmpd/* Cisco Personal Directory
/options/* Shows complementary information, like ID mappings, installed software, etc... Yes
/private/* Unknown, but seems to contain all the same resources at the root
/user/* Per user specific resources
/xps/* Special services?
/* Various UDS services Yes

Using SoapUI for REST access

SoapUI is probably the best tool, albeit a little heavy to test your REST queries.

One of the most common problems you might get is handling the HTTPS certificates, specially when importing the WADL:

SOAPUI-WADL-Import-SSL-Error.png

And on the Logs you get something like this:

SOAPUI-WADL-Import-SSL-Error-Log.png

SoapUI uses its own JRE, so you need to add the certificates to it. There are two ways to solve this:

  1. Add the host certificate to a keystore and use this keystore - works better for self-signed certificates
  2. Add the CA Root certificate to the cacerts file - works better if you have CA signed certificates in CUCM.
Add a self-signed certificate to a keystore