Cisco Unity Connection Provisioning Interface (CUPI) API -- Configuration Values

From DocWiki

Revision as of 00:37, 14 December 2010 by Gscorbin (Talk | contribs)
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 Configuration Values

This page contains information on how to use the API to read configuration values which are also referred to as system settings. You cannot create or delete configuration values.

Most configuration values are read-only in the API. Beginning with Connection 8.5, there are two configuration values that can be updated:

  • System.API.CumiAccessSecureMessageAttachments
  • System.API.CumiAllowSecureMessageHeaders


Listing and Viewing

The following is an example of a GET that lists all system configuration values:

 
GET https://<server>/vmrest/configurationvalues


Beginning with Connection 8.5, you can perform a GET on individual settings using their full name in the URI (instead of getting the whole collection):

 
GET https://<server>/vmrest/configurationvalues/<full name>


You can access the configuration values as part of a list using the regular configuration value query. For example, to find all configuration values with a fullname that starts with "System.API.Cumi":

 
GET https://<server>/vmrest/configurationvalues?query=(fullname startswith System.API.Cumi)

Updating

Only two configuration values have write access. These are:

  • System.API.CumiAccessSecureMessageAttachments
  • System.API.CumiAllowSecureMessageHeaders


Attempting a PUT on any other configuration values will result in a 403 (access denied) error.


When modifying a configuration value, only the value field is used (see PUT examples below). All other fields cannot be modified and will be ignored.

HTTP Examples

GET Examples

Example of a GET of a list:

 
GET  /vmrest/configurationvalues?query=(fullname%20startswith%20System.API.Cumi)  HTTP/1.1
Accept: application/json
User-Agent: Java/1.6.0_20
Host: cuc-install-69.cisco.com
Connection: keep-alive

HTTP/1.1 200 OK
Pragma: No-cache
Cache-Control: no-cache
Expires: Wed, 31 Dec 1969 16:00:00 PST
Set-Cookie: JSESSIONIDSSO=658B27F18EF8424C11D261FEC776285D; Path=/
Set-Cookie: JSESSIONID=DE6BE806075303C8A73E666E0B478725; Path=/vmrest
Content-Type: application/json
Transfer-Encoding: chunked
Date: Thu, 20 May 2010 10:26:42 GMT
Server: 

{"@total":"2","ConfigurationValue":[{"Type":"11","LastModifiedTime":"2010-05-20T10:36:19Z","LastModifiedByComponent":"VMREST","FullName":"System.API.CumiAccessSecureMessageAttachments","Value":"0","UserSetting":"true","MinVal":"0","MaxVal":"0","RequiresRestart":"false"},{"Type":"11","LastModifiedTime":"2010-05-20T10:11:02Z","LastModifiedByComponent":"CUADMIN","FullName":"System.API.CumiAllowSecureMessageHeaders","Value":"1","UserSetting":"true","MinVal":"0","MaxVal":"0","RequiresRestart":"false"}]}

XML

<ConfigurationValues total="2">
	<ConfigurationValue>
		<Type>11</Type>
		<LastModifiedTime>2010-05-21T17:29:52Z</LastModifiedTime>
		<LastModifiedByComponent>VMREST</LastModifiedByComponent>
		<FullName>System.API.CumiAccessSecureMessageAttachments</FullName>
		<Value>1</Value>
		<UserSetting>true</UserSetting>
		<MinVal>0</MinVal>
		<MaxVal>0</MaxVal>
		<RequiresRestart>false</RequiresRestart>
	</ConfigurationValue>
	<ConfigurationValue>
		<Type>11</Type>
		<FullName>System.API.CumiAllowSecureMessageHeaders</FullName>
		<Value>1</Value>
		<UserSetting>true</UserSetting>
		<MinVal>0</MinVal>
		<MaxVal>0</MaxVal>
		<RequiresRestart>false</RequiresRestart>
	</ConfigurationValue>
</ConfigurationValues>


Example of a GET of an individual setting:

 
GET /vmrest/configurationvalues/System.Messaging.RelaySecureMessage  HTTP/1.1
Accept: application/json
User-Agent: Java/1.6.0_20
Host: cuc-install-69.cisco.com
Connection: keep-alive
Authorization: Basic Y2NtYWRtaW5pc3RyYXRvcjplY3NidWxhYg==

HTTP/1.1 200 OK
Pragma: No-cache
Cache-Control: no-cache
Expires: Wed, 31 Dec 1969 16:00:00 PST
Set-Cookie: JSESSIONIDSSO=B7839B7E290A9763ABD7751A6FBCAA5C; Path=/
Set-Cookie: JSESSIONID=E01E5B7E9F57692810ECF8AEAEDBD2B0; Path=/vmrest
Content-Type: application/json
Transfer-Encoding: chunked
Date: Thu, 20 May 2010 10:39:48 GMT
Server: 

{"Type":"11","LastModifiedTime":"2010-05-20T10:11:02Z","LastModifiedByComponent":"CUADMIN","FullName":"System.Messaging.RelaySecureMessage","Value":"0","UserSetting":"true","RequiresRestart":"false"}

XML

<ConfigurationValue>
	<Type>11</Type>
	<FullName>System.Messaging.RelaySecureMessage</FullName>
	<Value>0</Value>
	<UserSetting>true</UserSetting>
	<RequiresRestart>false</RequiresRestart>
</ConfigurationValue>


PUT Examples

An example of a PUT of a configuration value:

 
PUT /vmrest/configurationvalues/System.API.CumiAccessSecureMessageAttachments HTTP/1.1
Content-Type: application/json
User-Agent: Java/1.6.0_20
Host: cuc-install-69.cisco.com
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Authorization: Basic Y2NtYWRtaW5pc3RyYXRvcjplY3NidWxhYg==
Content-Length: 13

{"Value":"1"}

XML

<ConfigurationValue>
	<Value>0</Value>
</ConfigurationValue>

HTTP/1.1 204 No Content
Pragma: No-cache
Cache-Control: no-cache
Expires: Wed, 31 Dec 1969 16:00:00 PST
Set-Cookie: JSESSIONIDSSO=E3EB2F2AB5593902F00ECE80298ED82B; Path=/
Set-Cookie: JSESSIONID=4B3EA5586E13B955D2CC9A8C46EE12FE; Path=/vmrest
Date: Thu, 20 May 2010 10:58:05 GMT
Server:


An example of a PUT on a configuration value that does not support PUT:

 
PUT /vmrest/configurationvalues/System.Messaging.RelaySecureMessage  HTTP/1.1
Content-Type: application/json
User-Agent: Java/1.6.0_20
Host: cuc-install-69.cisco.com
Accept: text/html, image/gif, image/jpeg, \*; q=.2, \*/*; q=.2
Connection: keep-alive
Authorization: Basic Y2NtYWRtaW5pc3RyYXRvcjplY3NidWxhYg==
Content-Length: 240

HTTP/1.1 403 Forbidden
Pragma: No-cache
Cache-Control: no-cache
Expires: Wed, 31 Dec 1969 16:00:00 PST
Set-Cookie: JSESSIONIDSSO=6BE354F4A2C20A2190C9DFF78D91D7AB; Path=/
Set-Cookie: JSESSIONID=32DF55D02DA33C43938F43C2FC7A13FF; Path=/vmrest
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Thu, 20 May 2010 10:26:43 GMT
Server: 

Rating: 0.0/5 (0 votes cast)

Personal tools