Cisco Unity Connection Provisioning Interface (CUPI) API -- HTML Notification Templates

From DocWiki

(Difference between revisions)
Jump to: navigation, search
(About HTML Notification Templates)
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 HTML Notification Templates

In Cisco Unity Connection 9.0(1) and later, the administrator can use the CUPI APIs for template listing, viewing, creation, selection, and deletion. The settings from the template get applied to the notifications as they are sent. The administrator can create any number of the HTML-based templates and can further assign those templates for use to specific HTML-based notification devices.

Listing of HTML Notification Templates

The following is an example of the GET request that lists all the notification templates

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

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

New Template

Test Template

OK
   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <NotificationTemplates total="2">
      <NotificationTemplate>
        <URI>/vmrest/notificationtemplates/f265c517-ec77-4b7c-9520-be007b8410c4</URI>
        <NotificationTemplateID>f265c517-ec77-4b7c-9520-be007b8410c4</NotificationTemplateID>
        <NotificationTemplateName>New Template</NotificationTemplateName>
      </NotificationTemplate>
      <NotificationTemplate>
       <URI>/vmrest/notificationtemplates/cd684c05-c8e6-4897-8d79-73da5a36290</URI>
       <NotificationTemplateID>cd684c05-c8e6-4897-8d79-73da5a36290</NotificationTemplateID>
       <NotificationTemplateName>Test Template</ NotificationTemplateName>
      </NotificationTemplate>
   </NotificationTemplates>

Viewing of HTML Notification Templates

The following is an example of the GET request that lists the specific notification template represented by the provided value of notification template id:

   GET https://<connection-server>/vmrest/notificationtemplates/<notificationtemplateid>

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

Test Template

OK
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <NotificationTemplate>
         <URI>/vmrest/notificationtemplates/cd684c05-c8e6-4897-8d79-73da5a36290</URI>
         <NotificationTemplateID>cd684c05-c8e6-4897-8d79-73da5a36290</NotificationTemplateID>
         <NotificationTemplateName>Test Template</NotificationTemplateName>
         <Content><![CDATA[<HTML><TITLE>Notification</TITLE><BODY><H3>There is a voice message for you. </H3>
         <BR>Please click on following link to access voice message.%MESSAGE_MINI_PLAY%<H4><I> 
         Disclaimer: This email may contain confidential and 
         privileged material for the sole use of the intended recipient.</I></H4></BODY></HTML>]]>
     </Content>
     </NotificationTemplate>

Creating the HTML Notification Templates

The following is an example of the POST request that creates a notification template


POST https://<connection-server>/vmrest/notificationtemplates:
   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <NotificationTemplate>
           <NotificationTemplateName>New Template</ NotificationTemplateName>
           <Content>![CDATA[<HTML><TITLE>Notification</TITLE><BODY><H3>There is a voice message for you.</H3><BR>Please click on following
            link to access voice message.%MESSAGE_MINI_PLAY%<H4> <br> Message Status : <img src="%MESSAGE_STATUS%" /> <br> <I>%Disclaimer% 
            By using custom variable : This email may contain confidential and privileged material 
           for the sole use of the intended recipient.</I></H4></BODY></HTML>]]</Content>       
       </NotificationTemplate>

The following is an example of the response from the above *Post* request.

     /vmrest/notificationtemplates/a1876b36-1095-488b-b810-20554ff51c42

Updating the HTML Notification Templates

The following is an example of the PUT request that allows you to update the content of the notification template by mentioning the notification template ID

PUT https://<connection-server>/vmrest/notificationtemplates/<notificationtemplateid>
    
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <NotificationTemplate>
    <NotificationTemplateName>Test Template</ NotificationTemplateName>
    <Content>![CDATA[<HTML><TITLE>Notification</TITLE><BODY><H3>There is a voice message for you. </H3>
       <BR>Please click on following link to access voice message.%MESSAGE_MINI_PLAY%<H4><I>
       Disclaimer: This email may contain confidential and 
       privileged material for the sole use of the intended recipient.</I></H4></BODY></HTML>]]
    </Content>
 </NotificationTemplate>

The output for this request returns the successful response code.

Deleting the HTML Notification Templates

The following is an example of the DELETE request that deletes a specific notification template where you need to mention the notification template ID:

   DELETE https://<connection-server>/vmrest/notificationtemplates/<notificationtemplateid

The output for this request returns the successful response code.

Listing Template Subscribership for the HTML Notification Templates

The following is an example that lists the subscribership for a particular notification template. Using this API the administrator will be able to view list of subscribers who are using a specific notification template.

   
GET /vmrest/notificationtemplates/<notificationtemplateid>/subscribers
    
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <Users total=”2”>
    <User><URI>/vmrest/users/24cb82fc-5153-4c3f-abc7-ef442b27b4e9</URI></User>
    <User><URI>/vmrest/users/8117171c-a633-4ecf-b847-d6d15db41818</URI></User>
  </Users>

Rating: 0.0/5 (0 votes cast)

Personal tools