Cisco Unity Connection Provisioning Interface (CUPI) API -- Public Lists

From DocWiki

(Difference between revisions)
Jump to: navigation, search
(New page: Viewing Every user with a mailbox can have private lists. To see the private lists belonging to a user, do the following GET request: GET /vmrest/users/<user object id>/privatelists/ He...)
 
(One intermediate revision not shown)
Line 1: Line 1:
-
Viewing
+
'''Links to Other API pages:''' [[Cisco_Unity_Connection_APIs]]
-
Every user with a mailbox can have private lists. To see the private lists belonging to a user, do the following GET request:  
+
{| align="right" border="1"
 +
|align="center"|'''CUPI Guide Contents'''
 +
|-
 +
|[[Cisco Unity Connection Provisioning Interface (CUPI) API|API Overview ]]<br>[[Cisco Unity Connection Provisioning Interface (CUPI) API -- Index of All CUPI Documentation|Index of All CUPI Documentation]]
 +
|}
-
GET /vmrest/users/<user object id>/privatelists/
+
__TOC__
-
Here is an example of the response you might receive to such a request:
+
-
<?xml version="1.0" encoding="UTF-8"?>
 
-
<PrivateLists total="1">
 
-
  <PrivateList>
 
-
    <URI>/vmrest/users/f90d26fc-0e4a-405a-8c42-189a93129bdc/
 
-
privatelists/1f443e29-1d6b-4ef8-89a6-2767549e3577</URI>
 
-
    <ObjectId>1f443e29-1d6b-4ef8-89a6-2767549e3577</ObjectId>
 
-
    <DisplayName>1</DisplayName>
 
-
    <UserObjectId>f90d26fc-0e4a-405a-8c42-189a93129bdc</UserObjectId>
 
-
    <UserURI>/vmrest/users/f90d26fc-0e4a-405a-8c42-189a93129bdc</UserURI>
 
-
    <DtmfName>1</DtmfName>
 
-
    <Alias>UserA_1f443e29-1d6b-4ef8-89a6-2767549e3577</Alias>
 
-
    <VoiceName>6ce746b7-d775-4bc4-9d19-8b6a55b9461d.wav</VoiceName>
 
-
    <VoiceFileURI>/vmrest/voicefiles/
 
-
    6ce746b7-d775-4bc4-9d19-8b6a55b9461d.wav</VoiceFileURI>
 
-
    <NumericId>1</NumericId>
 
-
    <IsAddressable>true</IsAddressable>
 
-
  </PrivateList>
 
-
</PrivateLists>
 
-
Many of these fields are consistent with what you see on other objects. Specific fields that are unique to private lists and require explanation are described below.
 
-
Private lists belong to specific users. The UserObjectId and UserURI field show that relationship.
+
== Viewing ==
-
DtmfName is a field with a value that is automatically generated every time the display name changes on the private list. DtmfName holds the digits that would need to be dialed to address a message by name to this group by phone.
+
To see the public lists on the server, do the following GET request:
-
Alias is a unique text name for the private list. The alias is automatically generated, and to ensure it is unique, it is constructed by concatenating the user alias, an underscore and the private list's object id. The user's alias is truncated to 28 characters to avoid overflow.
+
<pre>
 +
GET /vmrest/users/distributionlists
 +
</pre>
-
NumericId is the number of the private list. Private lists are numbered 1 through 99, and when addressing a message by extension over the phone, the number can be used to choose the group.
+
Here is an example of the response you might receive to such a request:
-
IsAddressable is an odd flag. It flags whether or not the private list is addressable. By default, all private lists are addressable.  
+
<pre>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><DistributionLists total="2">
 +
<DistributionList>
 +
    <URI>/vmrest/distributionlists/f2463ed4-70ad-4bc7-b983-1e95d898fbae</URI>
 +
    <ObjectId>f2463ed4-70ad-4bc7-b983-1e95d898fbae</ObjectId>
 +
    <Alias>undeliverablemessages</Alias>
 +
    <DisplayName>Undeliverable Messages</DisplayName>
 +
    <LocationObjectId>40a4ab6b-e307-4710-a01f-aa5784fc1274</LocationObjectId>
 +
    <LocationURI>/vmrest/locations/connectionlocations/40a4ab6b-e307-4710-a01f-aa5784fc1274</LocationURI>
 +
    <PartitionObjectId>71645d9f-bc0f-4b05-9586-477729a21827</PartitionObjectId>
 +
    <PartitionURI>/vmrest/partitions/71645d9f-bc0f-4b05-9586-477729a21827</PartitionURI>
 +
    <DistributionListMembersURI>/vmrest/distributionlists/f2463ed4-70ad-4bc7-b983-1e95d898fbae/distributionlistmembers</DistributionListMembersURI>
 +
    <AlternateNamesURI>/vmrest/alternatenames?query=(DistributionListObjectId%20is%20f2463ed4-70ad-4bc7-b983-1e95d898fbae)</AlternateNamesURI>
 +
