NaaHCat
NaaHCat

Reputation: 500

Is there a complete list of sharepoint online rest api from official docs?

As title said, Is there a complete list of sharepoint online rest api from official docs?

I've done some research. However from the MS docs I can only find Complete basic operations using SharePoint REST endpoints and Get to know the SharePoint REST service.

Or maybe there just isn't one for the current Sharepoint Online implementation from official docs which have REST api reference and samples.

I was consider using MS graph as well, however it seems at the moment, the operations exposed by the Graph for SharePoint are very limited when compared to the native SharePoint REST API.

If there is a list, please share.

Upvotes: 19

Views: 56377

Answers (2)

Marcin Beza
Marcin Beza

Reputation: 41

If you have been authenticated (e.g. have an access token) and you can use the SharePoint API, then you can get a list of available endpoints for GET requests:

https://[tenant].sharepoint.com/[site]/_api/Web

The first part of the response provides a list of endpoints that you can explore further. [site] can be requested at any level (there can be many subsites below).

For example:

https://[tenant].sharepoint.com/[site]/_api/Web/SiteUsers

will allow you to display a list of users on a site and other possible endpoints, and

https://[tenant].sharepoint.com/[site]/[subsite]/_api/Web/Lists

will display all the lists that belong to the given subsite.

Unfortunately, I was not able to get a list of endpoints for POST requests such as: _api/web/lists/getByTitle('Documents')/breakroleinheritance(copyRoleAssignments=false, clearSubscopes=true)

Upvotes: 2

Lee Liu
Lee Liu

Reputation: 2091

REST APIs of SharePoint are conformed to the specification of OData, we can use it like we use other OData APIs.

Here you go:

REST API reference and samples

More information about OData, we can refer to: OData - the best way to REST

Upvotes: 21

Related Questions