In this post we will discuss about an introduction to SharePoint 2013 REST service.
Also check out:
Microsoft introduced REST (Representational State Transfer) service in SharePoint 2013. This is comparable to existing SharePoint 2010 client object models.
You can interact to with SharePoint data by using any technology that supports REST web requests, like you can perform create, read, update and delete operations from apps for SharePoint, solutions etc using REST technologies.
To access SharePoint resources using REST, construct a RESTful HTTP request, using the Open Data Protocol (OData) standard, which corresponds to the desired client object model API.
Here is below client object model and REST:
Client object model method:
The endpoints in the SharePoint 2013 REST service correspond to the types and members in the SharePoint client object models. The main entry points for the REST service represent the site collection and site of the specified context.
To access a specific site collection, you can use like below:
To access a specific site, you can use like below:
But here the advantages of using REST is that you don’t have to add references to any SharePoint 2013 libraries or client assemblies. Instead, you make HTTP requests to the appropriate endpoints to retrieve or update SharePoint entities, such as webs, lists, and list items.