


 



<?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_--_Schedule_Example&amp;feed=atom&amp;action=history</id>
		<title>Cisco Unity Connection Provisioning Interface (CUPI) API -- Schedule Example - 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_--_Schedule_Example&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_--_Schedule_Example&amp;action=history"/>
		<updated>2013-05-20T08:30:41Z</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_--_Schedule_Example&amp;diff=36345&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_--_Schedule_Example&amp;diff=36345&amp;oldid=prev"/>
				<updated>2010-12-14T00:05:08Z</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_--_Schedule_Example&amp;diff=36344&amp;oldid=prev</id>
		<title>Juliew at 22:57, 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_--_Schedule_Example&amp;diff=36344&amp;oldid=prev"/>
				<updated>2010-12-13T22:57:12Z</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 ]]&amp;lt;br&amp;gt;[[Cisco Unity Connection Provisioning Interface (CUPI) API -- Schedule Example|Schedule Example ]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
Schedules in Unity Connection are composed of several objects. As an example, let's model a weekday schedule with the lunch hour blocked out as unavailable every work day, and with various holidays blocked out as well. Using the objects discussed on the [[Cisco_Unity_Connection_Provisioning_Interface_%28CUPI%29_API_--_Schedules|CUPI Schedules page]], this schedule might be composed like so:&lt;br /&gt;
&lt;br /&gt;
* First, we create a top-level ScheduleSet called WeekdaySet. WeekdaySet includes the WeekdaySchedule and excludes the HolidaySchedule (2 Schedule objects).&lt;br /&gt;
* After we create these 2 Schedule objects, we create 2 ScheduleSetMemberMap objects for WeekdaySet - one to include WeekdaySchedule and one to exclude HolidaySchedule.&lt;br /&gt;
* Then, we create 2 ScheduleDetail objects for WeekdaySchedule - one active from 8AM to 12PM Mon-Fri, and the other active from 1PM to 5PM Mon-Fri.&lt;br /&gt;
* Finally, we create various ScheduleDetails objects for HolidaySchedule, one per holiday. For example, we might create a July4ScheduleDetail with start and end dates both set to July 4 2010, and a WinterBreakScheduleDetail with a start date of Dec 23 2010 and an end date of Jan 3 2011.&lt;br /&gt;
&lt;br /&gt;
In this example, we will assume that the Owner for the ScheduleSet and Schedules is the Unity Connection Location, which can be retrieved by making a GET to +/vmrest/locations/connectionlocations+ and then a look-up of the ObjectId field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create the ScheduleSet &amp;quot;WeekdaySet&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
To create the top-level ScheduleSet called &amp;quot;WeekdaySet&amp;quot;, an administrator makes a POST to the schedulesets resource like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/schedulesets&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScheduleSet&amp;gt;&lt;br /&gt;
  &amp;lt;DisplayName&amp;gt;WeekdaySet&amp;lt;/DisplayName&amp;gt;&lt;br /&gt;
  &amp;lt;OwnerLocationObjectId&amp;gt;6a56503e-c1c8-406c-85fd-76be40994d39&amp;lt;/OwnerLocationObjectId&amp;gt;&lt;br /&gt;
&amp;lt;/ScheduleSet&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return the URI to the newly created &amp;quot;WeekdaySet&amp;quot; (which includes its ObjectId):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
201&lt;br /&gt;
Created&lt;br /&gt;
/vmrest/user/schedulesets/7f7e1df2-df8d-4cac-9111-3fc4efc106e6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create the Schedules &amp;quot;WeekdaySchedule&amp;quot; and &amp;quot;HolidaySchedule&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
To create the top-level Schedules called &amp;quot;WeekdaySchedule&amp;quot; and &amp;quot;HolidaySchedule&amp;quot;, an administrator makes two POSTs to the schedules resource as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating the &amp;quot;WeekdaySchedule&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/schedules&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Schedule&amp;gt;&lt;br /&gt;
  &amp;lt;DisplayName&amp;gt;WeekdaySchedule&amp;lt;/DisplayName&amp;gt;&lt;br /&gt;
  &amp;lt;OwnerLocationObjectId&amp;gt;6a56503e-c1c8-406c-85fd-76be40994d39&amp;lt;/OwnerLocationObjectId&amp;gt;&lt;br /&gt;
  &amp;lt;IsHoliday&amp;gt;false&amp;lt;/IsHoliday&amp;gt;&lt;br /&gt;
&amp;lt;/Schedule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return the URI to the newly created &amp;quot;WeekdaySchedule&amp;quot; (which includes its ObjectId):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
201&lt;br /&gt;
Created&lt;br /&gt;
/vmrest/user/schedules/8b2fdf44-ed5e-4fe1-a5b8-7124cb199c4b&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating the &amp;quot;HolidaySchedule&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/schedules&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Schedule&amp;gt;&lt;br /&gt;
  &amp;lt;DisplayName&amp;gt;HolidaySchedule&amp;lt;/DisplayName&amp;gt;&lt;br /&gt;
  &amp;lt;OwnerLocationObjectId&amp;gt;6a56503e-c1c8-406c-85fd-76be40994d39&amp;lt;/OwnerLocationObjectId&amp;gt;&lt;br /&gt;
  &amp;lt;IsHoliday&amp;gt;true&amp;lt;/IsHoliday&amp;gt;&lt;br /&gt;
&amp;lt;/Schedule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return the URI to the newly created &amp;quot;HolidaySchedule&amp;quot; (which includes its ObjectId):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
201&lt;br /&gt;
Created&lt;br /&gt;
/vmrest/user/schedules/f0aacc32-6183-47ae-91ea-41aab0e7170c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add &amp;quot;WeekdaySchedule&amp;quot; and &amp;quot;HolidaySchedule&amp;quot; to &amp;quot;WeekdaySet&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
To associate the &amp;quot;WeekdaySchedule&amp;quot; and &amp;quot;HolidaySchedule&amp;quot; with the &amp;quot;WeekdaySet&amp;quot;, an administrator makes two POSTs to &amp;quot;WeekdaySet&amp;quot;'s schedulesetmembers resource as shown below. Note that the ScheduleSetObjectId and ScheduleObjectIds were returned when we created those objects earlier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating the ScheduleSetMember that includes &amp;quot;WeekdaySchedule&amp;quot; in &amp;quot;WeekdaySet&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/schedulesets/7f7e1df2-df8d-4cac-9111-3fc4efc106e6/schedulesetmembers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScheduleSetMember&amp;gt;&lt;br /&gt;
  &amp;lt;ScheduleSetObjectId&amp;gt;7f7e1df2-df8d-4cac-9111-3fc4efc106e6&amp;lt;/ScheduleSetObjectId&amp;gt;&lt;br /&gt;
  &amp;lt;ScheduleObjectId&amp;gt;8b2fdf44-ed5e-4fe1-a5b8-7124cb199c4b&amp;lt;/ScheduleObjectId&amp;gt;&lt;br /&gt;
  &amp;lt;Exclude&amp;gt;false&amp;lt;/Exclude&amp;gt;&lt;br /&gt;
&amp;lt;/ScheduleSetMember&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return the URI to the newly created ScheduleSetMember (which includes its ObjectId):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
201&lt;br /&gt;
Created&lt;br /&gt;
/vmrest/user/schedulesets/7f7e1df2-df8d-4cac-9111-3fc4efc106e6/schedulesetmembers/eb1f344c-90a2-4e6d-9b87-3523cf9f6838&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating the ScheduleSetMember that excludes &amp;quot;HolidaySchedule&amp;quot; from &amp;quot;WeekdaySet&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/schedulesets/7f7e1df2-df8d-4cac-9111-3fc4efc106e6/schedulesetmembers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScheduleSetMember&amp;gt;&lt;br /&gt;
  &amp;lt;ScheduleSetObjectId&amp;gt;7f7e1df2-df8d-4cac-9111-3fc4efc106e6&amp;lt;/ScheduleSetObjectId&amp;gt;&lt;br /&gt;
  &amp;lt;ScheduleObjectId&amp;gt;f0aacc32-6183-47ae-91ea-41aab0e7170c&amp;lt;/ScheduleObjectId&amp;gt;&lt;br /&gt;
  &amp;lt;Exclude&amp;gt;true&amp;lt;/Exclude&amp;gt;&lt;br /&gt;
&amp;lt;/ScheduleSetMember&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return the URI to the newly created ScheduleSetMember (which includes its ObjectId):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
201&lt;br /&gt;
Created&lt;br /&gt;
/vmrest/user/schedulesets/7f7e1df2-df8d-4cac-9111-3fc4efc106e6/schedulesetmembers/3ba9b61f-6eb1-4e5e-bddf-1c0d321445bc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add ScheduleDetails to &amp;quot;WeekdaySchedule&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
To fill out the &amp;quot;WeekdaySchedule&amp;quot; for every weekday with the lunch hour blocked out, an administrator makes two POSTs to &amp;quot;WeekdaySchedule&amp;quot;'s scheduledetails resource as shown below. Note that the ScheduleObjectId in the URI was returned when we created the &amp;quot;WeekdaySchedule&amp;quot; object earlier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating the &amp;quot;WeekdayMorning ScheduleDetail&amp;quot; for 8AM to 12PM ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/schedules/8b2fdf44-ed5e-4fe1-a5b8-7124cb199c4b/scheduledetails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScheduleDetail&amp;gt;&lt;br /&gt;
  &amp;lt;Subject&amp;gt;WeekdayMorning ScheduleDetail&amp;lt;/Subject&amp;gt;&lt;br /&gt;
  &amp;lt;StartTime&amp;gt;480&amp;lt;/StartTime&amp;gt;&lt;br /&gt;
  &amp;lt;EndTime&amp;gt;720&amp;lt;/EndTime&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveMonday&amp;gt;true&amp;lt;/IsActiveMonday&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveTuesday&amp;gt;true&amp;lt;/IsActiveTuesday&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveWednesday&amp;gt;true&amp;lt;/IsActiveWednesday&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveThursday&amp;gt;true&amp;lt;/IsActiveThursday&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveFriday&amp;gt;true&amp;lt;/IsActiveFriday&amp;gt;&lt;br /&gt;
&amp;lt;/ScheduleDetail&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return the URI to the newly created &amp;quot;WeekdayMorning ScheduleDetail&amp;quot; (which includes its ObjectId):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
201&lt;br /&gt;
Created&lt;br /&gt;
/vmrest/schedules/8b2fdf44-ed5e-4fe1-a5b8-7124cb199c4b/scheduledetails/d5d98691-770d-44ad-b267-51fe55531ff0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating the &amp;quot;WeekdayAfternoon ScheduleDetail&amp;quot; for 1PM to 5PM ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/schedules/8b2fdf44-ed5e-4fe1-a5b8-7124cb199c4b/scheduledetails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScheduleDetail&amp;gt;&lt;br /&gt;
  &amp;lt;Subject&amp;gt;WeekdayAfternoon ScheduleDetail&amp;lt;/Subject&amp;gt;&lt;br /&gt;
  &amp;lt;StartTime&amp;gt;780&amp;lt;/StartTime&amp;gt;&lt;br /&gt;
  &amp;lt;EndTime&amp;gt;1020&amp;lt;/EndTime&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveMonday&amp;gt;true&amp;lt;/IsActiveMonday&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveTuesday&amp;gt;true&amp;lt;/IsActiveTuesday&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveWednesday&amp;gt;true&amp;lt;/IsActiveWednesday&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveThursday&amp;gt;true&amp;lt;/IsActiveThursday&amp;gt;&lt;br /&gt;
  &amp;lt;IsActiveFriday&amp;gt;true&amp;lt;/IsActiveFriday&amp;gt;&lt;br /&gt;
&amp;lt;/ScheduleDetail&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return the URI to the newly created &amp;quot;WeekdayAfternoon ScheduleDetail&amp;quot; (which includes its ObjectId):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
201&lt;br /&gt;
Created&lt;br /&gt;
/vmrest/schedules/8b2fdf44-ed5e-4fe1-a5b8-7124cb199c4b/scheduledetails/09df80a7-8f46-415c-a4d9-f9b2a44ac869&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Add ScheduleDetails to &amp;quot;HolidaySchedule&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
To add July 4th and Winter Break holidays to &amp;quot;HolidaySchedule&amp;quot;, an administrator makes two POSTs to &amp;quot;HolidaySchedule&amp;quot;'s scheduledetails resource as shown below.  Note that the ScheduleObjectId in the URI was returned when we created the &amp;quot;HolidaySchedule&amp;quot; object earlier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating the July 4th holiday ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/schedules/f0aacc32-6183-47ae-91ea-41aab0e7170c/scheduledetails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScheduleDetail&amp;gt;&lt;br /&gt;
  &amp;lt;Subject&amp;gt;July 4th ScheduleDetail&amp;lt;/Subject&amp;gt;&lt;br /&gt;
  &amp;lt;StartDate&amp;gt;2010-07-04&amp;lt;/StartDate&amp;gt;&lt;br /&gt;
  &amp;lt;EndDate&amp;gt;2010-07-04&amp;lt;/EndDate&amp;gt;&lt;br /&gt;
&amp;lt;/ScheduleDetail&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return the URI to the newly created &amp;quot;July 4th ScheduleDetail&amp;quot; (which includes its ObjectId):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
201&lt;br /&gt;
Created&lt;br /&gt;
/vmrest/schedules/f0aacc32-6183-47ae-91ea-41aab0e7170c/scheduledetails/ce7bf677-97d5-4290-8c59-e2258ca351b6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating the Winter Break holiday (Dec 23 to Jan 3) ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /vmrest/schedules/f0aacc32-6183-47ae-91ea-41aab0e7170c/scheduledetails&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScheduleDetail&amp;gt;&lt;br /&gt;
  &amp;lt;Subject&amp;gt;Winter Break ScheduleDetail&amp;lt;/Subject&amp;gt;&lt;br /&gt;
  &amp;lt;StartDate&amp;gt;2010-12-23&amp;lt;/StartDate&amp;gt;&lt;br /&gt;
  &amp;lt;EndDate&amp;gt;2011-01-03&amp;lt;/EndDate&amp;gt;&lt;br /&gt;
&amp;lt;/ScheduleDetail&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will return the URI to the newly created &amp;quot;Winter Break ScheduleDetail&amp;quot; (which includes its ObjectId):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
201&lt;br /&gt;
Created&lt;br /&gt;
/vmrest/schedules/f0aacc32-6183-47ae-91ea-41aab0e7170c/scheduledetails/a85efd4e-cd27-4e21-a8ba-10d7ed7676d3&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>