Developers can interact remotely with SharePoint 2013 by way of REST services introduced in SharePoint 2013. SharePoint data and objects can be accessed using any technology that supports REST web requests like the ones shown in the picture below. This ability of SharePoint 2013 opens the boundaries of integration and collaboration with other REST based platforms and devices.
As the REST service architecture in the preceding figure shows, a HTTP request using the OData protocol is sent to SharePoint and your application will receive the response in JSON or ATOM format that your client application needs to parse and utilize. The HTTP request is handled by the "client.svc" web service in SharePoint 2013. The "client.svc" web service internally calls the server object model that retrieves data from the SharePoint content database as shown below. SharePoint Apps are built using these architectural concepts.
For example: If you want to retrieve a SharePoint List by its Title then you can create a request as follows:
As the REST service architecture in the preceding figure shows, a HTTP request using the OData protocol is sent to SharePoint and your application will receive the response in JSON or ATOM format that your client application needs to parse and utilize. The HTTP request is handled by the "client.svc" web service in SharePoint 2013. The "client.svc" web service internally calls the server object model that retrieves data from the SharePoint content database as shown below. SharePoint Apps are built using these architectural concepts.
For example: If you want to retrieve a SharePoint List by its Title then you can create a request as follows:
http://server/site/_api/lists/getbytitle('ListName')
A concrete example:
A concrete example:
http://win-4f44sec6iug:34480/sites/ts/_api/lists/getbytitle('ProductList')
In my case the response I receive is as follows:
Oops!! So IE cannot display the feed; but I have received the feed from SharePoint. So I right-click and do a view source. I see the entire XML is being sent by SharePoint. To see the XML in IE 10 you need to use the following procedure:
In my case the response I receive is as follows:
Oops!! So IE cannot display the feed; but I have received the feed from SharePoint. So I right-click and do a view source. I see the entire XML is being sent by SharePoint. To see the XML in IE 10 you need to use the following procedure:
- "Tools" > "Internet Options"
- Select the "Content" Tab
- Under Feeds and Web Slices, select "Settings"
- Under Advanced section untick "Turn on Feed reading view". Refresh the request; you will see the details in XML format, something as in the following:
The following figure (from the MSDN documentation) shows the general syntax structure of SharePoint REST URIs. (Please refer to http://msdn.microsoft.com/en-US/library/office/dn292556.aspx for more details.) The following is the SharePoint REST URI syntax structure.
The following are some special cases that deviate from this syntax structure:
The following are some special cases that deviate from this syntax structure:
- Methods that require complex types as parameters.
- If the corresponding client object model method requires that complex types be passed as parameters.
- Static methods and properties.
REFERENCE : http://www.c-sharpcorner.com/UploadFile/d2ee01/sharepoint-2013-rest-services-architecture/
2 comments:
good job !!
What is the speed
Post a Comment