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

Setting up sharepoint rest api as backend in Azure APIM

We are trying to setup sharepoint rest api in Azure apim backend. We set up the following apim policy. It is receiving the client token, but , not able to successfully execute rest call in the sharepoint. I am not sure whether we are on the right…
ninja12
  • 15
  • 2
0
votes
2 answers

Get an access token to Sharepoint and GraphAPI

I'd like to access both the Sharepoint Rest API and the GraphAPI using an access token acquired using the MSAL.js library. I always get Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown. On Sharepoint…
0
votes
1 answer

How we can monitor users activity on SharePoint online without external analytics?

How can we monitor users activity on SharePoint online pages, such as viewing viewing video or viewing PowerPoint or pdf or reading content on pages and also times that users stay in specific page? I want to do this without any external analytics ?
0
votes
1 answer

List sharepoint sites with communication or team site type

I am working on microsoft-365. Is there any api(graph,sharepoint Rest etc.,) to list sites along with the type of site whether that is a communication or team site.
0
votes
1 answer

How can I download a file from OneDrive into Angular application using Typescript?

I have an Angular application that is using OneDrive/Sharepoint to store files it has created. Authentication is working correctly and I can save my files successfully. I am having a problem with downloading the file that I created and stored using…
glenatron
  • 11,018
  • 13
  • 64
  • 112
0
votes
0 answers

How do I determine what is expandable and what you can expand with ODATA via the SharePoint REST API?

Take this odata query for example: _api/web/lists/getbytitle('Site')/items?$top=10&$orderby=Id asc&$select=Id,Title,URL,AuthorId,Author/FirstName,Author/Lastname&$expand=Author What gives away that you can expand the "Author" with FirstName and…
0
votes
1 answer

Get item Count from multiple mentioned list based on search query

I have 3 Sharepoint lists named has list1 list2 and list3 there are 2 common fields in all the lists. I want to get the itemscount/items from all the this 3lists && filtering the data with 2columns EX- Get count of Items/ItemCount from 3lists where…
0
votes
0 answers

How to upload files to SharepointOnline using curl on Linux

I am trying to automate file uploads to SharePoint Online. Problem is I keep getting 401 unauthorized error when trying to upload the files. I created a script to retrieve the token as suggested in curl request to Microsoft Sharepoint API?, but…
0
votes
1 answer

SharePoint REST API Online batch request issues : getting 400 Bad Request, odata.error Invalid request

I'm having a bit of trouble isolating a batch request using the _api/$batch request. I'm sure there is just some simple mistake/issue going on, but I can't just pinpoint this. Any ideas? Here are some snippets of the raw postman console logs for…
0
votes
1 answer

Uploading files of different sizes on sharepoint office365 REST Python Client

I want to upload some files to sharepoint via office365 REST Python client. On documentation on github, I found two examples: one for larger files where this is executed: uploaded_file = target_folder.files.create_upload_session(local_path,…
0
votes
2 answers

SharePoint API GetFolderByServerRelativeUrl will not work yet GetFileByServerRelativeUrl will work

For some context, I am using sp-rest-proxy to make a tool which will get, modify and replace json data from SharePoint (MS 365) with a react interface. After figuring out the authentication issues I now have this issue preventing me from updating…
C.J. Morrison
  • 21
  • 1
  • 5
0
votes
1 answer

Custom SharePoint authentication form - problem with displaying error messages because of page refresh

I'm trying to create custom form authentication page for SharePoint Server based on default .aspx one: <%@ Assembly Name = "$SharePoint.Project.AssemblyFullName$" %> <%@ Import Namespace = "Microsoft.SharePoint.ApplicationPages" %> <%@…
0
votes
1 answer

Query Sharepoint Online using REST API and passing the query in the body (POST)

The URL length limit is causing me issues when I call the end point /_api/Web/Lists/getByTitle('ListName')/items: if I have too many parameters, the URL length is too long and my request is not treated. I know we can pass a CAML query to the…
AymKdn
  • 3,327
  • 23
  • 27
0
votes
1 answer

Filter a Sharepoint Online DateOnly column in REST API without the time

I have several date only columns (no time can be selected) that return either "YYYY-MM-DDT05:00:00Z" or "YYYY-MM-DDT06:00:00Z", which makes things odd and difficult to deal with. Example: I don't know why the timepart is different… How, with REST…
AymKdn
  • 3,327
  • 23
  • 27
0
votes
1 answer

How to GET/POST SharePoint list/library data out side of SharePoint?

I need to POST data in the SharePoint list from outside of SharePoint. I have created an Angular application and I need to POST data in the SharePoint list using the Angular application with REST API or PnP/JS. Can anyone help me with the…