Cisco Unity Connection Provisioning Interface (CUPI) API -- Private List Members

From DocWiki

Revision as of 22:36, 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


Viewing

Every private list has members. To see the members of a private list, do the following GET:

GET /vmrest/users/<userobjectid>/privatelists/<privatelistobjectid>/privatelistmembers

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

200
OK
<?xml version="1.0" encoding="UTF-8"?>
<PrivateListMembers total="4">
  <PrivateListMember>
    <URI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928/privatelists/
df523f3a-4e40-4d6d-9f80-72a5bc93331c/privatelistmembers/
4d390786-56a8-45e3-85a1-1c0933375b99</URI>
    <PersonalVoiceMailListObjectId>df523f3a-4e40-4d6d-9f80-72a5bc93331c</PersonalVoiceMailListObjectId>
    <PrivateListURI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928/
privatelists/df523f3a-4e40-4d6d-9f80-72a5bc93331c</PrivateListURI>
    <MemberSubscriberObjectId>444ded7b-e2b9-48c1-9aca-bcfda4372928</
MemberSubscriberObjectId>
    <MemberUserURI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928</
MemberUserURI>
    <ObjectId>4d390786-56a8-45e3-85a1-1c0933375b99</ObjectId>
    <Alias>UserA</Alias>
    <DisplayName>User A</DisplayName>
    <Extension>1017</Extension>
  </PrivateListMember>
  <PrivateListMember>
    <URI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928/privatelists/
df523f3a-4e40-4d6d-9f80-72a5bc93331c/privatelistmembers/
4e16bf12-6383-46d9-ae32-9ca9a857ca4f</URI>
    <PersonalVoiceMailListObjectId>df523f3a-4e40-4d6d-9f80-72a5bc93331c</PersonalVoiceMailListObjectId>
    <PrivateListURI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928/
privatelists/df523f3a-4e40-4d6d-9f80-72a5bc93331c</PrivateListURI>
    <MemberDistributionListObjectId>4523ba2f-015c-414e-ad96-92aba431ed39</MemberDistributionListObjectId>
    <MemberDistributionListURI>/vmrest/distributionlists/
4523ba2f-015c-414e-ad96-92aba431ed39</MemberDistributionListURI>
    <ObjectId>4e16bf12-6383-46d9-ae32-9ca9a857ca4f</ObjectId>
    <Alias>ListA</Alias>
    <DisplayName>List A</DisplayName>
  </PrivateListMember>
  <PrivateListMember>
    <URI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928/privatelists/
df523f3a-4e40-4d6d-9f80-72a5bc93331c/privatelistmembers/
c61a60f6-0aa5-4c85-94ba-94fd6c167bd4</URI>
    <PersonalVoiceMailListObjectId>df523f3a-4e40-4d6d-9f80-72a5bc93331c</PersonalVoiceMailListObjectId>
    <PrivateListURI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928/
privatelists/df523f3a-4e40-4d6d-9f80-72a5bc93331c</PrivateListURI>
    <MemberPersonalVoiceMailListObjectId>48eb2b0f-15a8-4bdf-a3a0-098debed181d</MemberPersonalVoiceMailListObjectId>
    <MemberPrivateListURI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928/
privatelists/48eb2b0f-15a8-4bdf-a3a0-098debed181d</MemberPrivateListURI>
    <ObjectId>c61a60f6-0aa5-4c85-94ba-94fd6c167bd4</ObjectId>
    <Alias>UserA_48eb2b0f-15a8-4bdf-a3a0-098debed181d</Alias>
    <DisplayName>2</DisplayName>
  </PrivateListMember>
  <PrivateListMember>
    <URI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928/privatelists/
df523f3a-4e40-4d6d-9f80-72a5bc93331c/privatelistmembers/
41295a7c-c9c0-45d3-8060-5a5038f0a49e</URI>
    <PersonalVoiceMailListObjectId>df523f3a-4e40-4d6d-9f80-72a5bc93331c</PersonalVoiceMailListObjectId>
    <PrivateListURI>/vmrest/users/444ded7b-e2b9-48c1-9aca-bcfda4372928/
privatelists/df523f3a-4e40-4d6d-9f80-72a5bc93331c</PrivateListURI>
    <ObjectId>41295a7c-c9c0-45d3-8060-5a5038f0a49e</ObjectId>
    <MemberContactObjectId>27e58431-981f-4fbd-b667-69b1aaac89fd</
MemberContactObjectId>
    <MemberContactURI>/vmrest/contacts/27e58431-981f-4fbd-b667-69b1aaac89fd</
MemberContactURI>
    <Alias>ConA</Alias>
    <DisplayName>Con A</DisplayName>
    <Extension>1290390</Extension>
  </PrivateListMember>
</PrivateListMembers>

Every member of a private list can be one of four objects: a user, a distribution list, another private list, or a remote contact (a contact that can receive a message). Depending on which object the member is, different fields are used to track the member information, which consists solely of an object id and a URI to that object.

The Alias, Display Name, and Extension of the member in question are also included. These fields are not actual values on the private list member data object; instead, the values are looked up by the API when it performs the GET.


Creating

The following POST adds a member to a private list. In this example, a user is being added to the private list by simply providing the object id of the user.

POST /vmrest/users/<userobjectid>/privatelists/<privatelistobjectid>/
privatelistmembers
<?xml version="1.0" encoding="UTF-8"?>
<PrivateListMember>
  <MemberSubscriberObjectId>9bc04f85-9ac4-42f8-9314-547408a6126c</
MemberSubscriberObjectId>
</PrivateListMember>

Use MemberDistributionListObjectId to add distribution lists to a private list. Use MemberPersonalVoiceMailListObjectId to add other private lists, and use MemberContactObjectId to add contacts.


Deleting

The following DELETE removes a member from a private list:

DELETE /vmrest/users/<userobjectid>/privatelists/<privatelistobjectid>/
privatelistmembers/<privatelistmemberobjectid>

Rating: 0.0/5 (0 votes cast)

Personal tools