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

2

18

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.

Exeter answered 25/10, 2018 at 2:30 Comment(1)
For reference, entry point for developers: docs.microsoft.com/en-us/sharepoint/dev. The links mentioned are categories on SharePoint API’s page that has SharePoint API index listing objects which, when clicked, display methods and properties. Those pages say ‘We're no longer updating this content regularly...’. The ‘SharePoint REST API v2` link references Microsoft Graph (API reference here)Antimony
H
19

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

Hazelhazelnut answered 25/10, 2018 at 2:41 Comment(6)
Thanks! Lee for the fast reply. This is what i need !Exeter
This is only for SharePoint 2013. Is there for Online and newer versions of the SharePoint? I can't find... :( There are some more new endpointsCarrack
@Carrack - learn.microsoft.com/en-us/sharepoint/dev/apis/… which links to learn.microsoft.com/en-au/graph/api/… and video intro is here: youtu.be/PI9NO5rayiYAntimony
@Antimony I know this link for the Microsoft Graph Rest API. I wanted the old school SHP Rest API with all endpoints. Not every endpoint is described and sometimes I have to search on google. There were added new after SHP 2013 (they don't update anymore this link :(Carrack
@Carrack - I can only see two API versions mentioned on this page, V1 which has API index here, and V2 (which is graph)Antimony
Does this support basic auth? or only accesstokens ?Thankful
P
1

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)

Particia answered 31/3, 2022 at 10:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.