</DistributionList>
 +
<DistributionList>
 +
    <URI>/vmrest/distributionlists/f2a17654-eb37-4445-89f3-f094a0bd52a2</URI>
 +
    <ObjectId>f2a17654-eb37-4445-89f3-f094a0bd52a2</ObjectId>
 +
    <Alias>allvoicemailusers</Alias>
 +
    <DisplayName>All Voice Mail Users</DisplayName>
 +
    <LocationObjectId>40a4ab6b-e307-4710-a01f-aa5784fc1274</LocationObjectId>
 +
    <LocationURI>/vmrest/locations/connectionlocations/40a4ab6b-e307-4710-a01f-aa5784fc1274</LocationURI>
 +
    <DtmfAccessId>99991</DtmfAccessId>
 +
    <PartitionObjectId>71645d9f-bc0f-4b05-9586-477729a21827</PartitionObjectId>
 +
    <PartitionURI>/vmrest/partitions/71645d9f-bc0f-4b05-9586-477729a21827</PartitionURI>
 +
    <DistributionListMembersURI>/vmrest/distributionlists/f2a17654-eb37-4445-89f3-f094a0bd52a2/distributionlistmembers</DistributionListMembersURI>
 +
    <AlternateNamesURI>/vmrest/alternatenames?query=(DistributionListObjectId%20is%20f2a17654-eb37-4445-89f3-f094a0bd52a2)</AlternateNamesURI>
 +
</DistributionList>
 +
</pre>
 +
Many of these fields are consistent with what you see on other objects.
 +
== Creating ==
 +
The following POST creates a public distribution list. In this example, it would be called "Test DL" and have an extension of 8001.  The extension here is optional.
 +
<pre>
 +
POST /vmrest/distributionlists
-
[edit] Creating
+
<?xml version="1.0" encoding="UTF-8"?>
-
The following POST creates a private list. In this example, it would be private list 2.  
+
<DistributionList>
 +
    <Alias>TestDL</Alias>
 +
    <DisplayName>Test DL</DisplayName>
 +
    <DtmfAccessId>8001</DtmfAccessId>
 +
</DistributionList>
 +
</pre>
-
POST /vmrest/users/<user object id>/privatelists
 
-
<?xml version="1.0" encoding="UTF-8"?>
+
== Adding Members ==
-
<PrivateList>
+
-
    <DisplayName>2</DisplayName>
+
-
    <VoiceName>6ce746b7-d775-4bc4-9d19-8b6a55b9461d.wav</VoiceName>
+
-
    <NumericId>2</NumericId>
+
-
</PrivateList>
+
-
These are the only three parameters that can be explicitly set on a new private list. The other parameters are not allowed on a POST, either defaulting to a certain value or being auto-generated as discussed above. The ObjectId can be explicitly set if desired, but that is optional.
+
 +
The following example shows how to add a user as a member of a public distribution list.  The user can be either a local user with a mailbox or a global user (i.e. a user from another cluster in the same network).
 +
<pre>
 +
POST /vmrest/distributionlists/{distribution list object id}/distributionlistmembers
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<DistributionListMember>
 +
    <MemberUserObjectId>{user object ID}</MemberUserObjectId>
 +
</DistributionListMember>
 +
</pre>
-
[edit] Updating
+
The following example shows how to add another public distribution list as a member of a public distribution list. 
-
Only the following fields can be updated in a PUT request:
+
 
 +
<pre>
 +
POST /vmrest/distributionlists/{distribution list object id}/distributionlistmembers
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<DistributionListMember>
 +
    <MemberDistributionListObjectId>{distribution list object ID}</MemberDistributionListObjectId>
 +
</DistributionListMember>
 +
</pre>
-
DisplayName
 
-
VoiceName
 
-
NumericId
 
-
The following example shows a PUT request that modifies some fields, changing a private list to private list 6.
 
-
PUT /vmrest/users/<user object id>/privatelists/<private list object id>
 
