.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
sivanagamahesh

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Access Data using the REST API in SharePoint

Posted By:Jean Paul       Posted Date: January 31, 2016    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article we can explore accessing data using the REST API in SharePoint 2013.
 

In this article we can explore accessing data using the REST API in SharePoint 2013.

REST API

SharePoint 2013 introduce the REST API. These API allows SharePoint applications to do Data Operations from the client-side.

REST API usage from client-side is the main advantage of using it. This frees Server CPU cycles a lot.

The main operations we can perform are:

1. List CRUD Operations

2. List creation/updating/deletion operations

SharePoint lists including custom lists can be operated using the REST API. From the client-side a C# or JS application can invoke the REST API for the CRUD operation.

As sample of the REST call compatible with OData specification is given below.

· http://server/site/_api/lists/getbytitle('listname')

Through new SharePoint service packs more and more server-side functionalities are made available through the REST services.

REST Specifications

As per the REST specifications, the HTTP verbs has to be used for the corresponding purpose.

· GET for retrieving data

· PUT to create data

· POST to update data

· DELETE for removing data

Depending on the Platform Infrastructure Polices the availability of DELETE & PUT verbs could be restricted. In this case contact the IT Support to enable them or use HTTP extension methods.

Advantages

To summarize the advantages of using REST API:

1. CRUD operations can be moved to client-side

2. Frees up server cycles & resources usage

3. Less line of code through the REST/OData syntax

4. Usage of HTTP verbs for CRUD operations

References

https://msdn.microsoft.com/en-us/library/office/fp142380.aspx

Summary

In this article we have explored accessing data using the REST API in SharePoint 2013. We can see live examples in the upcoming sections.


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend