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

Pnp.js Access to sub site

I use PnPJS within an REST API route like this: pnp.sp.web.lists.getByTitle("t").reserveListItemId().then(v => { pnp.sp.web.lists.getByTitle("t").items.add({ ID: v, Title: v.toString(), }).then(function (Data) { // codes …
0
votes
1 answer

How to add 1 (increment) to the current value of a SharePoint list number field using the rest API

I am implementing a custom solution on SharePoint Online, and, I want to add 1 (increment) to the current value of a specific field number (TotalViews) using rest API. Here is my code: function UpdateViewsinHow(param) { var data = { …
0
votes
1 answer

How do I convert my response with byte characters to readable CSV - PYTHON

I am building an API to save CSVs from Sharepoint Rest API using python 3. I am using a public dataset as an example. The original csv has 3 columns Group,Team,FIFA Ranking with corresponding data in the rows.For reference. the original csv on…
0
votes
0 answers

Sharepoint document library custom properties are cleared on file upload

I have a Document Library with custom properties: Internal id, customer id, etc. Those properties are not standar names like Title as we know those are sometimes populated by Sharepoint. The properties are also not present on the documents. To be…
0
votes
2 answers

How to get file comments using Sharepoint rest api

I'm using the following api to successfully get file data: https://acme.sharepoint.com/sites/my-site/_api/Web/Lists(guid'xxx')/files('yyy') This is a docx file on which I've posted comments using the web console. How can I fetch these comments…
Mugen
  • 8,301
  • 10
  • 62
  • 140
0
votes
1 answer

accessing sharepoint SP.js from react js Single page app

I have built a Single page application. I have deployed the html file to the root of the sharepoint site and js files are stored in the Assets Library. They are referenced from there. I am trying to check if the current logged in user has access to…
0
votes
0 answers

SPFx Command Set: Post a document library file from SharePoint online to an external API

Dears, I'm developing a SharePoint Online extension (spfx) using react framework with a command set behind which two actions are linked. Action1 Retrieve a file (doc, Excel, Pdf or ppt) from a Document Library on SharePoint online via SharePoint…
VDU
  • 1
  • 1
  • 2
0
votes
0 answers

SharePoint Change Log API Attachments

I tried to get the details of Share point rest API for change_log for list or events Attachment Files, if user make any changes in the list item we can easily fetch those details by using getbytitle('List')/getChanges rest API. The same way is…
0
votes
0 answers

How to select any property on an expanded list?

I have an SPFx customization that uses the SharePoint REST API to query a list and expand and select properties of one of its child lists. The request looks something like…
ChiefTwoPencils
  • 13,548
  • 8
  • 49
  • 75
0
votes
1 answer

SharePoint Access token has two different scope values for tenants

when I decode SharePoint access token for Tenant A and B it shows as below for the tenant A "scp": "AllSites.FullControl User.Read User.ReadBasic.All" for the tenant B "scp": ".1f7f4061-caa1-44c4-b29a-6d877e9a5211" are there any possible…
0
votes
0 answers

Access subsite from parent site using sharepoint rest api

I am trying to get all the folders in the subsite, the below URL returns all the folders inside my subsite when I use the subsite in the URI I am using Mulesoft on new object oob sharepoint…
0
votes
1 answer

How can I check all 15K rows in a SharePoint list using Power Automate flow

I have a SharePoint list that contains approximately 15000 records. My list has an Owner field for each record. There can be many owners of many different records. However, there can be only one owner per record. Each day people access this list and…
M_66
  • 299
  • 5
  • 19
0
votes
2 answers

How to find Site Owners in SharePoint Online via SharePoint REST API/Graph API

I'm trying to find all users that are permitted to access a site in SharePoint Online. I can do that via the SharePoint REST API using the following…
0
votes
2 answers

Update 'date' column using 'ValidateUpdateListItem' endpoint

I am trying to update SharePoint document's metadata using '/GetFileByServerRelativeUrl('/sites/sitename/doclib/doc.txt')/ListItemAllFields/ValidateUpdateListItem' endpoint within my (.netcore) webapi. This requires the date to be in specific…
Muhammad Murad Haider
  • 1,357
  • 2
  • 18
  • 34
0
votes
1 answer

Why is my code to download files producing a 404 error?

I have created an app, generated client credentials, and trusted the app for my SharePoint online site. I have created a file test.txt and it is placed under…
Pro
  • 305
  • 3
  • 13