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

Best way to update documents metadata in a Sharepoint 2013 Document Library, through REST API

In a web application I am rendering a list of documents coming from a Sharepoint 2013 Document Library (the number of documents can vary, approximately, from 5 to 50). The user needs to be able to sort this documents from inside the application, and…
1
vote
1 answer

How to differ Site Page and Wiki Page in MS Graph or SharePoint REST API

I created a SharePoint Page in SitePages library using the new SharePoint online experience. The page was created and I tried to fetch the page properties using MS Graph…
1
vote
1 answer

Unknown Errors with JSOM API - Sharepoint 2013 (Adding multiple, unique site columns to multiple, unique content types)

I've been through a couple iterations on how to do this, and I'm not sure exactly what is going on. I'm currently working on an administration tool that will allow easy duplication of our SharePoint sites. I've been faced with the task of adding…
1
vote
0 answers

Fetch all the task links of a Project with Start - Id and End - Id of every task link

My requirement is to fetch all the task links of a Project with Start - Id and End - Id of every task link. Currently I'm only able to fetch LinkId, ProjUid, Lag and Dependency type using REST API -…
1
vote
0 answers

SharePoint REST API TimeCreated and TimeLastModified properties are different even if a file wasn't modified

I uploaded a file to a user's OneDrive and than I used SharePoint REST API to fetch the file information. I used the following endpoint: https://*-my.sharepoint.com/personal/*/_api/Web/GetFileByServerRelativePath(decodedurl='*file-path*')/ The…
1
vote
2 answers

Deployed web part is showing errors in console but not for non-local workbench

I have deployed a web part to a site collection (where the web part is designed to go) and I am getting errors for 3 particular features on the form. I am using sp.web for these features. I have created a 'Hello User' which uses this…
NightTom
  • 418
  • 15
  • 37
1
vote
1 answer

Filter dates in sharepoint list with REST API

I just created a workflow using Sharepoint Designer 2013 and I getting the error shown in yellow What do I have to change in the Call HTTP web Service string builder to make it work? regards, Elio Fernandes
1
vote
2 answers

SharePoint Search REST API returns inconsistent Total Rows Count

We are a building a custom web part with pagination feature. To implement this feature we are getting a total rows count and showing the possible number of pages. While implementing this, we are running queries using the startRow and rowLimit query…
1
vote
1 answer

Why User Id gotten from sharepoint siteusers api or clientPeoplePickerSearchUser api different from sharepoint Task AssignedToId?

Im trying to create a task using sharepoint rest api, in doing so Im trying to add assignee as well which is done through adding AssignedToId. The user Id I get for a particular user using the user information api or clientPeoplePickerSearchUser api…
Ali Altaf
  • 11
  • 3
1
vote
0 answers

SharePoint Create modern Team site with REST

Regarding this article its possible to create a modern team site via REST. I now got a valid token via Client Credential Flow and try to execute the following REST operation: Method: POST Url:…
David Mason
  • 329
  • 3
  • 14
1
vote
0 answers

SharePoint REST API: all values of checkbox group and GET/POST

Using SharePoint REST API, have a Bootstrap/HTML form that has about 20 questions, each with it's own group of checkboxes, and I'm trying to both Get and Post the values from the "checked" boxes. I can get one of the checkbox values of a group to…
damooji
  • 21
  • 1
  • 4
1
vote
1 answer

Access SharePoint Online via REST API

Having problem with accessing sharepoint via rest api. Hi! I'm trying to use REST API to access company SharePoint Online in Python. For instance, the SharePoint folder I want to access is:https://company.sharepoint.com/sites/sitename/foldername. I…
Celine
  • 11
  • 1
  • 2
1
vote
0 answers

Metadata changes after moving a file with "moveTo"

I tried different ways to move a file from one library to another library on the same site (SharePoint Online). The file is moved but the modified date and modified user are overwritten. Worse the modified user is changed for all history versions…
1
vote
0 answers

How to retrieve file versions content using SharePoint REST API

I am not able to fetch file content of different versions using Bearer token. I tried to get content by using this endpoint: https://{host}.sharepoint.com/_vti_history/{version-id}/{file-path} and I got such a response: 401 UNAUTHORIZED However, I…
1
vote
2 answers

Is there any way to verify whether given URL is a valid SharePoint List / Library Url?

I have a requirement to ask user to type in the URL of the SharePoint List or library and do validation whether that is a valid list or not. The URL could be of other site collection / subsite too. What is the best way to check if its a valid list…