-
<?xml version="1.0" encoding="UTF-8"?>
+
[[Category:Cisco Unity Connection Provisioning Interface (CUPI) API]]
-
<PrivateList>
+
-
    <DisplayName>6</DisplayName>
+
-
    <NumericId>6</NumericId>
+
-
</PrivateList>
+

Latest revision as of 00:40, 4 March 2011

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation

Contents


Viewing

To see the public lists on the server, do the following GET request:

GET /vmrest/users/distributionlists

Here is an example of the response you might receive to such a request:

<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><DistributionLists total="2">
<DistributionList>
    <URI>/vmrest/distributionlists/f2463ed4-70ad-4bc7-b983-1e95d898fbae</URI>
    <ObjectId>f2463ed4-70ad-4bc7-b983-1e95d898fbae</ObjectId>
    <Alias>undeliverablemessages</Alias>
    <DisplayName>Undeliverable Messages</DisplayName>
    <LocationObjectId>40a4ab6b-e307-4710-a01f-aa5784fc1274</LocationObjectId>
    <LocationURI>/vmrest/locations/connectionlocations/40a4ab6b-e307-4710-a01f-aa5784fc1274</LocationURI>
    <PartitionObjectId>71645d9f-bc0f-4b05-9586-477729a21827</PartitionObjectId>
    <PartitionURI>/vmrest/partitions/71645d9f-bc0f-4b05-9586-477729a21827</PartitionURI>
    <DistributionListMembersURI>/vmrest/distributionlists/f2463ed4-70ad-4bc7-b983-1e95d898fbae/distributionlistmembers</DistributionListMembersURI>
    <AlternateNamesURI>/vmrest/alternatenames?query=(DistributionListObjectId%20is%20f2463ed4-70ad-4bc7-b983-1e95d898fbae)</AlternateNamesURI>
</DistributionList>
<DistributionList>
    <URI>/vmrest/distributionlists/f2a17654-eb37-4445-89f3-f094a0bd52a2</URI>
    <ObjectId>f2a17654-eb37-4445-89f3-f094a0bd52a2</ObjectId>
    <Alias>allvoicemailusers</Alias>
    <DisplayName>All Voice Mail Users</DisplayName>
    <LocationObjectId>40a4ab6b-e307-4710-a01f-aa5784fc1274</LocationObjectId>
    <LocationURI>/vmrest/locations/connectionlocations/40a4ab6b-e307-4710-a01f-aa5784fc1274</LocationURI>
    <DtmfAccessId>99991</DtmfAccessId>
    <PartitionObjectId>71645d9f-bc0f-4b05-9586-477729a21827</PartitionObjectId>
    <PartitionURI>/vmrest/partitions/71645d9f-bc0f-4b05-9586-477729a21827</PartitionURI>
    <DistributionListMembersURI>/vmrest/distributionlists/f2a17654-eb37-4445-89f3-f094a0bd52a2/distributionlistmembers</DistributionListMembersURI>
    <AlternateNamesURI>/vmrest/alternatenames?query=(DistributionListObjectId%20is%20f2a17654-eb37-4445-89f3-f094a0bd52a2)</AlternateNamesURI>
</DistributionList>

Many of these fields are consistent with what you see on other objects.

Creating

The following POST creates a public distribution list. In this example, it would be called "Test DL" and have an extension of 8001. The extension here is optional.

POST /vmrest/distributionlists

<?xml version="1.0" encoding="UTF-8"?>
<DistributionList>
    <Alias>TestDL</Alias>
    <DisplayName>Test DL</DisplayName>
    <DtmfAccessId>8001</DtmfAccessId>
</DistributionList>


Adding Members

The following example shows how to add a user as a member of a public distribution list. The user can be either a local user with a mailbox or a global user (i.e. a user from another cluster in the same network).

POST /vmrest/distributionlists/{distribution list object id}/distributionlistmembers 
<?xml version="1.0" encoding="UTF-8"?>
<DistributionListMember>
    <MemberUserObjectId>{user object ID}</MemberUserObjectId>
</DistributionListMember>


The following example shows how to add another public distribution list as a member of a public distribution list.

POST /vmrest/distributionlists/{distribution list object id}/distributionlistmembers 
<?xml version="1.0" encoding="UTF-8"?>
<DistributionListMember>
    <MemberDistributionListObjectId>{distribution list object ID}</MemberDistributionListObjectId>
</DistributionListMember>

Rating: 0.0/5 (0 votes cast)

Personal tools