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

From DocWiki

Revision as of 09:31, 1 November 2013 by Deeptija (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


Distribution List Members APIs

Administrator can use this API to create/update/delete/fetch the distribution list members. You can update various attributes of distribution list members using this API.


Listing the Distribution List Members

Request URI:
GET https://<connection-
server>/vmrest/distributionlists/<distributionlistObjectId>/distributionlistmember

The following is an example of the GET request that fetch the list of distribution list members:

  GET https://<connection server>/vmrest/distributionlists/ef4aa84e-97c3-456e-848e-
  b162a04c9631/distributionlistmembers

The following is the response from the above *GET* request and the actual response will depend upon the information given by you:

<DistributionListMembers total="1">
  <DistributionListMember>
    <URI>/vmrest/distributionlists/ef4aa84e-97c3-456e-848e-
  b162a04c9631/distributionlistmembers/f6712058-3409-49eb-a616-517614766594</URI>
    <DistributionListObjectId>ef4aa84e-97c3-456e-848e-
  b162a04c9631</DistributionListObjectId>
    <DistributionListURI>/vmrest/distributionlists/ef4aa84e-97c3-456e-848e-
  b162a04c9631</DistributionListURI>
    <MemberUserObjectId>34cc862e-19e4-4689-a4ee-
  ee98d83b8319</MemberUserObjectId>
    <MemberUserURI>/vmrest/users/34cc862e-19e4-4689-a4ee-
  ee98d83b8319</MemberUserURI>
    <ObjectId>f6712058-3409-49eb-a616-517614766594</ObjectId>
    <Alias>Texoma_UserTemplate_1</Alias>
    <DisplayName>Texoma_UserTemplate_1</DisplayName>
    <AllowForeignMessage>false</AllowForeignMessage>
    <MemberGlobalUserObjectId>34cc862e-19e4-4689-a4ee-
  ee98d83b8319</MemberGlobalUserObjectId>
    <MemberGlobalUserURI>/vmrest/globalusers/34cc862e-19e4-4689-a4ee-
  ee98d83b8319</MemberGlobalUserURI>
    <MemberLocationObjectId>0eba1e8b-7e39-47a3-865f-ee6a34113f67</MemberLocationObjectId>
    <MemberLocationURI>/vmrest/locations/connectionlocations/0eba1e8b-7e39-47a3-865f-ee6a34113f67</MemberLocationURI>
    <MemberGlobalUserDignetObjectId>34cc862e-19e4-4689-a4ee-
  ee98d83b8319</MemberGlobalUserDignetObjectId>
    <IsUserTemplate>true</IsUserTemplate>
    <LocationObjectId>0eba1e8b-7e39-47a3-865f-ee6a34113f67</LocationObjectId>
    <LocationURI>/vmrest/locations/connectionlocations/0eba1e8b-7e39-47a3-865f-
  ee6a34113f67</LocationURI>
  </DistributionListMember>
</DistributionListMembers>
Response Code: 200

JSON Example

To get distribution list members:

GET https://<connection-server>/vmrest/distributionlists/<distributionlistObjectId>/distributionlistmembers
Accept: application /json
Connection: keep-alive

The following is the response from the above *GET* request and the actual response will depend upon the information given by you:

{
  "@total":"1"
  "DistributionListMember":
  {
    "URI":"/vmrest/distributionlists/dd043e9a-3f34-47eb-a72a-
    1b4b41e5f9d7/distributionlistmembers/dadd5c1c-1666-486a-94fa-bc681d99bfdb"
    "DistributionListObjectId":"dd043e9a-3f34-47eb-a72a-
    1b4b41e5f9d7"
    "DistributionListURI":"/vmrest/distributionlists/dd043e9a-3f34-47eb-a72a-
    1b4b41e5f9d7"
    "MemberUserObjectId":"216c1a3e-7c0e-4527-aa9c-32b2683f04be"
    "MemberUserURI":"/vmrest/users/216c1a3e-7c0e-4527-aa9c-
    32b2683f04be"
    "ObjectId":"dadd5c1c-1666-486a-94fa-bc681d99bfdb"
    "Alias":"kapil1_Operator_1"
    "DisplayName":"kapil1_Operator_1"
    "AllowForeignMessage":"false"
    "MemberGlobalUserObjectId":"216c1a3e-7c0e-4527-aa9c-32b2683f04be"
    "MemberGlobalUserURI":"/vmrest/globalusers/216c1a3e-7c0e-4527-aa9c-32b2683f04be"
    "MemberLocationObjectId":"830e1a2d-8e90-459f-88f7-700497ba975c"
    "MemberLocationURI":"/vmrest/locations/connectionlocations/830e1a2d-8e90-459f-
    88f7-700497ba975c"
    "MemberGlobalUserDignetObjectId":"216c1a3e-7c0e-4527-aa9c-32b2683f04be"
    "IsUserTemplate":"false"
    "LocationObjectId":"830e1a2d-8e90-459f-88f7-700497ba975c"
    "LocationURI":"/vmrest/locations/connectionlocations/830e1a2d-8e90-459f-88f7-
    700497ba975c"
  }
}
Response Code: 200

Creating a Distribution List Member

You can create a new distribution list member by adding a user or user template or can add another distribution list as a member.

Example 1: Adding a user or user template to a distribution list To get user or user template object ID, you can use the following URIs:

GET https://<connection-server>/vmrest/users
GET https://<connection-server>/vmrest/usertemplates

The following is an example of the POST request that creates a new distribution list member by adding a user or user template:

  POST https://<connection-server>/vmrest/distributionlists/ef4aa84e-97c3-456e-848e-
  b162a04c9631/distributionlistmembers
Request Body:
<DistributionListMember>
    <MemberUserObjectId>6202095f-606b-40d8-889d-f32e2d822f54</MemberUserObjectId>
</DistributionListMember>
Response Code: 201

Example 2: Adding another distribution list as a member The following is an example of the POST request that creates a new distribution list member by adding another distribution list as a member:

POST https://<connection-server>/vmrest/ distributionlists/ef4aa84e-97c3-456e-848e-b162a04c9631/distributionlistmembers
Request Body:
<DistributionListMember>
    <MemberDistributionListObjectId>e030d111-d29e-4d11-93fa-4abe73bd50a0</MemberDistributionListObjectId>
</DistributionListMember>
Response Code: 201

JSON Example:

To add a user or user template, do the following:

Request URI:
POST https://<connection-server>/vmrest/distributionlists/<distributionlistObjectId>/distributionlistmembers
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
    "MemberUserObjectId": "216c1a3e-7c0e-4527-aa9c-32b2683f04be"
}
The following is the response from the above *POST* request and the actual response will depend upon the information given by you:
Response Code: 201
To add another distribution list as a member:
POST https://<connection-server>/vmrest/distributionlists/ef4aa84e-97c3-456e-848e-b162a04c9631/distributionlistmembers
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
    "MemberDistributionListObjectId":"e030d111-d29e-4d11-93fa-4abe73bd50a0"
}

