CRUD operation on Web object using REST API in SharePoint
As I've already discussed about REST API, so I'm assuming you all know the basics of REST API, for those who haven't read my last post please go through with " REST API for SharePoint ". In this blog post, we'll discuss about the operations performed on web object. Accessing properties of web using REST api is very simple. Creating JavaScript Namespace In this blog series we will use "RESTApiHelper" namespace to avoid conflict with other javascript libraries. Below is the code to create javascript namespace. var RESTApiHelper = window.RESTApiHelper || {}; Get SPWeb Properties Now we will create a property for Web in the namespace. RESTApiHelper.Web = function (SiteUrl) { this.SiteUrl = SiteUrl; For getting spweb properties we have to build the url as " http://siteurl/_api/web". Below is the jquery code to call the url and get the response in json format. this.GetWeb = function (doSuccess, doError) { $.aja...