What is difference between listdata.svc and clients.svc in SharePoint?
-
29-09-2020 - |
Question
What is difference between listdata.svc and clients.svc in SharePoint? Both are webservices and can be used to fetch list items..
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?
Solution
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
OTHER TIPS
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/