11
  1. What is difference between listdata.svc and clients.svc in SharePoint? Both are webservices and can be used to fetch list items..

  2. I have read that any serverside object model or clientside object model or javascript model internally makes calls to the clients.svc, is this true?

13

Sharepoint Client OM uses Client.svc WCF service to communicate with SharePoint Server. Client.svc service uses Server OM as per client request and return result to the client in JSON format. So your 2nd point is correct clientside object model or javascript model internally makes calls to the clients.svc. Serverside side object model does not use client.svc.

While To get the data from Sharepoint list via REST we use listData.svc.

http://<sharepoint-server>/_vti_bin/ListData.svc/<ListName>

For more details:

http://msdn.microsoft.com/en-us/library/office/jj164060(v=office.15).aspx

  • To get the data from Sharepoint list via REST we can also use the _vti_bin/clients.svc which is nothing but the /_api/. Then, what is purpose of listData.svc, it is for backward compatibility with 2010 only? – variable Jul 16 '14 at 5:20
  • 1
    You can target either the listdata.svc (for list data only) or you can target the same client.svc that supports the OData interface for access to all SharePoint entities in addition to list data. – Aanchal Jul 16 '14 at 5:23
  • Yes, ListData.svc is only there for backward compatibility where clients may have been written against earlier versions of SharePoint. Use _api (i.e. _vti_bin/Client.svc) for REST calls moving forward. – SPDoctor Apr 18 '15 at 20:33
12

ListData.svc - only if list data is needed
Client.svc - List data and oData operation

The "_api" is friendly name, since it's easier to read. The old SharePoint 2010 /_vti_bin/ListData.svc is still there in SharePoint 2013, and is handy if only List data is needed.

In SP2010 - /_vti_bin/ListData.svc
In SP2013 is replaced
From: /_vti_bin/Client.svc
To: /_api/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.