Cisco Unity Connection Provisioning Interface (CUPI) API -- Alternate Names

From DocWiki

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 Alternate Names

This page contains information on how to use the API to create, list, update, and delete Alternate Names. Alternate Names are shared by users, contacts, distribution lists, private lists, and VPIM locations. Each of these objects can have Alternate Names associated with them.


Listing and Viewing

The following is an example of a GET that lists all Alternate Names:

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

The following is the response from the above GET request:

200
OK
<?xml version="1.0" encoding="UTF-8"?>
<AlternateNames total="5">
  <AlternateName>
    <URI>/vmrest/alternatenames/a2ec7ba8-db89-4135-8cde-2fce23e59616</URI>
    <FirstName>Ooser</FirstName>
    <LastName>Aye</LastName>
    <ObjectId>a2ec7ba8-db89-4135-8cde-2fce23e59616</ObjectId>
    <GlobalUserObjectId>bde24d71-95fa-4ba8-bf1b-0e19a4e9a68b</GlobalUserObjectId>
    <GlobalUserURI>/vmrest/globalusers/bde24d71-95fa-4ba8-bf1b-0e19a4e9a68b</GlobalUserURI>
  </AlternateName>
  <AlternateName>
    <URI>/vmrest/alternatenames/c10257ad-886a-451d-9d96-09499dbf5cf1</URI>
    <FirstName>allvoicemaleusers</FirstName>
    <ObjectId>c10257ad-886a-451d-9d96-09499dbf5cf1</ObjectId>
    <DistributionListObjectId>a9a648f7-bf32-4851-a0c5-62c0165116ae</DistributionListObjectId>
    <DistributionListURI>/vmrest/distributionlists/a9a648f7-bf32-4851-a0c5-62c0165116ae</DistributionListURI>
  </AlternateName>
  <AlternateName>
    <URI>/vmrest/alternatenames/2b5b5a9a-1721-4ca6-a1e6-92d375f6c761</URI>
    <FirstName>khan</FirstName>
    <LastName>ah</LastName>
    <ContactObjectId>95beb3f7-b142-4ca5-861f-e36d65aef463</ContactObjectId>
    <ContactURI>/vmrest/contacts/95beb3f7-b142-4ca5-861f-e36d65aef463</ContactURI>
    <ObjectId>2b5b5a9a-1721-4ca6-a1e6-92d375f6c761</ObjectId>
  </AlternateName>
  <AlternateName>
    <URI>/vmrest/alternatenames/d6d06ae0-6c63-4944-9426-ce4027aa67fd</URI>
    <FirstName>privut lyst</FirstName>
    <ObjectId>d6d06ae0-6c63-4944-9426-ce4027aa67fd</ObjectId>
    <PersonalGroupObjectId>10966c03-e64b-4c3d-9809-990b62865c6a</PersonalGroupObjectId>
  </AlternateName>
  <AlternateName>
    <URI>/vmrest/alternatenames/44e03050-5e7e-4792-be69-96e1e7511224</URI>
    <FirstName>vpim lokaychion aye</FirstName>
    <ObjectId>44e03050-5e7e-4792-be69-96e1e7511224</ObjectId>
    <LocationObjectId>6aacd387-72e9-4971-82e5-b04a7a9790ad</LocationObjectId>
    <LocationURI>/vmrest/locations/connectionlocations/6aacd387-72e9-4971-82e5-b04a7a9790ad</LocationURI>
  </AlternateName>
</AlternateNames>

In this example, the first Alternate Name in the list belongs to a user as denoted by the GlobalUserObjectId field. The second Alternate Name belongs to a Distribution List, and so on.

For Distribution Lists, Private Lists, and VPIM Locations, only the FirstName field is used to provide the Alternate Name. These objects only have a single Display Name, they do not have separate first and last names.

To retrieve a sorted list of all Alternate Names, add the following query parameter:

sort=(column [asc | desc])

For example, to retrieve a list of all Alternate Names sorted by Object Id in ascending order:

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

To retrieve a specific Alternate Name by its object ID:

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


Searching

To retrieve a list of Alternate Names that meet a specified search criteria, add the following query parameter to a GET:

query=(column [is | startswith] value)

For example, to find all Alternate Names with a GlobalUserObjectId that equals "bde24d71-95fa-4ba8-bf1b-0e19a4e9a68b" (this is a search to find all Alternate Names for a specific User):

GET http://<connection-server>/vmrest/alternatenames?query=(globaluserobjectid%20is%20bde24d71-95fa-4ba8-bf1b-0e19a4e9a68b)

To find Alternate Names for various objects, use the following object id columns:

  • For Users, use GlobalUserObjectId.
  • For Contacts, use ContactObjectId.
  • For Distribution Lists, use DistributionListObjectId.
  • For Private Lists, use PersonalGroupObjectId.
  • For VPIM Locations, use LocationObjectId.


Creating

The required fields for creating an Alternate Name are a parent object id, a First Name, and for some objects a Last Name. To determine what parent object id column to use to create the new Alternate Name, use the list found in the Searching section above. For example, if you are creating an Alternate Name for a User, then a GlobalUserObjectId needs to be provided.

The following is an example of a POST that creates an Alternate Name for a User with a First Name of "Mike" and a Last Name of "Wholebert" whose Global User Object Id is "bde24d71-95fa-4ba8-bf1b-0e19a4e9a68b":

POST http://<connection-server>/vmrest/alternatenames
 
<?xml version="1.0" encoding="UTF-8"?>
  <AlternateName>
    <FirstName>Mike</FirstName>
    <LastName>Wholebert</LastName>
    <GlobalUserObjectId>bde24d71-95fa-4ba8-bf1b-0e19a4e9a68b</GlobalUserObjectId>
  </AlternateName>

When creating Distribution Lists, Private Lists, or VPIM Locations, only the FirstName field is used to provide the Alternate Name


Updating

The following is an example of a PUT request that modifies the First Name and Last Name of an existing Alternate Name:

PUT http://<connection-server>/vmrest/alternatenames/<objectid>
 
<?xml version="1.0" encoding="UTF-8"?>
  <AlternateName>
    <FirstName>Mick</FirstName>
    <LastName>Holebert</LastName>
  </AlternateName>


Deleting

The following is an example of a DELETE request that deletes an Alternate Name:

DELETE http://<connection-server>/vmrest/alternatenames/<objectid>

Rating: 0.0/5 (0 votes cast)

Personal tools