venerdì, febbraio 15, 2008

Microsoft Exchange Server 2003: Checking Free-Busy Status (HTTP)

It is possible to view an XML version of an employee’s free or busy time using Microsoft Exchange. The MSDN article “Checking Free-Busy Status (HTTP),” explains it this way;

The freebusy method returns a string of numbers that indicate the attendee's availability for a requested period of time and can be submitted as a URL command over HTTP.

The freebusy command takes four command parameters:

  • start - the starting time of the range to determine free/busy status.
  • end - the ending time of the range to determine free/busy status.
  • interval - the interval, in minutes, of the free/busy time to download. Must be greater than or equal to one minute.
  • u - the SMTP e-mail address of the user whose free/busy info is being retrieved.

Each number in the free/busy string represents an interval of time, for example 60 minutes.

Free time returns 0, Tentative returns 1, Busy returns 2, and Out of Office (OOF) returns 3. If appointments overlap, the highest number is returned. If no free/busy data is available for the interval, the value 4 is returned.

Simply create a URL like so:

htp://[Server Name]/public/?Cmd=freebusy&start=[Start Date and TIme]&end=2[End Date and Time]&interval=15&u=SMTP:[User/E-mail Address]

it produces output like this:

<a:response xmlns:a="WM">
<a:recipients>
<a:item>
<a:displayname>Selected User</a:displayname>
<a:email type="SMTP">UserName@yourCompany.com</a:email>
<a:type>1</a:type>
<a:fbdata>11110000000000022201100001100</a:fbdata>
</a:item>
</a:recipients>
</a:response>