Cisco Unity Connection Provisioning Interface (CUPI) API -- User Import

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


LDAP Import

A GET of an LDAP user will have a phone number. When a user is imported, an LDAP import must specify a dtmfAccessId in the payload (this is often based on the phone number).

In this document, <type> in a URI refers to ldap value.

Initial Configuration

Before any LDAP users can be imported, the LDAP synchronization has to be set as described in this section of the Design Guide for Cisco Unity Connection 8.x.

GET a List of Users That Can Be Imported

GET http://<server>/vmrest/import/users/<type>

Only users that are eligible for import are returned; users that are already imported are not in this list.

Offset and Limit Parameters Can Be Part of the ldap Query


Note the following:

  • Either parameter can be specified individually
  • If the offset exceeds the number of entries, the response is an empty list
  • If no limit is specified and more than 2000 results are returned, the response is an error

Filter and Sort

To put constraints on search results, LDAP requests support the CUPI standard filter and sort parameters.


GET /vmrest/import/users/ldap?limit=5 HTTP/1.1
Accept: application/json
User-Agent: Java/1.6.0_20
Connection: keep-alive
Authorization: Basic Y2NtYWRtaW5pc3RyYXRvcjplY3NidWxhYg==

The GET above would produce the following response:

HTTP/1.1 200 OK
Pragma: No-cache
Cache-Control: no-cache
Expires: Wed, 31 Dec 1969 16:00:00 PST
Set-Cookie: JSESSIONIDSSO=11D3599617B30496BAD4BF2BB4C23B32; Path=/
Set-Cookie: JSESSIONID=2D9E4ACB334EF6DED8734E51EDDDB7F9; Path=/vmrest
Content-Type: application/json
Transfer-Encoding: chunked
Date: Wed, 28 Apr 2010 19:39:03 GMT


Import a User

POST http://<server>/vmrest/import/users/<type>?templateAlias=<voice mail user template> with an ImportUser object as payload

An important point here is that because these users are imported, almost all values come from the internal database. One exception for an LDAP import is the dtmfAccessId. The dtmfAccessId data is not available in the internal database, so an LDAP import must specify both a pkid and a dtmfAccessId.

Note: The dtmfAccessID is case sensitive so the "dtmf" in dtmfAccessID must be in lower case.

For example:

POST /vmrest/import/users/ldap?templateAlias=voicemailusertemplate HTTP/1.1
Content-Type: application/json
User-Agent: Java/1.6.0_20
Accept: text/html, image/gif, image/jpeg, \*; q=.2, \*/*; q=.2
Connection: keep-alive
Authorization: Basic Y2NtYWRtaW5pc3RyYXRvcjplY3NidWxhYg==
Content-Length: 126


The POST above would produce the following response:

HTTP/1.1 201 Created

Rating: 2.0/5 (5 votes cast)

Personal tools