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

Is there a way to retrieve file from SharePoint without file name?

I know how to retrieve a file with a specified name like this: HttpGet httpGet = new HttpGet(siteUrl + "_api/web/GetFolderByServerRelativeUrl('Shared%20Documents/Working%20Files/FolderName')/Files('" …
Martina Carter
  • 409
  • 5
  • 18
0
votes
1 answer

Trying to get hyperlink list item SharePoint 2016 REST API

I am trying to retrieve a hyperlink list item from inside my angularjs controller. app.controller('myController', function($scope, $http, $filter) { method: 'GET', url:…
jaysonn
  • 105
  • 9
0
votes
2 answers

Can't preserve document core metadata (Created By, Modified By) when I import documents to SharePoint Document Library

I'm currently building a tool to migrate from a document management system to use SharePoint Online. The main challenge I'm facing is to preserve the details of document authors and creating time. I have checked bunch of of code online but I didn't…
0
votes
2 answers

Load Content from SharePoint Library Folder by Created Date Order on Webpage using Javascript

I’m working with SharePoint and I’m able to load content from a library and display it on a webpage as a link, using REST API. I figured out a way to arrange the content in the order the documents are uploaded into the folder by the “Created Date”,…
TonyT
  • 407
  • 4
  • 19
0
votes
1 answer

How to retreive ListItem using "RenderListDataAsStream" endpoint in SharePoint 2013

This is my ajax call to retrieve list data using RenderListDataAsStream end point. var payload = { 'parameters': { RenderOptions: 2 } }; $.ajax({ url: _spPageContextInfo.webAbsoluteUrl +…
0
votes
1 answer

How to access all document libraries/folder/files in a sharepoint online site

Below api is not returning lists/document libraries/folders/files for any site(root/created by me) and subsites. {{url}}/_api/web/lists I need an api so that I can fetch all content of a site just like there are api's for MS…
0
votes
2 answers

Get role inheritance state for document library in SharePoint Online

I work with SharePoint Online drives(document libraries) with Microsoft Graph API (/drives call). With this API I can download/upload files but cannot work with permissions. That's not a problem - I can do it with SharePoint Online REST API (with…
0
votes
1 answer

Odata sharepoint rest api filter

I am trying to retrieve folders in a sharepoint list where folder name starts with https://**.sharepoint.com/_api/Web/GetFolderByServerRelativePath(decodedurl='/Salesforce')/Folders?$filter=Name startswith ‘abc’ error { "error": { …
0
votes
1 answer

SharePoint API CAML View: Even with a rowlimit when I include a Query in the CAML I get a list threshhold error

I'm not sure I have a syntax error here in my CAML Query or I am misunderstanding how the API works but I have a very large document library in which I am trying to identify items that have had no compliance / retention label set. My query is trying…
andy moore
  • 89
  • 2
  • 11
0
votes
1 answer

How can I get list items by view name, using REST API ajax?

I tried to get a list of items from the Sharepoint library by view name. I had ajax rest API URL: url: webapp + "_api/web/list/getbytitle" + "('" + LibraryName + "')/View/getbytitle" +"('" + viewName +…
Sang Tran
  • 47
  • 1
  • 7
0
votes
1 answer

SPFX React Updating Document Library file metadata using Rest API 404 issue

I have created a SPFX Extension on a library and trying to update file metadata which is inside a specific folder in document library. I have the item ID for that particular file, but getting 404 issue. Here is the sample code which have been…
Vijay
  • 133
  • 1
  • 10
0
votes
1 answer

Sharepoint REST API access token does not return all sites

I am trying to get all the sites in Sharepoint Online using a Sharepoint Add-in App's access token. When I do so I only get 17 of the 35 sites that I can see when viewing all of the sites in the admin portal. It's also worth noting that when I use…
fei0x
  • 4,259
  • 4
  • 17
  • 37
0
votes
2 answers

Sharepoint Online REST API connection

I am trying to connect from Java to the Sharepoint Online REST API. I previously used a SharepointOnline ADD-IN registered directly in the Sharepoint system that has permissions to all the site collections (FullControl). I got the token with the…
0
votes
1 answer

Sharepoint online/365 integration (To upload files) on React app hosted on Azure and WebApi C# .Net Core 2.2

I'm struggling since some weeks ago trying to interact/automate a way to upload files from a Web App created in React and upload files to a Sharepoint Online Site – in a specific folder. The WebApp is hosted in Azure and using a C# .Net Core 2.2 as…
MiBol
  • 1,985
  • 10
  • 37
  • 64
0
votes
4 answers

How to update and create item using same method using sharepoint rest api

I have a requirement where I need to update the list item if it is already exist and create a new one if the item doesn't exist. Everything I need to manage from single method as I am taking data from custom form to update item. Is there any way to…