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

From DocWiki

Jump to: navigation, search

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All End Users CUPI Documentation

Contents



Directory API

A URI is provided for users to allow them to search the directory and find addressable objects that can be used to send messages, be added to a private list, and so on. The directory can be searched several different ways. The example below searches for names that start with "user". Only name and extension fields can be used as a search filter. Searching the Directory This request can be used to search for a user in the directory. Note that the maximum number of objects that can be returned from a search is 100 objects.

GET https://<connection-server>/vmrest/directory/addressable?query=(name%20startswith%20user) 

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

<Addresses total="2">
 <Address>
  <ObjectId>8dd65570-a1e8-4c85-95bc-0a8160877238</ObjectId>
  <Type>SUBSCRIBER</Type>
  <DisplayName>UserG</DisplayName>
  <SmtpAddress>userg@cuc-install-43.cisco.com</SmtpAddress>
  <DtmfAccessId>1019</DtmfAccessId>
 </Address>
 <Address>
  <ObjectId>7c897859-282f-43b0-9cab-1933e9b844f3</ObjectId>
  <Type>SUBSCRIBER</Type>
  <DisplayName>UserD</DisplayName>
  <SmtpAddress>userd@cuc-install-43.cisco.com</SmtpAddress>
  <DtmfAccessId>1018</DtmfAccessId>
 </Address>
</Addresses> 
Response Code: 200

JSON Example

GET https://<connection-server>/vmrest/directory/addressable?query=(name%20startswith%20user)
Accept: application/json
Connection: keep-alive

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

{
"@total": "2","Address": 
[
  {
  "ObjectId": "8dd65570-a1e8-4c85-95bc-0a8160877238",
  "Type": "SUBSCRIBER",
  "DisplayName": "UserG",
  "SmtpAddress": "userg@cuc-install-43.cisco.com",
  "DtmfAccessId": "1019"
  },
  {
  "ObjectId": "7c897859-282f-43b0-9cab-1933e9b844f3",
  "Type": "SUBSCRIBER",
  "DisplayName": "UserD",
  "SmtpAddress": "userd@cuc-install-43.cisco.com",
  "DtmfAccessId": "1018"
  }
]
}
Response Code: 200


Searching the Directory for a Particular User

To search the directory for names that exactly match "user", the following query is used:

GET https://<connection-server>/vmrest/directory/addressable?query=(name%20is%20user) 

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

<Address>
  <ObjectId>7c897859-282f-43b0-9cab-1933e9b844f3</ObjectId>
  <Type>SUBSCRIBER</Type>
  <DisplayName>user</DisplayName>
  <SmtpAddress>user@cuc-install-43.cisco.com</SmtpAddress>
  <DtmfAccessId>1018</DtmfAccessId>
</Address>
Response Code: 200

JSON Example

GET https://<connection-server>/vmrest/directory/addressable?query=(name%20is%20user) 
Accept: application/json
Connection: keep-alive

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

{
  “ObjectId”: “7c897859-282f-43b0-9cab-1933e9b844f3”
  “Type”: “SUBSCRIBER”
  “DisplayName”: “user”
  “SmtpAddress”: “user@cuc-install-43.cisco.com”
  “DtmfAccessId”: “1018”
}
Response Code: 200


Explanation of Data Fields

Parameter Operations Data Type Comments
ObjectId Read Only String(36) Unique identifier of the directory entry.
Type Read Only String Indicates type of user. Value is SUBSCRIBER for end users.
DisplayName Read Only String(64) Display name of the end user.
SmtpAddress Read Only String(320) SMTP address of the end user.
DtmfAccessId Read Only String(40) Extension number of the end user.

Rating: 0.0/5 (0 votes cast)

Personal tools