0

I've just started working with SharePoint 2013 on a company that uses a WCF service to return JSON data with .svc-files and custom classes. I got the task to populate a table with items from a List, and without looking at how they did it I used jQuery and AJAX to call the

http://sp/_api/web/lists/getByTitle('titlehere')/Items

to display the data. This works fine for me, but I've seen in many places that people are using the url http://sp/_vti_bin/Namespace/Service.svc/Method, as is the case with the company I'm at.

What are the differences and when should the two be used? As far as I reckon, you can use the later to manipulate the data more exclusively than when doing simple CRUD operations on the _api, even though it seem to support alot of operations.

I read on a blog that _vti_bin is older aswell. Does that mean I should focus on using the _api instead?

2 Answers 2

2

Probably you right, I guess custom WCF service (endpoint:http://sp/_vti_bin/Namespace/Service.svc/) is used to cover specific cases that does not seem possible to perform using standard SharePoint 2013 REST API or due to performance limitations.

But still, SharePoint 2013 REST API (_apiendpoint) should be considered as a preferred choice for a list items manipulation.

For example, the article Manipulating list items in SharePoint Hosted Apps using the REST API gives an explanation how to perform CRUD operations in SharePoint 2013.

0

_vti_bin was used in SP 2010 and can be used in SP 2013 as well whereas _api/web is preferred in SP 2013 and is not available in SP 2010

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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