Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sharepoint-rest-api]

Using the Representational State Transfer (REST) interface provided by SharePoint

0
votes
1answer
44 views

Get last major version of page with all custom field values using JSOM/REST

We want to access last major version of page with all its OOTB & custom fields using JSOM/REST. I can able to get only version number & url only but we need all fields. Please help. Thank ...
0
votes
1answer
150 views

SharePoint Online Rest API (Add ListItem)

I have issue with Adding List Item But I can Read List Item without any issue. I will narrate full step how I did. I want to use REST API outside SharePoint Online. I register App by going to https://...
1
vote
0answers
28 views

Get Other Label (synonym), description property values of a term set using REST API

I am working with the Microsoft Flow where I need to get the OtherLabel and description property values of a term-set. This term set is attached as file metadata in a document library. I tried, there ...
3
votes
3answers
194 views

How to deal with special characters in rest parameter values

I am working on REST call. Everything works fine but my column contains special character & So rest call like below works: http://mydomain/_api/web/lists/GetByTitle('MyList')/Items?$filter=...
1
vote
2answers
157 views

Add SPFx app to a SharePoint site via REST or CSOM

I have 300 Subsites and want to add my custom SPFx Extension to all those subsites. Manually I know how to achieve that. I just go to site contents and add my app. But I want to solve this ...
0
votes
0answers
28 views

Get members of a Distribution List using REST?

I tried using Graph API/Explorer and was able to get all the members of a distribution list but I could not figure out how I could use this within SharePoint Designer to populate a field with the DL's ...
0
votes
2answers
984 views

Populate textbox based on dropdown selection from a Sharepoint list

I have a SharePoint list called "Products" (containing 4 columns - Product, Manager, Approver, Status) I have a dropdown list that populates the 'Product' column of the 'Products' list. Say I select ...
0
votes
2answers
1k views

How to add multiple URL to Access-Control-Allow-Origin header in SharePoint 2013 web.config

To resolve the CORS issue I have added the following headers in the web.config file of SharePoint 2013 <add name="Access-Control-Allow-Origin" value="http://localhost:4200" /> <add name="...
1
vote
2answers
259 views

How to filter SharePoint search rest api results based on current logged in user

I am currently using the SharePoint search rest api on a document library. The search results are coming fine. Now I have a requirement where I want to filter the search results based on the Author of ...
1
vote
1answer
35 views

Searching for a document in a library that has a space in the library name not working

I have a problem I am trying to figure out with the search API. Most of the time the file names are unique, but every once and a while there are two or more files in different libraries on the site ...
1
vote
2answers
1k views

SharePoint 2016 - 401 Unauthorized on REST requests

I feel like I am spinning in circles and can't figure out what I am missing. I have a SharePoint 2016 web application I am attempting to test the REST APIs through Postman with. I follow the guide I ...
0
votes
0answers
15 views

Creation of the Subsite through rest api, not updating the text value in the div element

i have created a simple javascript with rest api call, on button click the code will show a message to the user in a div element with red background-color, and once the ajax call for the creation of ...
0
votes
1answer
83 views

Getting the data from a search result using the web/lists/getbyTitle/items REST API end point

I can't believe this is so difficult. Here is what I need and I just seem to be chasing my tail and not getting anywhere. In my local database I have stored the path and the file id of files that ...
0
votes
1answer
470 views

How to get Person or Group user details from REST API query

I am having trouble trying to get the "Title" portion of a Person or Group field from SharePoint Designer 2013 workflow using a REST API query. I have my workflow built similar to the one in this ...
3
votes
1answer
257 views

Getting the file details from _api/web/lists

I am using the following url to get a file based on the ID in the list: https://<site>/_api/web/lists/getbyTitle('<library>')/items(itemId)/ I am getting data back, but I need the ...
1
vote
0answers
153 views

Find a document by the document ID REST API

I have looked around for this question and either couldn't find the answer or mis-understood it. Here is what I am looking for: All I have is a DocID from Sharepoint and I need to do a search on the ...
1
vote
1answer
91 views

constructing an expand with REST API

I am having trouble to create an expand query using the REST API. I have two lists which are linked. PIR Title, Date, Number SIR Title, PIR2SIR (lookup to Title in PIR), Date, Number Now I want to ...
3
votes
0answers
421 views

