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

From DocWiki

Jump to: navigation, search

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation

Contents


About Custom Variables

Administrator can use the CUPI APIs for listing, viewing, creation, updating, and deletion of the custom variables.Administrator can store values in the form of text and numbers in custom variables. For example, the administrator can use custom variables for headers and footers. It replaces the value of the selected custom variable by the content as specified by administrator under the Templates > Notification Templates > Custom Variables page. To insert a variable directly in the notification template, as specified by administrator under the Templates > Notification Templates > Custom Variables page, you can use the %Var1%.

Listing of the Custom Variables

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

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

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

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <CustomVariables total="2">
     <CustomVariable>
        <URI>/vmrest/customvariables/1815352d-dea6-40fe-adf8-ac6bddc3629b</URI>
        <ObjectId>1815352d-dea6-40fe-adf8-ac6bddc3629b </ ObjectId >
        <Name>Company_Name</Name>
        <Value>XYZ Private Ltd.</Value>
      </CustomVariable>
     <CustomVariable>
        <URI>/vmrest/customvariables/22174e0e- 6be7-430b-91c4-6c274092a2cf</URI>
        <ObjectId>22174e0e- 6be7-430b-91c4-6c274092a2cf</ ObjectId >
        <Name>Disclaimer</Name>
        <Value> The XYZ Privacy Statement and this summary apply to websites. 
        Our privacy policies reflect current global principles and standards
        on handling personal information – notice and choice of data use, data 
        access and integrity, security, onward transfer and enforcement/oversight.</ Value>
      </CustomVariable>
  </CustomVariables>

Viewing of the Custom Variables

The following is an example of the GET request that lists the details of specific custom variable represented by the provided value of variable id:

  
   GET https://<connection-server>/vmrest/customvariables/<variableid>

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

Test Template

OK

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <CustomVariable>
   <URI>/vmrest/customvariables/22174e0e- 6be7-430b-91c4-6c274092a2cf</URI>
   <ObjectId>22174e0e- 6be7-430b-91c4-6c274092a2cf</ ObjectId >
   <Name> Disclaimer </Name>
   < Value> The XYZ Privacy Statement and this summary apply to websites. 
   Our privacy policies reflect current global principles and standards on 
   handling personal information – notice and choice of data use, data access
   and integrity, security, onward transfer and enforcement/oversight.</ Value>
  </CustomVariable>

Creating the Custom Variables

The following is an example of the POST request that creates a custom variable:

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

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <CustomVariable>
   <Name> Address</Name>
   < Value>#2091 ABC street, DEF.</ Value>
  </CustomVariable>

Updating the Custom Variables

The following is an example of the PUT request that allows you to update the content of the custom variable by mentioning the variable ID:

   
PUT https://<connection-server>/vmrest/customvariables/<variableid>


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <CustomVariable>
   <Name>Address</Name>
   < Value>#2591, ACS Street.</ Value>
  </CustomVariable>


Deleting the Custom Variables

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/customvariables/<variableid>

The output for this request returns the successful response code.

Rating: 2.0/5 (1 vote cast)

Personal tools