Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the Current Sharepoint Online REST API Work With ANY Other Versions of Sharepoint?

Tags:

The following (current/2018) REST API works great with the Microsoft hosted version of Sharepoint (https://yourcompany.sharepoint.com):

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service

Does anyone know if this SPECIFIC API also works with/supports Sharepoint 2016, 2013, and/or 2010?

like image 720
John Cruz Avatar asked Sep 10 '18 15:09

John Cruz


People also ask

How does REST API work in SharePoint online?

To use the REST capabilities that are built into SharePoint, you construct a RESTful HTTP request by using the OData standard, which corresponds to the client object model API you want to use. The client. svc web service handles the HTTP request and serves the appropriate response in either Atom or JSON format.

Does SharePoint support REST API?

REST API provides a flexible, lightweight way of interacting with SharePoint remotely by using any technology that supports REST protocol. With SharePoint API, you can easily perform basic Create, Read, Update, and Delete (also known as CRUD) operations.

Does SharePoint 2010 support RESTful?

SharePoint 2010 Web ServicesSharePoint 2010 provides a limited set of REST interfaces for developers who are familiar with that standard.

How does SharePoint REST API work?

The REST API is implemented as Data-centric web service based on the Open Data Protocol or OData. The way these web services work, use each resource in the system is addressable by a specific URL that you pass off to the server. Let us look at this in Internet Explorer in which SharePoint site is open.


1 Answers

That set of operations should work with Sharepoint 2016. SharePoint 2013 and SharePoint 2010 have its own set of REST operations. Of course the methods have evolved but the apis are quite similar. For example SharePoint Online (and on-premises SharePoint 2016 and later) REST service supports combining multiple requests into a single call to the service by using the OData $batch query option, but on SharePoint 2013 on premises batch was not supported.

In this link you'll find the list of operations and samples for the SharePoint 2013 REST API:
SharePoint 2013 - REST API reference and samples.

Please watch the video in the link as it's a good introduction on how the API evolved. One thing to notice is for example how the old WCF "REST" api changed from
- http://contososerver/_vti_bin/client.svc/web
to this one
- http://contososerver/_api/web

Here are some links for the documentation about the SharePoint 2010 "REST" API:

  • SharePoint 2010 - Using the REST Interface: How REST is implemented and some examples
  • List Items manipulation via REST API in SharePoint 2010: Basic example
  • SharePoint Foundation REST Interface: List of APIs that support REST

So to finish answering your question, that specific link wont work for SharePoint 2013 and SharePoint 2010 (Some examples might work, but depends on the operation/method)

like image 109
emmanuel Avatar answered Sep 28 '22 17:09

emmanuel