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

From DocWiki

Revision as of 12:11, 17 October 2013 by Suniaror (Talk)
(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



Alternate Names API

Listing the Alternate Names

GET https://<connection-server>/vmrest/alternatenames?query=(GlobalUserObjectId%20is%20<user-objectid>)

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

<AlternateNames total="3">
   <AlternateName>
   <URI>/vmrest/alternatenames/5fa9e143-d9d3-42ea-9370-e763d8ee319d</URI>
   <FirstName>sd</FirstName>
   <LastName>asd</LastName>
   <ObjectId>5fa9e143-d9d3-42ea-9370-e763d8ee319d</ObjectId>
   <GlobalUserObjectId>9375d893-c8eb-437b-90bf-7de4b1d0c3e8</GlobalUserObjectId>
   <GlobalUserURI>/vmrest/globalusers/9375d893-c8eb-437b-90bf-7de4b1d0c3e8</GlobalUserURI>
  </AlternateName>
   <AlternateName>
   <URI>/vmrest/alternatenames/89b0a8b9-68d7-445c-acb9-aaf2a569d5ef</URI>
   <FirstName>sqdas</FirstName>
   <LastName>asqd</LastName>
   <ObjectId>89b0a8b9-68d7-445c-acb9-aaf2a569d5ef</ObjectId>
   <GlobalUserObjectId>9375d893-c8eb-437b-90bf-7de4b1d0c3e8</GlobalUserObjectId>
   <GlobalUserURI>/vmrest/globalusers/9375d893-c8eb-437b-90bf-7de4b1d0c3e8</GlobalUserURI>
  </AlternateName>
  <AlternateName>
   <URI>/vmrest/alternatenames/dc03dec6-a9df-4d2b-8972-78c3bceec987</URI>
   <FirstName>sdwds</FirstName>
   <LastName>asd</LastName>
   <ObjectId>dc03dec6-a9df-4d2b-8972-78c3bceec987</ObjectId>
   <GlobalUserObjectId>9375d893-c8eb-437b-90bf-7de4b1d0c3e8</GlobalUserObjectId>
   <GlobalUserURI>/vmrest/globalusers/9375d893-c8eb-437b-90bf-7de4b1d0c3e8</GlobalUserURI>
  </AlternateName>
</AlternateNames>
Response Code: 200

JSON Example

GET https://<connection-server>/vmrest/alternatenames?query=(GlobalUserObjectId%20is%20<user-objectid>)
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:

Response Code: 200

Create a new Alternate Name

The mandatory fields for creation of an alternate name are: FirstName, LastName, and GlobalUserObjectId. The URI for getting partition object ID use:

GET https://<connection-server>/vmrest/partitions

The following URI is fetched from the response body of above URI:

https://<connection-server>/vmrest/users/<user-objectid>

The Request URI:

POST https://<connection-server>/vmrest/alternatenames
<AlternateName>
  <FirstName>sdwds</FirstName>
  <LastName>asd</LastName>
  <GlobalUserObjectId>9375d893-c8eb-437b-90bf-7de4b1d0c3e8</GlobalUserObjectId>
</AlternateName>

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
/vmrest/alternatenames/f375d893-c8eb-437b-90bf-7de4b1d0c3e8

JSON Example

POST https://<connection-server>/vmrest/alternatenames
Accept: application/json
Content-type:  application/json
Connection: keep-alive
Request body:
{
  "FirstName":"and",
  "LastName":"gupta",
  "GlobalUserObjectId":"9375d893-c8eb-437b-90bf-7de4b1d0c3e8"
}

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
/vmrest/alternatenames/f375d893-c8eb-437b-90bf-7de4b1d0c3e8

Update Alternate Names

PUT https://<connection-server>/vmrest/alternatenames/<objectid>
<AlternateName>
  <FirstName>kapil</FirstName>
  <LastName>gupta</LastName>
</AlternateName>

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

Response Code: 204

JSON Example

PUT https://<connection-server>/vmrest/alternatenames/<objectid>
Accept: application/json
Content-type:  application/json
Connection: keep-alive
{
"FirstName":"John",
"LastName":"gupta"
}

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

Response code: 204

Delete Alternate Names

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

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

Response Code: 204

JSON Example

DELETE https://<connection-server>/vmrest/alternatenames/<objectid>
Accept: application/json
Connection: keep-alive

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

Response code: 204

Explanation of Data Fields

Field Name Data Type Operation Description
ObjectId String(36) Read Only The primary key for this table. A globally unique, system-generated identifier for an alternate name object.
FirstName String(64) Read/Write The first name (i.e. given name) of this person. Not the surname and middle name.
LastName String(64) Read/Write The last name (i.e. surname or family name) of this person, by which a person is commonly known.
GlobalUserObjectId String (36) Read/Write The unique identifier of the Global User to which this alternate name belongs.

Rating: 0.0/5 (0 votes cast)

Personal tools