The following is the response from the above *POST* request and the actual response will depend upon the information given by you:

Response Code: 201


Delete a Member from the Distribution List

The following request can be used to delete a member from the distribution list:

DELETE: https://<connection-server>/vmrest/distributionlists/<DistributionListObjectId>/distributionlistmembers/<distributionlistmemberObjectId>
Response Code: 204

JSON Example:

DELETE https://<connection-server>/vmrest/distributionlists/<DistributionListObjectId>/distributionlistmembers/<distributionlistmemberObjectId>
Accept: application/json
Connection: keep-alive
Response Code: 204


Explanation of the Data Fields for Distribution List Member

Parameter Operations Data Type Comments
URI Read Only String Specifies the URI of the distribution list member.
ObjectId Read Only String (36) Specifies the Object Id of the distribution list member.
DistributionListObjectId Read Only String (36) Specifies the distribution list object ID.
DistributionListURI Read Only String Specifies the URI of the distribution list.
MemberUserObjectId Read Only String (36) Specifies the object ID of user or user template.
MemberGlobalUserObjectId Read Only String (36) Specifies the object ID of the user or user template.
MemberDistributionListObjectId Read Only String (36) Specifies the object ID of the member’s distribution list.
MemberGlobalUserDiginetObjectId Read Only String (36) Specifies the object ID of the user.
MemberLocationObjectId Read Only String (36) Specifies the object ID of the member location.
Alias Read/Write String (64) Specifies the unique name to identify a distribution list.
AllowForeignMessage Read Only Boolean Allow users on remote voice messaging systems that are configured as VPIM locations to send messages to this distribution list.

Possible values:

  • true: allow remote voice messaging
  • false: Do not allow remote voice messaging.

Default: false

DisplayName Read/Write String (64) Specifies name of the member.
IsUserTemplate Read Only Boolean Specifies if a member is a user template.
MemberLocationURI Read Only String Specifies URI of the location.
MemberGlobalUserURI Read Only String Specifies URI of the user.
LocationObjectId Read Only String (36) Specifies location object ID.
LocationURI Read Only String Specifies URI of the location.

Rating: 0.0/5 (0 votes cast)

Personal tools