Cisco Unity Connection Provisioning Interface (CUPI) API -- Contacts

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



Contacts

Listing Contacts Basics

GET https://<connection-server>/vmrest/contacts/<contact-objectid>

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
<Contacts total="2">
  <Contact>
    <URI>/vmrest/contacts/fdfdffb0-bc54-4183-aadf-139355cfb375</URI>
    <LocationObjectId>f0a9b745-5e19-4c88-ae41-8d39e7bdbdde</LocationObjectId>
    <LocationURI>/vmrest/locations/connectionlocations/f0a9b745-5e19-4c88-ae41-8d39e7bdbdde</LocationURI>
    <ObjectId>fdfdffb0-bc54-4183-aadf-139355cfb375</ObjectId>
    <DisplayName>Jeffs Contact</DisplayName>
    <FirstName>Jeffs</FirstName>
    <LastName>Contact</LastName>
    <Alias>jcontact2</Alias>
    <PartitionObjectId>1da73055-423b-4123-859e-9f5de772a10a</PartitionObjectId>
    <PartitionURI>/vmrest/partitions/1da73055-423b-4123-859e-9f5de772a10a</PartitionURI>
    <IsAddressable>false</IsAddressable>
    <AlternateNamesURI>/vmrest/alternatenames?query=(ContactObjectId%20is%20fdfdffb0-bc54-4183-aadf-139355cfb375)</AlternateNamesURI>
  </Contact>
  <Contact>
    <URI>/vmrest/contacts/0dedebb1-ae52-4548-8110-57658cf5e315</URI>
    <LocationObjectId>f0a9b745-5e19-4c88-ae41-8d39e7bdbdde</LocationObjectId>
    <LocationURI>/vmrest/locations/connectionlocations/f0a9b745-5e19-4c88-ae41-8d39e7bdbdde</LocationURI>
    <ObjectId>0dedebb1-ae52-4548-8110-57658cf5e315</ObjectId>
    <DisplayName>Test Contact</DisplayName>
    <FirstName>Test</FirstName>
    <LastName>Contact</LastName>
    <Alias>TestContact</Alias>
    <PartitionObjectId>1da73055-423b-4123-859e-9f5de772a10a</PartitionObjectId>
    <PartitionURI>/vmrest/partitions/1da73055-423b-4123-859e-9f5de772a10a</PartitionURI>
    <IsAddressable>false</IsAddressable>
    <AlternateNamesURI>/vmrest/alternatenames?query=(ContactObjectId%20is%200dedebb1-ae52-4548-8110-57658cf5e315)</AlternateNamesURI>
  </Contact>
</Contacts>

Creating a New Contact

NOTE: To create a contact you must provide which contact template to use on the URI - the system default is the "systemcontacttemplate" used here.

POST https://<connection-server>/vmrest/contacts?templateAlias=systemcontacttemplate
Response Code:201 

The unique identifier for the newly created contact is returned in the response body like this

/vmrest/contacts/3560ffcc-ff80-4fa4-b497-c03b08e1c858


Setting Contact Transfer

Set the contact to transfer to "1234", ring 4 times and set the transfer to active

PUT https://lindborgload7.cisco.com:8443/vmrest/contacts/3560ffcc-ff80-4fa4-b497-c03b08e1c858

BODY

<Contact><TransferExtension>1234</TransferExtension><TransferEnabled>1</TransferEnabled><TransferRings>4</TransferRings></Contact>
Response Code:204 

Updating Recorded Contact Name

PUT https://lindborgload7.cisco.com:8443/vmrest/contacts/fdfdffb0-bc54-4183-aadf-139355cfb375/voicename

BODY

Content-Type: audio/wav
Content-Length: 851953

RIFF  � WAVEfmt �   � � @�   >  � �   fact�    � data  �   � 
{etc...}
Response Code:204

Rating: 0.0/5 (0 votes cast)

Personal tools