1
votes

I am trying perform operation on a SharePoint document library using REST on SharePoint 2010. Things i wish to achieve are 1) Query items from the library 2) Download/Upload Document from Library 3) Check out/ Check in items from Library

I have to do it all using REST service (for 2010 it is /_vti_bin/listdata.svc/). I am making all REST calls from javascript which will be finally on an ASP Web Site built on MVC.

I am able to get the list and single items using REST. Download URL is /_vti_bin/listdata.svc/myStore(id) or _vti_bin/listdata.svc/myStore?$filter= etc

My question is on how to download and upload documents to the list using REST on 2010. What would be the url link. Can this be done? I cant seem to find details about REST support for 2010.

Also hints on doing Check out Checkin using the REST API in 2010.

I am able to all this using Client Side Object Model in a c# windows app.

Any help is appreciated.

1
You can use Client Object Model with javascript as well. Why do you need to use REST?Luis
Hi Luis. From what i understand the requirement is for the ASP.NET WebSite to make direct calls to SharePoint Server to fetch and manipulate data. I will have to write my own API on server which used the client side object model and call that from my site(javascript) and then this would connect to SharePoint. If this is a definite limitation then it can make a case for moving to SharePoint 2013.Saurabh
Also from what i understand that the Javascript object model of SharePoint 2010 needs to be running on the page hosted in the SharePoint and not on any other site. Is this assumption correct.Saurabh

1 Answers

0
votes

At the link below, I was told to consider SharePoint 2010 REST services "as an experiment". For language agnostic applications, it was suggested I use SharePoint Web Services (SOAP). However, it is worth noting that I have successfully used SharePoint 2013 REST services for everything I need to access. 2013 seems to have fully exposed the Object Model through REST and the option for JSON responses, filtering data with $select, and expanding results with $expand is great. If you have to support SharePoint 2010, it looks like you're stuck with the SOAP solution. I'm finding that may be a bit limited as well but it's much richer what what the 2010 REST services provides.

http://social.msdn.microsoft.com/Forums/office/en-US/adf00d9c-5041-4bd7-9b36-9b86ecbce143/sharepoint-2010-rest-api-to-get-entry-permissions?forum=sharepointdevelopmentprevious