SharePoint support for iCalendar using the MashPoint REST API

In my last post where I introduced you to our new MashPoint REST API for SharePoint I showed you how to access entities in MashPoint (or MOSS BDC) in a RESTful way. But that's just one part of the story since most of your data is probably stored in SharePoint and you want to be able to access this data using the API too.

In this post I will show you our support for the iCalendar format. It is a standard "file" format for calendar tasks and meetings. From now on I will refer to this as a "representation" and not file format. At the heart of an RESTful API is the notion of being able to get resources in different representations. If we look at the default representation of a SharePoint calendar it is its HTML representation.

With the MashPoint REST API you can also get the iCal representation by changing the URL in your browser to: http://site/mashpoint/1/$ical$/Lists/calendar.aspx

If you have Outlook installed (or some other application associated with iCal) you will se the following message.

Select Open and the calendar will be opened in Outlook.

What if you want to display your calendar in a Vista gadget? Well no problem, just download a gadget that supports iCal "feeds". The one I use in this example can be downloaded here.
gadget gadget.view

Now you have the SharePoint calendar visible on your desktop.

This should give you an idea of the power of a "RESTful" API. Since issuing a HTTP GET request is so fundamental we can expose our data to a number of clients and devices. By choosing a well known and widely used representation like iCalendar we will reach even more clients. Compare this to using the lists.asmx SOAP Web service where you have to have clients that are written explicitly to consume this service and you should see the benefit. 

All you have to do to try this is download the free preview of the REST API here.

In the next post, Vijay will show how you can render your SharePoint calendar in Google calendar.

Posted Jan 26 2009, 02:00 PM by Jonas Nilsson


Jonas Nilsson Q&A

Bamboo Nation Almost Everywhere

Bamboo Solutions on Facebook

Bamboo Solutions on Google+

Bamboo Solutions on LinkedIn

Bamboo Solutions on YouTube

Bamboo Solutions Corporation, 2002-2016