Cisco Unity Connection Provisioning Interface (CUPI) API -- Class of Service (COS)

From DocWiki

Revision as of 22:32, 13 December 2010 by Juliew (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 Classes of Service (COSes)

This page contains information on how to use the API to create, list, update, and delete classes of service.


Listing and Viewing

The following is an example of a GET request that lists all Classes of Service:

GET http://<connection-server>/vmrest/coses

The following is the response from the above GET request:

200
OK
<?xml version="1.0" encoding="UTF-8"?>
<Coses total="2">
  <Cos>
    <URI>/vmrest/coses/e0da866c-07d4-41ae-8ca9-e334e4732ea7</URI>
    <ObjectId>e0da866c-07d4-41ae-8ca9-e334e4732ea7</ObjectId>
    <DisplayName>Voice Mail User COS</DisplayName>
  </Cos>
  <Cos>
    <URI>/vmrest/coses/38a57ca9-406d-4dec-9fc0-d7fc54ef5dff</URI>
    <ObjectId>38a57ca9-406d-4dec-9fc0-d7fc54ef5dff</ObjectId>
    <DisplayName>System</DisplayName>
  </Cos>
</Coses>

To retrieve a sorted list of all Classes of Service, add the following query parameter: sort=(column [asc|desc])

For example, to retrieve a list of all Classes of Service sorted by their display names in ascending order:

GET http://<connection-server>/vmrest/coses?sort=(displayname%20asc)

To retrieve a specific Class of Service by its object ID:

GET http://<connection-server>/vmrest/coses/<objectid>

The following is the response from the above GET request (requesting a single Class of Service by object ID) done on the factory default Voice Mail User Cos:

200
OK
<?xml version="1.0" encoding="UTF-8"?>
<Cos>
  <URI>/vmrest/coses/a9a3a677-31f1-4edb-acd0-6a2135e15995</URI>
  <ObjectId>a9a3a677-31f1-4edb-acd0-6a2135e15995</ObjectId>
  <AccessFaxMail>false</AccessFaxMail>
  <AccessTts>false</AccessTts>
  <CallHoldAvailable>false</CallHoldAvailable>
  <CallScreenAvailable>false</CallScreenAvailable>
  <CanRecordName>true</CanRecordName>
  <FaxRestrictionObjectId>d762807b-fbab-4b46-b21b-bf9e37648d0a</FaxRestrictionObjectId>
  <ListInDirectoryStatus>true</ListInDirectoryStatus>
  <LocationObjectId>7fe7907a-2222-482e-83cb-d8d4ad32adc1</LocationObjectId>
  <LocationURI>/vmrest/locations/connectionlocations/7fe7907a-2222-482e-83cb-d8d4ad32adc1</LocationURI>
  <MaxGreetingLength>90</MaxGreetingLength>
  <MaxMsgLength>300</MaxMsgLength>
  <MaxNameLength>30</MaxNameLength>
  <MaxPrivateDlists>25</MaxPrivateDlists>
  <MovetoDeleteFolder>true</MovetoDeleteFolder>
  <OutcallRestrictionObjectId>1c7c3ebf-391e-44f6-8ee2-3717049c614d</OutcallRestrictionObjectId>
  <PersonalAdministrator>true</PersonalAdministrator>
  <DisplayName>Voice Mail User COS</DisplayName>
  <XferRestrictionObjectId>54caa5d6-0ec6-49c9-a80f-52ae743c256f</XferRestrictionObjectId>
  <Undeletable>true</Undeletable>
  <WarnIntervalMsgEnd>0</WarnIntervalMsgEnd>
  <CanSendToPublicDl>true</CanSendToPublicDl>
  <EnableEnhancedSecurity>false</EnableEnhancedSecurity>
  <AccessVmi>false</AccessVmi>
  <AccessLiveReply>false</AccessLiveReply>
  <UaAlternateExtensionAccess>0</UaAlternateExtensionAccess>
  <AccessCallRoutingRules>false</AccessCallRoutingRules>
  <WarnMinMsgLength>0</WarnMinMsgLength>
  <SendBroadcastMessage>false</SendBroadcastMessage>
  <UpdateBroadcastMessage>false</UpdateBroadcastMessage>
  <AccessVui>false</AccessVui>
  <ImapCanFetchMessageBody>true</ImapCanFetchMessageBody>
  <ImapCanFetchPrivateMessageBody>false</ImapCanFetchPrivateMessageBody>
  <MaxMembersPVL>99</MaxMembersPVL>
  <AccessIMAP>false</AccessIMAP>
  <ReadOnly>false</ReadOnly>
  <AccessAdvancedUserFeatures>false</AccessAdvancedUserFeatures>
  <AccessUnifiedClient>false</AccessUnifiedClient>
  <RequireSecureMessages>4</RequireSecureMessages>
  <AccessOutsideLiveReply>false</AccessOutsideLiveReply>
  <AccessSTT>false</AccessSTT>
  <EnableSTTSecureMessage>0</EnableSTTSecureMessage>
</Cos>

RequireSecureMessages is a custom type that controls how secure messages are generated by users. It can be set to mark all messages as secure (1), never mark messages as secure (2), ask the user if they want to mark a message as secure (3), or only mark private messages as secure (4).

One can also use CUPI For End Users to retrieve one's own Class of Service with the following request:

GET /vmrest/user/cos

Searching

To retrieve a list of Classes of Service that meet a specified search criteria, add the following query parameter: query=(column [is|startswith] value)

For example, to find all Classes of Service with a display name that starts with "System":

GET http://<connection-server>/vmrest/coses?query=(displayname%20startswith%20System)

Creating

The only required field for creating a COS is DisplayName. All other fields are optional.

The following is an example of a POST request that creates a COS with the display name "My New COS":

POST http://<connection-server>/vmrest/coses

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Cos>
    <DisplayName>My New COS</DisplayName>
</Cos>

The following is the response from the above POST request:

201
Created
/vmrest/coses/8ae8b4a2-a25b-4f16-95d9-77abcb91b764

Updating

The following is an example of a PUT request that modifies the display name of an existing COS:

PUT http://<connection-server>/vmrest/coses/<objectid>

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Cos>
    <DisplayName>My New CoS</DisplayName>
</Cos>

The following is the response from the above PUT request:

204
No Content
null


Deleting

The following is an example of a DELETE request that deletes a Class of Service:

DELETE http://vmrest/coses/<objectid>

The following is the response from the above DELETE request:

204
No Content
null


Possible Errors

There are no non-obvious error messages that might come from working with classes of service.

Rating: 0.0/5 (0 votes cast)

Personal tools