Questions tagged [sharepoint-rest-api]

Using the Representational State Transfer (REST) interface provided by SharePoint. SharePoint has multiple APIs based on technology sets. This tag should be used when the question is specific to SharePoint's REST API to differentiate from other SharePoint APIs and customizations.

You can perform basic create, read, update, and delete (CRUD) operations by using the Representational State Transfer (REST) interface provided by SharePoint.

The REST interface exposes all of the SharePoint entities and operations that are available in the other SharePoint client APIs. One advantage of using REST is that you don't have to add references to any SharePoint libraries or client assemblies. Instead, you make HTTP requests to the appropriate endpoints to retrieve or update SharePoint entities, such as webs, lists, and list items.

For more details on the SharePoint REST API, see
- https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints
- https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph

see also: , ,

203 questions
2
votes
0 answers

MS Graph lastModifiedDateTime and SharePoint REST API TimeLastModified are different for the same file

I uploaded a file to a user's OneDrive using the Web Interface and then I fetched the file information using two APIs: MS Graph API and SharePoint REST API. For MS Graph API I used the following…
2
votes
0 answers

Can't get items from an external list

I want to get external list items, but I get 403 Access denied. I have an external list in my site. According to documentation https://learn.microsoft.com/en-us/sharepoint/dev/general-development/bcs-rest-api-reference-for-sharepoint I can work with…
2
votes
1 answer

Sharepoint Online REST API System.UnauthorizedAccessException when trying to get SiteGroup/Users

I'm trying get SiteGroup/Users from Sharepoint Online, by calling this REST API: /_api/web?$expand=webs,lists,AllProperties,ThemeInfo,SiteUsers,SiteGroups,SiteGroups/Users,RoleDefinitions&$select=* While on some customers sharepoint sites it's works…
SlavaG
  • 518
  • 8
  • 28
2
votes
1 answer

accessing sharepoint list using REST api with angular gives 403

I am trying to make call to sharepoint LIST REST APIs. I am logged in to sharepoint and when in browser i type like https://myserver.sharepoint.com/sites/mylist/_api/lists/getbytitle('OEC_Docs')/items It returns me data in the browser as expected.…
Vik
  • 8,721
  • 27
  • 83
  • 168
2
votes
0 answers

Sharepoint Office365 REST API not working in browser

I'm trying to read data from our Office365 Sharepoint site (on ourserver.sharepoint.com) and use it in a customer site I'm developing that is currently running on my localhost. I've extracted the X-RequestDigest header from a successful connection…
2
votes
0 answers

How to finish Sharepoint Online Remote Login with obtained Security Token using PHP Curl

I am attempting to authenticate to a Sharepoint Online instance with an obtained security token for an account. I have found various places discussing this but get hung up when actually trying to pass the token to sharepoint to login. Here is my…
2
votes
1 answer

Promote SharePoint News

I have a good level of experience with SharePoint but I cannot find a piece of information. I am planning on generating News articles and pushing them to SharePoint based on another system we have. The part i'm not so sure on is how you get the…
Truezplaya
  • 1,315
  • 1
  • 13
  • 26
2
votes
3 answers

SharePoint Get all sites and all sub sites using SharePoint online REST API

For SharePoint Online connector We used following steps to fetch all sites: Step 1: Created Add-in on SharePoint instance with following permission xml
Darshan Patel
  • 3,176
  • 6
  • 26
  • 49
1
vote
1 answer

Sub-Site creation delays via REST API method

I need to create SharePoint Sub-Sites under a Site Collection from a Java application. The first set of Sub-Sites were created in a few seconds per Sub-Site(parent Site). As more and more subpages are being created, the process gets slower and…
1
vote
0 answers

Updating Item in Sharepoint List with HttpClient through API fails with 403 FORBIDDEN (create and delete is working)

I try to do some CRUD operations on a sharepoint list, unfortunately I cannot update an item in the list. Since I can create and also delete items from the list, I think everything is fine with authentication and rights, but maybe I am not aware of…
Helmut
  • 426
  • 3
  • 14
1
vote
1 answer

Connecting to SharePoint with Certificate Authentication using Python

I am trying to connect to SharePoint Online using Python using Certificate Authentication using https://github.com/vgrem/Office365-REST-Python-Client If I connect to the root of my SharePoint, it works. But if I try to connect to any specific site,…
1
vote
1 answer

Sharepy library freezes at entering username in PyCharm

I'm trying to authenticate to SharePoint Online. Using sharepy v 2.0, pyCharm community edition, and python 3.9. When I run: 'sharepy.connect('siteurl')' From within PyCharm, Sharepy will freeze after I input my username in the run dialog box. If…
1
vote
0 answers

Sharepoint REST API - post comment on behalf of another user

There is a way of how to add comments to Sharepoint site using REST API. It is explained here https://beaucameron.com/2021/01/18/add-comments-to-sharepoint-list-items-using-the-rest-api/ for example. But when I add comment like this, it adds it on…
kosist
  • 2,868
  • 2
  • 17
  • 30
1
vote
0 answers

SharePoint REST API Setting CheckoutUser using ValidateUpdateListItem()

I am trying to update the CheckoutUser for a file in SharePoint because when the file is checked out in my code, it is being checked out by a SharePoint admin account and I want the CheckoutUser to show the person who actually checked it out.…
1
vote
1 answer

Upload file to SharePoint through rest API Postman

Using Postman Url:https://test.sharepoint.com/sites/testIntranet/_api/web/GetFolderByServerRelativeurl('testIntranet/BMT')/Files/add(url='114934-image.png',overwrite=true) error: Access denied when using this url without /web :…
1
2
3
13 14