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

Update SharePoint List Item using Rest API and HTML Input Element

I am having a difficult time trying to get my below script to work for updating items on my SharePoint list “ProjectTracker”. I researched and tried several similar methods, but I can’t seem to get the any script version to update the list item(s).…
TonyT
  • 407
  • 4
  • 19
0
votes
1 answer

How to obtain ACLs for different sharepoint sites

Using the graph API or sharepoint REST APIs, is there a way to obtain, for each site, the list of users/o365 groups that are allowed read access to the site? We are able to obtain the list of sites using the graph API GET /sites?search=* but cannot…
0
votes
1 answer

Update empty field to contain value - rest API

So I have a snippet of code that will update a field value if the field has content, although if the field that I'm trying to update is null than the value won't update. Am I doing something wrong? siteURL = _spPageContextInfo.webAbsoluteUrl; …
user2602844
  • 133
  • 1
  • 6
0
votes
2 answers

Update Infopath Form Library values through rest api or jsom?

Is it possible to update infopath form library field values programmatically either through rest api or JSOM? If so can you provide a sample? I've tried it both ways, and both times I'm getting success messages although the moment I review the form…
0
votes
0 answers

Error updating person group field using "Send Http Action" in flow

I am trying to update person/group column using power automate . I am getting below error An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected. clientRequestId:…
G_S
  • 85
  • 1
  • 11
0
votes
0 answers

Hitcounter for HTML5 Embedded Video - Adding User Name, Video Title and Date Viewed to a SharePoint 2013 List using Rest API

I found and use this wonderful Rest API script to create a Hitcounter for my SharePoint Site page, which works as advertised. It adds the Page URL, Viewer’s Name, and Date to a SharePoint List and display the count in a div on the site page. I…
0
votes
1 answer

Sharepoint REST API via app-only principal suddenly stopped working

We are using the Sharepoint Rest API to index contents. Due to a customer's security requirement, we can only use API permissions as granted in the Sharepoint Admin Center in combination with an app-only principal with a secret. We registered an…
0
votes
1 answer

Sharepoint Online REST strange error (400) - "Value cannot be null.Parameter name: key"

Since Sep 9, 2020 we started to get strange error on REST API call to get list of sub-sites and their lists: GET
SlavaG
  • 518
  • 8
  • 28
0
votes
1 answer

SharePoint REST API for Sharepoint online retrieving items from a list/document library which exceeds 5000 items

I have SP online list/document libraries which are going to exceed 5000 items threshold limit. I have created index columns. Question: I have a custom form, where I will retrieve the data from the list to show up on the form. Will the rest API I am…
0
votes
1 answer

Which SharePoint API to use JSOM or REST?

I am a SharePoint novice and need help to determine which api set to use. I have given task to develop an outlook web add-in which will be side loaded to client's computer. This add-in will perform search on SharePoint lists and access content…
0
votes
1 answer

SharePoint Online - AppInv

Trying to create a cross-domain javascript call that will access data via the sp online api. I've done the appregnew successfully, getting back confirmation that my client id and secret etc was generated. I go next to appinv, and go to the appid…
Ctznkane525
  • 7,297
  • 3
  • 16
  • 40
0
votes
1 answer

dotnet Core - Using azure AD authentication to retrive data from sharepoint REST API

My project is set up to use azure ad as login(from the dotnet core template). I have successfully managed to log in. However, i want to use the same logged in user to retrive data from sharepoint rest api. I have the following method: public async…
0
votes
2 answers

ModifiedBy field in SharePoint Document library is always my name instead of the one who triggered the flow

I have a flow, that gets triggered when a file is created in the Documents. The flow will add a column to the document library. The problem is that the modified by field in the Document library always contains the value as my name, instead of…
Sibeesh Venu
  • 18,755
  • 12
  • 103
  • 140
0
votes
1 answer

What is SourceId in requests to SharePoint Search API?

I'm trying to implement people searching with SharePoint REST API in JS and I've found that it can be done by directly providing SourceId in the request body. So currently my request the next way: function searchEmployees(value) { fetchData( …
0
votes
0 answers

Using SharePoint's REST API to $expand a folder's people field

I can't quite remember how to expand a field of a folder or file. Example: I can do something like Folders/ListItemAllFields/RoleAssignments/Member to expand the role assignments, but I cannot do this for my custom column. Details Document…
Mike
  • 1,279
  • 7
  • 18