Cisco Unity Express -- Quick Start for RESTful Web Services
Previous page: Cisco Unity Express -- RESTful Web Services
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:
- HTTP URL for a resource
- For example, the resource URI for configuring the login banner is:
- 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 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.
- 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.
- 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>