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
1
vote
0 answers

Not getting folders in Sharepoint list

With Postman (standalone app) I try to get the folders from a SP Online list. So https://mydomain.sharepoint.com/sites/DocStorage/_api/lists/getbytitle('Demo') properly returns the data of the list. However, getting its folders…
yumeier
  • 33
  • 5
1
vote
1 answer

Can I dynamically populate my SPFx web part's property field with all choices from a choice field

I have a SPFx web part with one property named Department:- protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration { return { pages: [ { header: { description: strings.PropertyPaneDescription …
John John
  • 1
  • 72
  • 238
  • 501
1
vote
0 answers

How to grant access to a User on SharePoint document library/ list using Power automate or Rest API

I'm working on a automation where we want to give access to a requested user on a SharePoint document library and list. We are using Power automates for end to end automation but dint find any way to achieve the problem statement. Can i get some…
1
vote
1 answer

Getting list of all documents from share point

I am trying to implement functionality where I can get list of documents from share-point.I have tried this demo code from Azure directory implementation and login to account and also got details about sites and user data from graph…
1
vote
0 answers

SharePoint Search REST API - PrimaryQueryResult is null

I develop a SPFX WebPart that uses the SharePoint Search REST API. This SPFX WP is used in several tenants. The request is this below: { "request": { "__metadata": { "type":…
1
vote
1 answer

Graph query on SharePoint Libraray with Paging

I have libraries containing way more than 5000 files When using: https://graph.microsoft.com/v1.0/sites/3a8180fe-ca21-40a8-81e6-0950f5966f07/lists/DPC Documents/Items?top=499&$expand=fields&$filter=fields/FileLeafRef eq '0100.009_Client…
1
vote
3 answers

How to Update properties of a OneDrive item using REST API?

I am trying to update the properties of a OneDrive item using SharePoint REST API. OneDrive item web URL: https://vx13-my.sharepoint.com/personal/alexw_vx13_onmicrosoft_com/Documents/SrcDir/File-To-Update.txt Mainly looking to updating following…
1
vote
1 answer

Connect to sharepoint on premise site from my Asp,net

I'm trying to connect to SharePoint on-premise website using .NET Core, this website requires authentication I didn't find a way to connect to it most of the results on the net are related to SharePoint online.
someone
  • 139
  • 1
  • 12
1
vote
0 answers

REST API - MoveToUsingPath

I'm trying to move file on SharePoint from one site collection to another using Power Automate, but they can have special characters in their name or path. I wanted to use GetFileByServerRelativePath and MoveToUsingPath, that manage # and %. The…
1
vote
1 answer

Unexpected 403 in Sharepoint rest api list items roleassignments call

We created a sharepoint add-in with the follow permissions: My understanding is that an app with…
1
vote
1 answer

How to display two tables using Data Tables from two REST APIs in a single page?

I am working on Sharepoint REST API to show list items using Data Table in a HTML page. I wanted to show two tables in same page. So, I have two REST APIs and I'm able to show the first rest api data in first table. But unable to show the second…
Venkat Sai
  • 67
  • 1
  • 11
1
vote
1 answer

Can we create a SharePoint web-hook for any specific folder in a Document Library or for the Document Library itself?

I see in the documentation that we can create subscription web-hook on a list or on entire site. I want to know if I can create a subscription for a document library or some folder inside it.
1
vote
1 answer

Sharepoint REST API client console application C#

I'm looking for the examples to consume the Sharepoint REST API from a C# Console application (read a Sharepoint list to be more exact). There are some tutorials from MS website but they are incomplete in my opinion. For example, this one doesn't…
tala9999
  • 1,540
  • 2
  • 15
  • 25
1
vote
1 answer

How to create a new content type in SharePoint using MS Graph / REST?

I tried to add a new content type to list using MS Graph Explorer: Request: POST https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/contenttypes with body: { "description": "MyCustomContentType's description", "group": "List…
1
vote
1 answer

Get user performing action in Sharepoint CSOM

We are using SharePoint client object model (CSOM) and REST/OData endpoints to retrieve/manage data on sharepoint. Is there anyway to get information on the user performing the MOVE on a file (for example, move file from folder A to folder B within…
1 2
3
13 14