Starting with REST

In this article we can have a start with REST API.

REST

SharePoint 2013 introduced REST API which allows alternative & easier usage than CSOM/JSOM. The simplicity of REST is that we can use browser address bar to invoke the API.

Testing REST

Test the following URL in your browser.

http://server/_api/web/lists

If you are using Internet Explorer, you will get the following output.

image

Towards the right hand side you can see there are 19 lists being returned. To view the XML output, you can choose the View Source option.

image

Please note that the result is returned in XML format. In programming scenarios, we can use XML or JSON notations to get the results & parse them.

References

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

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

Summary

In this post we have explored how to start with REST API using a browser.

Leave a Reply

Your email address will not be published. Required fields are marked *