Using Rest API call to get list item in SharePoint 2010 workflow

I am trying to get list item using REST API syntax in SP Designer workflow. The url format is as follows: https://example.com/_api/web/lists/GetByTitle('List%20Name')/items(2952)?$select=...
1
vote
1answer
469 views

How we retrieve all groups and user from Active directory using client side code in SharePoint Online?

I am not getting domain groups /security groups or groups created in azure using rest Api. Is there any other method or approach to check users from groups in Active directory.
1
vote
1answer
245 views

SharePoint Rest API ValidateUpdateListItem not working with multi line field

I am using SharePoint REST API to update the values in columns in document library. Below is the code. var url= "http://mycompany.sharepoint.com/site1/_api/Web/Lists/GetByTitle('My Library')/Items(7)/...
0
votes
1answer
18 views

App API Access to Single Site Collection

Is it possible to setup Azure based App permissions to only a single Site Collection? We are putting together a small application which will scrape external documents from various sites and dump them ...
0
votes
1answer
39 views

build JSON from REST API call

I am retrieving list item values in sharepoint using REST API. Now I want to store these values in JSON so I can just call the JSON and retrieve the values in another function $.ajax({ url: lib, ...
2
votes
3answers
61 views

Search multiple lists using rest API with HTTPRequest and problem with number of results returned

Can anyone point me to an example or share some code on how to search multiple sites libraries with a single API Rest call? For example, I have a side called Document Archive and in that archive I ...
4
votes
3answers
208 views

Filter Calendar list view using jquery/restapi/angularjs

I have a SharePoint 2013 Calendar list view in a page, also I have a filter with some choice values. Now based on the filter value, the SharePoint Calendar list view should be filtered . I am not ...
2
votes
1answer
70 views

Call rest api from provider hosted app

I want to call this API -> /_api/SP.UserProfiles.PeopleManager/GetMyProperties from SharePoint provider hosted app, but whenever I'm calling this API what I got is 403 forbidden issue. Here is my ...
1
vote
0answers
33 views

Unable to share a SharePoint folder in a list with REST

I am trying to add a webpart that will be able to share several different types of items in SharePoint 2013 OnPremises. I am using the following code, which seems to work well with one exception. ...
0
votes
0answers
17 views

Is it possible to change the permissions for a folder in a Doc set with Rest API

I have create a Doc-set and in the Docset folders. List1- Docset 1 -Folder1 List1- DocSet 2 -Folder2 List1- DocSet 2 -Folder3 List1- Docset 3 -folder4 Next step is to break role inheritance ...
4
votes
1answer
227 views

How to update created and modified properties to my own value of a file in SharePoint online using REST API in C#

Isn't it possible to update created and modified like the following method? This works for other column properties but nothing happens in modified and created column. var body = "{ '__metadata': {'...
1
vote
0answers
88 views

SharePoint API postman collections?

Whether you are using SharePoint on-prem or SharePoint online, there are many times when you want to do rest api calls to sharepoint to get certain tasks done. I use Postman to store common api calls....
1
vote
3answers
358 views

Retrieving list items from SharePoint online to HTML

I need to pull/post data ( list items ) from/to SharePoint online to/from another environment like HTML, PHP that hosted externally or in WordPress to share it with the public. I tried this JS code ...
0
votes
1answer
349 views

How to get the values of all managed properties in SharePoint search Rest API

I am currently using the SharePoint search rest api to get the search result. Below is the code I am using var url="http://mysite.sharepoint.com/sites/site1/_api/search/query?querytext='SearchTerm+...
0
votes
1answer
20 views

I'm using REST to create a dashboard and would like to add the ability to select and update people fields.

I have a dashboard created using REST from list data that contains multiple columns, including a person column that looks up to active directory. I am able to GET and display the person column with no ...
0
votes
2answers
23 views

How can I use search query for my List to find ListItems?

From this documentation I just use select and expand fields https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/listitem_get Like this: GET /sites/{site-id}/lists/{list-id}/items/{item-...
3
votes
3answers
1k views

How to get data from enhanced rich text field in SharePoint 2013

Am trying to retrieve data from Enhanced rich multiline text fields in SharePoint 2013, but html tags are retrieved along with the data. I need to preserve the format of the data but without html tags....
1
vote
1answer
30 views

How do i return multiple multi-choice list fields in order to get their choice values?

Newbie here. Basic REST question for you. I have a list with over a hundred columns. I would like to use REST to retrieve the multi-choice options for two columns but I can't figure out how to do it. ...
0
votes
1answer
36 views

How to show the info of only one item from a Sharepoint list with REST API?

I have a div with a link to an item which is in a sharepoint list, but I need to show also the last time it was modified that report. <div id="report"> <h2>Title</h2> <a ...
0
votes
1answer
114 views

Retrieve choice values from lookup field in SharePoint2013

I am trying to retrieve choice values from a lookup field in SharePoint 2013 using REST API. PFB the code: $.ajax({ url: _spPageContextInfo.webAbsoluteUrl+"/_api/web/lists/GetByTitle('Test')/...
0
votes
0answers
81 views

SOAPUP Authentication with SharePoint online

I would like to access SharePoint 2013 on-prem OR SharePoint Online REST or SOAP API's and test them using SOAPUI tool. I am trying NTLM and even Basic Authentication, however, I did not get success. ...
0
votes
2answers
1k views

SharePoint 2013 remote authentication in Rest API

I am trying to use SharePoint Rest API from a standalone application with hard-coded user id and password. The operations are working fine using this method. But we are trying to authenticate the ...
1
vote
0answers
56 views

Update metadata of many items in library

I have the requirement, that the values for two of my site columns of all our document libraries depend on a value outside of SharePoint (its stored in a database). If the value in the database ...
1
vote
1answer
98 views

Using REST to create a dashboard from list data. Is there any way to add a people picker field to my page? I have limited access to our environment

I am using REST to create a dashboard. I want users to be able to interact with the dashboard by assigning items to other users, etc. Is there a way to add a people picker so that they can look-up and ...
2
votes
1answer
3k views

I got this error “An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. ” when updating a choice field using REST API

I am working on sharepoint on-premises 2013. and i have a cusotm list which contain 2 columns of type "Choice", as follow:-- Now i am trying to copy one list item and create a new list item, using ...
1
vote
0answers
163 views

Batch requests with the REST API: Is it synchronous or asynchronous?

Simple question: is the batch request in the SharePoint 2016 REST API asynchronous or synchronous (for clarification: the multiple requests inside one batch are handled one after one [synchronous] or ...
1
vote
0answers
51 views

'Access Denied' error when attempting to read binary contents of a file stored in an O365 group via REST

I'm trying to read the binary contents of a file in an O365 group and I can read the raw file in my web browser after authenticating with O365, but if I use the same URL in a REST GET request, I ...
0
votes
1answer
24 views

Sharepoint REST API search on multiple sites

Using the Sharepoint REST API with a query similar to https://{tentant}.sharepoint.com/_api/v2.0/sites/{site-id}/drives/root/search(q='{text}') I can only get results from a single site/drive at a ...
0
votes
1answer
241 views

Problem with Sharepoint REST API CopyTo

Following problem with using ShP 2013 enterprise on premises and ShPDesigner2013: Given a site http://server/site which holds two document libraries "docs1" and "docs2". Both libraries hold *.docx ...
0
votes
0answers
237 views

GetFileByServerRelativeUrl - moveto : Getting (400)Bad Request Error

I am using SharePoint 2013 REST API and getting (400)Bad Request error when moving file from one Document Library to different Site-Sub Site's document library. My hierarchy look like this - Source ...
0
votes
1answer
178 views

Why do I get different results from a rest api result and searching on sharepoint directly

When I do a search on SharePoint using the url http:///TS/EDMS/_api/search/query?querytext='tequila' and when I use the same url in a separate application that does the rest call (external application)...
0
votes
0answers
59 views

Authentication via REST API

For a week now I have not been able to figure out how to grab a bearer access token through REST API calls. I found the following guide: http://www.vibhutisinha.com/2014/09/step-by-step-to-create-...
0
votes
3answers
318 views

REST API HTTP Get taking 13 seconds to fetch data

SharePoint Rest API taking around 13 seconds to fetch data from List based on some filter conditions. This is making the app slow for the users and they are complaining. Is there a way to make the ...