Web Services
In the previous topic, we have explained the provider model and how it works in Sitefinity. There is another model implemented though - Web Services model. Sitefinity is Web Service oriented application.
Web Services Overview
Sitefinity introduces the web service API in its full extent. While, in previous versions of Sitefinity, we have always made sure to provide developers with fully exposed API, we have done so only for the server side development scenarios. The web service API is based on the Windows Communication Foundation (WCF) REST approach,where each service represents one entity of the domain model. The web service API follows very strictly convention where for each entity following operations can be performed:
- Get single item
- Get collection of items
- Save item
- Delete items (creates new item or updates an existing one)
The two main usages of the webservice API are the client side asynchronous requests (AJAX) and communication between different applications. The web services will be of great help to anyone who wish to integrate Sitefinity with 3rd party applications:

Simply put, the UI interacts with web services, which are also exposed and available for 3rd party applications and devices.
Sitefinity WCF RESTful Services Overview
Sitefinity provides a fully exposed web service API. Sitefinity webservice API is made of RESTful webservices, meaning that the design is following the principles outline by Roy Fielding in his doctoral dissertation.
What makes a webservice RESTful?
There are two main approaches to webservices: SOAP and REST: Whereas SOAP based webservices expose methods (such as GetNewsItems or SaveNewsItem), REST works with resources as the cornerstones of its architecture and relies on the HTTP methods to provide the operational context.
Let us take a look at the following diagram comparing the two approaches.

In essence, with both approaches we are providing the client of the service with the ability to accomplish the CRUD tasks , however, where SOAP is offering arbitrarily named methods as an API, REST is able to provide uniform API by combining the resource name with the well known standards of the HTTP protocol.
Sitefinity conventions
For every resource exposed through a webservice, Sitefinity supports CRUD operations. Every call to a webservice supports an optional parameter for the provider name (learn more about providers and provider model pattern here ). If no provider name has been set through an optional query string parameter, default provider will be used.
When requesting a collection of resources, Sitefinity supports also following optional parameters:
- sort - sort expression used to order the requested collection of items
- skip - number of items to skip before retrieving collection (used primarily for paging purposes)
- take - number of items to take when retrieving collection (used primarily for paging purposes)
- filter - filter expression in dynamic LINQ format used to filter the collection between it is returned to the client.
The primary key of the item to retrieve, create or update is always required and it is part of the web service path. When returning a collection of items, Sitefinity will actually return a CollectionContext object which carries some additional information about the collection along with the actual collection of items.
All built-in webservices provided by Sitefinity are located in the ~/Sitefinity/Services folder.