Cisco Unity Express -- Quick Start for RESTful Web Services

From DocWiki

Revision as of 05:23, 30 April 2010 by Mnapalan (Talk | contribs)
Jump to: navigation, search

Main page: Cisco Unity Express -- Programmatic Interface Service Programming Guide

Previous page: Cisco Unity Express -- RESTful Web Services

Next page: Cisco Unity Express -- Client Software Choices



Before getting into the service details, this section provides a list of the steps required for executing a request using the CUE PI service.


A client needs the following information to make a request to the CUE PI service:

  1. HTTP URL for a resource
    For example, the resource URI for configuring the login banner is:
    /system/banner
    If the CUE host IP address is 172.27.104.144, then, by appending the CUE PI application name "rest" and the published resource URI, we can obtain the complete HTTP URL for the resource as:
    http://172.27.104.144/rest/system/banner
  2. HTTP method to execute on the resource (GET for reading, POST for creating, PUT for updating, and DELETE for removing the resource)
    Thus, for reading the current value for the login banner, we would need to perform HTTP GET on the URL constructed above.
  3. Representation type of the resource (XML, HTML, JSON, and so on)
    The CUE PI service uses XML representation for most of its resources; thus, in the HTTP GET request for reading the login banner, we need to set the header Accept to MIME type application/xml.
  4. Authentication information
    The CUE PI service uses HTTP basic authentication. See the Authentication section under Cisco Unity Express -- REST PI Service Conventions for more details.
    For example, we will use the username "cisco" with password "cisco".
    Using the command line utility "curl", one can execute this request as follows:
$ curl -u cisco:cisco -X GET -H 'Accept: application/xml' 
http://172.27.104.144/rest/system/banner 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<loginBanner>
    <resourceURI>/system/banner</resourceURI>
    <bannerMessage>Hello. Welcome to Cisco Unity Express !!!
</bannerMessage>
</loginBanner>

Rating: 5.0/5 (1 vote cast)

Personal tools