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
0
votes
1 answer

Sharepoint rest api - Create field and add to all content type

i am able to create a new field in a sharepoint list using the "createfieldasxml" method of "fields" endpoint. There is a way to add this field to all content type, and not just to the default content type? The other way i thought is to add manually…
0
votes
1 answer

Get file in a subfolder with sharepoint api

I have a sharepoint file structure that looks like this: MainFolder -> SubFolder -> FileFolder -> myfile.txt I am able to retrieve the MainFolder metadata using the api…
Dandydon
  • 103
  • 2
  • 11
0
votes
1 answer

Sharepoint Authorization token use in REST api

I am working on a way where i can use sharepoint document url directly without any authentication required from users. For this i have got Authorization token from REST API of sharepoint successfully. But when I am trying to use this token then i…
Annie
  • 2,397
  • 3
  • 18
  • 26
0
votes
1 answer

Sharepoint REST Api list not found when it's still available under the site

I am using Microsoft.SharePointOnline.CSOM. Authentication works fine and I can get the following api to work fine. https://company.sharepoint.com/sites/{site}/_api/lists This gives me results and that shows my integration/authentication works…
user2058413
  • 691
  • 3
  • 10
  • 28
0
votes
1 answer

sharepoint REST API - share document

Does anyone knows how to use REST API to share a document in sharepoint to someone inside the same organization and external user ?
0
votes
1 answer

Sharepoint powershell cmdlets with Node/SPFX

I'm administering a Sharepoint Online site right now. Is there a way to run Sharepoint powershell cmdlets externally from SPFX/ NodeJS. I'm trying to create a UI for disabling versioning for a document library. Seems that disabling versioning could…
0
votes
1 answer

Sharepoint API: Disable versioning of a document library

Is there an endpoint to enable/ disable versioning for a document library? I'm using sharepoint online right btw
0
votes
1 answer

How to get multiple template types list in SharePoint using Rest

I am trying to list all the custom lists and events list. here is my code in the URL url:"http://example.com/_api/web/lists/?filter=BaseTemplate eq 100 and BaseTemplate eq 106 and Hidden eq false" if I do only one template it works but when I do…
0
votes
1 answer

SP 365 rest search api return '500 internal server error' for using HTTP POST

Our product uses SP 365 search api. Several of our customers report that when using the following search API: '/_api/search/postquery' with body: {'request': { 'Querytext':'test', …
0
votes
1 answer

retrieve all files in subfolders in sharepoint document library using REST

I have a folder in a document library and that contains subfolders and each subfolder contains files. I want to retrieve all the files in these subfolders using REST. I know how to get the files in each folder but is there any way to get all these…
someone
  • 139
  • 1
  • 12
0
votes
1 answer

How do I check user access for given SharePoint site using power automate

I have a requirement to write a Flow using power automate. The requirement is to check if a user has access to given SharePoint site. Here SharePoint site address will be given as input. I'm wondering how to achieve this using REST API in power…
0
votes
1 answer

How do I use Graph API in C# using Http requests and responses?

I previously used Microsoft.graph package to work with Graph API. Used client credentials to authenticate as an application and able to get site details and others also with below code snippet. GraphServiceClient graphClient = new…
0
votes
1 answer

Scope "allsites.write" doesn't exist on the resource

I'm trying to set up programmatic access to a corporate Sharepoint Online site from a desktop app. My org has an Office 365 subscription. I've set up a registered app in the Azure portal, granted the AllSites.Write permission: Now, I'm trying to…
0
votes
1 answer

How to use SharePoint rest API with Client ID and Client Secret in C# to get site collection?

Is there any way to connect SharePoint Rest API with Client Credentials in C# to get site classifications? I previously used Graph API to get those collections, but I need the same using SharePoint Rest API. IConfidentialClientApplication CCA =…
0
votes
1 answer

Create Modern Calendar view for SharePoint Online List using the REST API

I've been trying to create a modern calendar list in SharePoint using the REST API through Power Automate. When using the UI, the only way I've seen how to do this is by first creating a modern list, adding Start and End Date fields, then creating…