SharePoint Foundation REST Interface
Published: May 2010
The new REST (Representational State Transfer) interface in Microsoft SharePoint Foundation 2010 provides access to lists and libraries as a relational data service. A core concept of any RESTful interface is the resource, and in SharePoint Foundation, lists and items are represented as HTTP resources that can be addressed by remote URLs.
Operations in the SharePoint Foundation REST interface constitute a standard set of operations for RESTful web services. Read, create, update, and delete operations are mapped directly to GET, POST, PUT, and DELETE HTTP verbs. This eliminates the need for intermediate layers between client and server, and it is useful for interoperability because it allows applications from other platforms to easily connect to SharePoint Foundation. Interoperability is one of the advantages of new SharePoint Foundation REST interface, but the REST interface also provides a great development experience through integration with ADO.NET Data Services, on which it is based.
The following table shows example URLs that implement the REST interface.
Typing the URL of the REST service returns a standard Atom service document that describes collections of information that are available in the SharePoint Foundation site.
Typing a name after the URL of the service returns SharePoint Foundation list data in XML format as a standard Atom feed that contains entries for every list item and the properties of each item, in addition to navigation properties that are represented as Atom links. Navigation properties represent relationships to other SharePoint Foundation lists that are formed through lookup columns.
The SharePoint Foundation interface returns entity data model XML that describes the entity types for every list in the website.
Returns the specified list item by ID (2) as an Atom feed with one entry that corresponds to the requested item.
Sorts the Atom feed by name.
http://lsspf4719/sites/TestWebs/_vti_bin/listdata.svc/Employees?$filter=Project/Title eq 'My Project Title'
Uses a navigation property to filter the list by title of a related project.
By taking advantage of new capabilities of the SharePoint Foundation data store, REST queries provide a flexible mechanism for working with SharePoint Foundation list data in XML format, and any application that can send REST URLs to SharePoint Foundation can retrieve its list data. As an example, the REST interface uses the new joins feature of lists, so that when SharePoint Foundation receives an ADO.NET Data Services query that implements the joins feature, the query is translated into a native Collaborative Application Markup Language (CAML) query.