


 



<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://docwiki.cisco.com/w/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://docwiki.cisco.com/w/index.php?title=Cisco_Unity_Connection_Provisioning_Interface_(CUPI)_API_--_User_Import&amp;feed=atom&amp;action=history</id>
		<title>Cisco Unity Connection Provisioning Interface (CUPI) API -- User Import - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://docwiki.cisco.com/w/index.php?title=Cisco_Unity_Connection_Provisioning_Interface_(CUPI)_API_--_User_Import&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/w/index.php?title=Cisco_Unity_Connection_Provisioning_Interface_(CUPI)_API_--_User_Import&amp;action=history"/>
		<updated>2013-05-25T05:17:04Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://docwiki.cisco.com/w/index.php?title=Cisco_Unity_Connection_Provisioning_Interface_(CUPI)_API_--_User_Import&amp;diff=36323&amp;oldid=prev</id>
		<title>Gscorbin: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/w/index.php?title=Cisco_Unity_Connection_Provisioning_Interface_(CUPI)_API_--_User_Import&amp;diff=36323&amp;oldid=prev"/>
				<updated>2010-12-14T00:05:07Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 00:05, 14 December 2010&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Gscorbin</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/w/index.php?title=Cisco_Unity_Connection_Provisioning_Interface_(CUPI)_API_--_User_Import&amp;diff=36322&amp;oldid=prev</id>
		<title>Juliew at 22:38, 13 December 2010</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/w/index.php?title=Cisco_Unity_Connection_Provisioning_Interface_(CUPI)_API_--_User_Import&amp;diff=36322&amp;oldid=prev"/>
				<updated>2010-12-13T22:38:49Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Links to Other API pages:''' [[Cisco_Unity_Connection_APIs]]&lt;br /&gt;
{| align=&amp;quot;right&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''CUPI Guide Contents'''&lt;br /&gt;
|-&lt;br /&gt;
|[[Cisco Unity Connection Provisioning Interface (CUPI) API|API Overview ]]&amp;lt;br&amp;gt;[[Cisco Unity Connection Provisioning Interface (CUPI) API -- Index of All CUPI Documentation|Index of All CUPI Documentation]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Differences Between LDAP Import and CUCMBE Import ==&lt;br /&gt;
&lt;br /&gt;
There are very few differences between an LDAP import and a Cisco Unified Communications Manager Business Edition (CUCMBE) import. The primary differences involve the dtmfAccessId.&lt;br /&gt;
&lt;br /&gt;
A GET of an LDAP user will have a phone number, whereas a CUCMBE user will have a dtmfAccessId (based on data in the Cisco Unified Communications Manager (CUCM) database).&lt;br /&gt;
&lt;br /&gt;
When a user is imported, an LDAP import must specify a dtmfAccessId in the payload (this is often based on the phone number). A CUCMBE import will use the value that comes from the CUCM database for the dtmfAccessId.&lt;br /&gt;
&lt;br /&gt;
In this document, &amp;lt;type&amp;gt; in a URI refers to one of these values: ldap or cucmbe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initial Configuration ==&lt;br /&gt;
&lt;br /&gt;
Before any LDAP users can be imported, the LDAP synchronization has to be set as described in this [http://www.cisco.com/en/US/docs/voice_ip_comm/connection/8x/design/guide/8xcucdg040.html section of the ''Design Guide for Cisco Unity Connection 8.x''].&lt;br /&gt;
&lt;br /&gt;
For CUCM user import, users are first created in the CUCM system. Prior to import, the creation of a user account must be done as described in this [http://www.cisco.com/en/US/docs/voice_ip_comm/connection/8x/user_mac/guide/8xcucmac100.html#wp1050464 section of the ''User Moves, Adds, and Changes Guide for Cisco Unity Connection 8.x''].&lt;br /&gt;
&lt;br /&gt;
The important point for a CUCMBE import is that the user must have a primary directory number. This is a Cisco Unified Communications Manager concept, but it effectively means that the user must have at least one device, that device must have at least one line number, and that line number needs to be assigned as the user's primary DN.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GET a List of Users That Can Be Imported ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET http://&amp;lt;server&amp;gt;/vmrest/import/users/&amp;lt;type&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only users that are eligible for import are returned; users that are already imported are not in this list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Offset and Limit Parameters Can Be Part of the ldap Query ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://&amp;lt;server&amp;gt;/vmrest/import/users/&amp;lt;type&amp;gt;?offset=x&amp;amp;limit=y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the following:&lt;br /&gt;
&lt;br /&gt;
* Either parameter can be specified individually&lt;br /&gt;
&lt;br /&gt;
* If the offset exceeds the number of entries, the response is an empty list&lt;br /&gt;
&lt;br /&gt;
* If no limit is specified and more than 2000 results are returned, the response is an error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Filter and Sort ===&lt;br /&gt;
&lt;br /&gt;
To put constraints on search results, LDAP requests support the CUPI standard filter and sort parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /vmrest/import/users/ldap?limit=5 HTTP/1.1&lt;br /&gt;
Accept: application/json&lt;br /&gt;
User-Agent: Java/1.6.0_20&lt;br /&gt;
Host: cuc-install-69.cisco.com&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Authorization: Basic Y2NtYWRtaW5pc3RyYXRvcjplY3NidWxhYg==&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The GET above would produce the following response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Pragma: No-cache&lt;br /&gt;
Cache-Control: no-cache&lt;br /&gt;
Expires: Wed, 31 Dec 1969 16:00:00 PST&lt;br /&gt;
Set-Cookie: JSESSIONIDSSO=11D3599617B30496BAD4BF2BB4C23B32; Path=/&lt;br /&gt;
Set-Cookie: JSESSIONID=2D9E4ACB334EF6DED8734E51EDDDB7F9; Path=/vmrest&lt;br /&gt;
Content-Type: application/json&lt;br /&gt;
Transfer-Encoding: chunked&lt;br /&gt;
Date: Wed, 28 Apr 2010 19:39:03 GMT&lt;br /&gt;
Server: &lt;br /&gt;
&lt;br /&gt;
\{&amp;quot;ImportUser&amp;quot;:\[\{&amp;quot;alias&amp;quot;:&amp;quot;ui&amp;quot;,&amp;quot;firstName&amp;quot;:&amp;quot;unity&amp;quot;,&amp;quot;lastName&amp;quot;:&amp;quot;install&amp;quot;,&amp;quot;pkid&amp;quot;:&amp;quot;af7dea71-d6c7-47d9-b1db-44190073cf6c&amp;quot;\},\{&amp;quot;alias&amp;quot;:&amp;quot;um&amp;quot;,&amp;quot;firstName&amp;quot;:&amp;quot;unity&amp;quot;,&amp;quot;lastName&amp;quot;:&amp;quot;msgstore&amp;quot;,&amp;quot;pkid&amp;quot;:&amp;quot;452caa72-57e5-4644-a14c-f6e147a66e54&amp;quot;\},\{&amp;quot;alias&amp;quot;:&amp;quot;ud&amp;quot;,&amp;quot;firstName&amp;quot;:&amp;quot;unity&amp;quot;,&amp;quot;lastName&amp;quot;:&amp;quot;dirsvc&amp;quot;,&amp;quot;pkid&amp;quot;:&amp;quot;8bff5502-64f2-4425-9381-7ff524aea491&amp;quot;\},\{&amp;quot;alias&amp;quot;:&amp;quot;ua&amp;quot;,&amp;quot;firstName&amp;quot;:&amp;quot;unity&amp;quot;,&amp;quot;lastName&amp;quot;:&amp;quot;admin&amp;quot;,&amp;quot;pkid&amp;quot;:&amp;quot;7ddba5d6-9eaa-4a92-8513-a9454141d27c&amp;quot;\},\{&amp;quot;alias&amp;quot;:&amp;quot;S-SvrG&amp;quot;,&amp;quot;firstName&amp;quot;:&amp;quot;Sonya&amp;quot;,&amp;quot;lastName&amp;quot;:&amp;quot;ServerG&amp;quot;,&amp;quot;pkid&amp;quot;:&amp;quot;aca43d25-4aa3-4270-a174-e5e9f1c3b5b5&amp;quot;\}\]\}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Import a User ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://&amp;lt;server&amp;gt;/vmrest/import/users/&amp;lt;type&amp;gt;?templateAlias=&amp;lt;voice mail user template&amp;gt; with an ImportUser object as payload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important point here is that because these users are imported, almost all values come from the internal database. The only value used on a CUCMBE import is the pkid of the passed-in user. The rest of the fields are ignored and their values are pulled from the CUCM database during the import process. 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.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/import/users/ldap?templateAlias=voicemailusertemplate HTTP/1.1&lt;br /&gt;
Content-Type: application/json&lt;br /&gt;
User-Agent: Java/1.6.0_20&lt;br /&gt;
Host: cuc-install-69.cisco.com&lt;br /&gt;
Accept: text/html, image/gif, image/jpeg, \*; q=.2, \*/*; q=.2&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Authorization: Basic Y2NtYWRtaW5pc3RyYXRvcjplY3NidWxhYg==&lt;br /&gt;
Content-Length: 126&lt;br /&gt;
&lt;br /&gt;
\{&amp;quot;alias&amp;quot;:&amp;quot;sdavis&amp;quot;,&amp;quot;firstName&amp;quot;:&amp;quot;sonya&amp;quot;,&amp;quot;lastName&amp;quot;:&amp;quot;davis&amp;quot;,&amp;quot;dtmfAccessId&amp;quot;:&amp;quot;12123&amp;quot;,&amp;quot;pkid&amp;quot;:&amp;quot;c2e2bf1c-f249-40e5-b7b8-31a5b0333647&amp;quot;\}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The POST above would produce the following response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 201 Created&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Cisco Unity Connection Provisioning Interface (CUPI) API]]&lt;/div&gt;</summary>
		<author><name>Juliew</name></author>	</entry>

	</feed>