Cisco Unity Connection Provisioning Interface (CUPI) API -- HTML Notification Template Custom Graphics

From DocWiki

(Difference between revisions)
Jump to: navigation, search
(Created page with "'''Links to Other API pages:''' Cisco_Unity_Connection_APIs {| align="right" border="1" |align="center"|'''CUPI Guide Contents''' |- |[[Cisco Unity Connection Provisioning In...")
m (1 revision)
 

Latest revision as of 10:14, 14 June 2012

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation

Contents


About Custom Graphics

Administrator can use the CUPI APIs to list, view, create, update, and delete the custom graphics. The custom graphics are used for adding logos and images within an HTML template . The images can also be used to define image based template structure. You can try , for example, you can use the default custom graphic as 'Default_Dynamic_Icons'.To insert a graphic directly in the notification template as specified by administrator under the Templates > Notification Templates > Custom Graphics page, you can use the <img src="%GRAPHIC1%"></img> tag.

Listing of the Custom Graphics

The following is an example of the GET request that lists all the custom graphics:

   GET https://<connection-server>/vmrest/customgraphics

The following is an example of the response from the above *GET* request and the actual respone will depend upon the information has been provided by you.

  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <CustomGraphics total="2">
     <CustomGraphic>
        <URI>/vmrest/customgraphics/4a9872d8-df00-4e17-b382-1a01c58a99b6</URI>
        <DisplayName>Logo</DisplayName>  
        <ImageName>logo.jpg</ImageName>
        <ImageSize>2048*1536</ImageSize>
        <ObjectId>4a9872d8-df00-4e17-b382-1a01c58a99b6</ObjectId>
        <ImagePreviewURI>/vmrest/customgraphics/logo/image</ImagePreviewURI>
     </CustomGraphic>
     <CustomGraphic>
       <URI>/vmrest/customgraphics/c7ee3657-f796-464c-8e64-3706318439d1</URI>
       <DisplayName>Logo2</DisplayName>
       <ImageName>logo2.jpg</ImageName>
       <ImageSize>2048*1536</ImageSize>
       <ObjectId>c7ee3657-f796-464c-8e64-3706318439d1</ObjectId>
       <ImagePreviewURI>/vmrest/customgraphics/Logo2/image</ImagePreviewURI>
      </CustomGraphic>
  </CustomGraphics>

Viewing of the Custom Graphics

The following is an example of the GET request that displays a specific custom graphic represented by the provided value of object id:

    GET https://<connection-server>/vmrest/customgraphics/<objectid>

The following is an example of the response from the above *GET* request and the actual response will depend upon the information provided by you.

  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <CustomGraphic>
     <URI>/vmrest/customgraphics/4a9872d8-df00-4e17-b382-1a01c58a99b6</URI>
     <DisplayName>Logo</DisplayName>
     <ImageName>logo.jpg</ImageName>
     <ImageSize>2048*1536</ImageSize>
     <ObjectId>4a9872d8-df00-4e17-b382-1a01c58a99b6</ObjectId> 
     <ImagePreviewURI>/vmrest/customgraphics/Logo/image</ImagePreviewURI>
  </CustomGraphic>

Creating the Custom Graphics

The following is an example of the POST request that creates a custom graphic, where multipart POST request is required for XML and image:

    
POST https://<connection-server>/vmrest/customgraphics

First part: XML attachment

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <CustomGraphic>
     <DisplayName>Logo</DisplayName>
  </CustomGraphic>

Second part: Image File as an attachment

RESPONSE Code: 201

RESPONSE Text: /vmrest/customgraphics/a1876b36-1095-488b-b810-20554ff51c42

Note: The file must not be more than 1 MB in size.

Updating the Custom Graphics

The following is an example of the PUT request that allows you to update the custom graphic by mentioning its object ID.

An image file attachment is required as a multipart PUT request.

   PUT https://<connection-server>/vmrest/customgraphics/<objectid>
   RESPONSE Code: 204
   RESPONSE Text: [[File:Icon_privacy.png]]


Note: The file must not be more than 1 MB in size.

Deleting the Custom Graphics

The following is an example of the DELETE request that deletes a specific graphic for the selected object ID:

   DELETE https://<connection-server>/vmrest/customgraphics/<objectid>

The output for this request returns the successful response code.

Rating: 0.0/5 (0 votes cast)

Personal tools