What is REST?
REpresentational State Transfer (REST). specifically the standard HTTP verbs of GET, PUT, POST, and DELETE. For example most of the MS Technology uses REST even MS Azure Platform API’s are developed as REST API’s.
In SharePoint 2010 we can access all SharePoint List via Restful Service. Here is the URL to access List REST Service.
http://YourServer/SiteUrl/_vti_bin/ListData.svc.
The Below screenshots shows my site Lists REST Service Entities.
http://win-m2ircoq6iqa:44119/_vti_bin/Listdata.svc/Sreenicontacts ( REST Query to get all Contacts from SharePoint List called SreeniContacts.)
Accessing 20nth contact from the SreeniContacts .
http://win-m2ircoq6iqa:44119/_vti_bin/Listdata.svc/Sreenicontacts(20) ( REST Query)
http://win-m2ircoq6iqa:44119/_vti_bin/Listdata.svc/Sreenicontacts(20)/Fname ( REST Query for accessing Fname only)
http://win-m2ircoq6iqa:44119/_vti_bin/Listdata.svc/Sreenicontacts(20)/Fname/$value ( REST Query for accessing Fname Value only)
The following REST query returns total number of items form the list http://win-m2ircoq6iqa:44119/_vti_bin/Listdata.svc/Sreenicontacts/$count
Like Silverlight SharePoint also can cross Platform as well .
Nandri(Thanks)
SreenivasaRagavan.
11 comments:
Thanks for posting this. Nice basic example to show the usage of REST in SharePoint 2010.
Hello,
Great post-
"The following REST query returns total number of items form the list" http://win-m2ircoq6iqa:44119/_vti_bin/Listdata.svc/Sreenicontacts/$count
When tried at our end, there seems to be a limit of returning only 1000 items from the list at one shot. How to get the complete list? or there is a limitation? Any supported way?
Can this be use to perform advanced activities such as uploading images or adding a list item to a list with lookup column that allows multiples ?
Thanks for the info on $count. I had no idea REST could do this until someone pointed me to the blog post. Is this documented anywhere?
Custom fields, 'Person or Group' are not available for a list using rest service. is there any way to access custom user fields for a list using this.
Can I simply say what a aid to seek out somebody who really knows what theyre talking about on the internet. You undoubtedly know methods to deliver a difficulty to mild and make it important. Extra people must read this and perceive this side of the story. I cant believe youre not more popular because you undoubtedly have the gift. slots for real money
Post a Comment