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
0answers
18 views

Is it possible to access sharepoint without security_token?

I am trying to call sharepoint rest api something like /_api/search/query?querytext= but let's say if I dont have login information to send a post request to https://login.microsoftonline.com/extSTS....
0
votes
0answers
18 views

JavaScript use custom Content Type and Page Layout

I am creating a Site Page using JavaScript. After some research, i was able to achieve that with the following code: function createPage(webUrl,listTitle,fileName,success, failure) { getListUrl(...
0
votes
1answer
25 views

Fetch list of lists based on content type by REST Api

I need to display 2 dropdowns to user, first populated with all subsites in a site collection that have at least one discussion list; and second dropdown with all the discussion lists available in a ...
1
vote
1answer
23 views

Client to Server Authentication for SharePoint Online REST API

I am looking for answers if SharePoint online supports client-to-server authentication. My use case is to access Sharepoint REST API via pure JS with no server involved.
0
votes
2answers
24 views

How to get version history of item using REST

Very new to SharePoint so I am sure this is a newbie question... I did look at the forums. Here is the command I am using: https://Server/Site/_api/lists/getbytitle('Equipment%20and%20Inventory')/...
0
votes
1answer
24 views

REST API filter by a “BusinessData” field

I have a query that brings the contents of a list based on a query like this: https://myserver.com/LibraryABC/_api/lists/getbytitle('MyList')/items?$select=*,FileLeafRef&$filter=(MyField eq '...
0
votes
1answer
23 views

Add attachment to a list item using REST API

I have an infopath form that uses a custom (html) form submit button. The click event of the submit button adds the item to the list using REST API. The only issue is that when the user uploads an ...
0
votes
3answers
52 views

Get List Item ID for file in Document Library

I've got a document library which has folders in it. I can get a given folder and iterate through the documents in the folder via REST just fine. What I need to do is get some of the list item ...
0
votes
1answer
25 views

Rest API populating multiple people picker - populates my user AND “SPO Crawler”

Ok so this is a weird one. I'm trying to populate a multiple people field like this -> UsersToNotify = { "results": [10,50,563]}; Lets say 10 is my id. After i create the item through rest (create, ...
0
votes
1answer
23 views

Search/REST API only showing all results to Farm admin

I want to retrieve all the library items of a content type "Prod Request". I am using REST API. Here is my query: $.ajax({ url: https://mysite.domain.com/_api/search/query?...
0
votes
0answers
31 views

Anything wrong with this Search REST API Query?

Trying this: https://domain/_api/search/query/?querytext=%27TestSearchString%27&querytemplate=%27 {searchTerms}%20ListID:00000000-0000-0000-0000-000000000000%27& selectProperties=%...
0
votes
0answers
21 views

Get data from a different site collection using ajax - Sharepoint online

I am trying to get some data, into a webpart in SiteA, from a document library in SiteB using an ajax call. When I added my code to a content editor it worked properly. However when added it to the ...
0
votes
0answers
20 views

Getting the Item ID based on combination of two columns through Rest API

I have a small requirement where in I would like to get the item id based on combination of 2 columns. So I have two List which are List A List B Now I am getting two columns which are employee ...
0
votes
0answers
30 views

Starting SharePoint 2013 workflow using REST from another workflow fails the first time but works on retry

I have two SP 2013 workflows. One (WF1) does a number of things, but at the end of WF1, I'm calling another SP 2013 workflow (WF2) using REST. WF1 runs both on create and change and conditionally ...
0
votes
2answers
43 views

Rest Api Code not working

I have a very weird problem that i am facing. So currently i have written a rest api code in regard to my requirement. Basically, this is what i am doing in the code. Getting Employee Names from a ...
1
vote
2answers
45 views

Change Sharepoint group setting using JSOM or REST

I am looking for JSOM or REST option to update SharePoint user group settings who can edit the membership for the group.
0
votes
2answers
48 views

How to retrieve Multi Value Lookup List REST Api Sharepint 2013

have 2 lists, I tried to retrieve the values ​​of lookup field (one or more values ​​from the Finance list (Title, Country (lookup field to the list Country column "Title" $("#Finance").autocomplete({...
0
votes
1answer
20 views

Sharepoint REST API - How to Create InformationRightsManagementSettings

To create IRM settings using REST API, I am referring to document SP.InformationRightsManagementSettings object As per documentation, it suggest below REST endpoint to create new IRM POST http://<...
0
votes
1answer
20 views

Search SiteGroups API not working when case sensitive

I'm using the API to search for sitegroups as below: "/_api/web/SiteGroups?$orderby 'Title'&$select=Id,Title,LoginName" + skiptop + "&$filter=startswith(Title,'" + value + "')" However, I ...
0
votes
1answer
30 views

Add an item to a SP list with a managed metadata column in SPFx webpart

I've a list in SPFx with a column type of Managed metadata. Now I'll add an item in that list with a web part. But how can I do this? import { TaxonomyPicker, IPickerTerm } from "@pnp/spfx-controls-...
2
votes
1answer
33 views

What are the alternatives to authenticate in SharePoint beyond AD to use the Rest API?

I am trying to consume via Rest the Ms Project API from a Node client, I was searching and found that it's possible to get an access token from the ACS (Azure Access Control) and use this in the rest ...
0
votes
1answer
21 views

How do I use a specific view in Power Apps?

Arguably this is a PowerApps question as well, but I thought my SharePoint folks might have encountered this one. I am showing a SharePoint list in a PowerApp, let's call it 'Upcoming Events' and ...
1
vote
0answers
17 views

How to filter on a Edm.Double type using rest api?

I'm currently working on a small project where I need to query the Access Request list of a site, while this list is sort of hidden the REST api works perfectly (Mind you the title might be different ...
0
votes
0answers
12 views

REST Query discrete size error

I have had a rest query running on my site for some time now however this morning it has suddenly stopped working. The query uses the SharePoint search rest api with a number of parameters. https://&...
1
vote
0answers
16 views

How to Grant permissions to domain groups in SharePoint site using REST?

I need to grant permissions to Domain Group in SharePoint site collection using REST. Is it possible? If Yes, please suggest how to do it.
1
vote
0answers
11 views

Refinement filter to look at the Title and Path properties with REST Search API

I have a POST search using the following select properties: Path,Title,Size,Author,Description,FileExtension,Rank,DocId,WorkId,ParentLink,FileType,ServerRedirectedEmbedURL,ServerRedirectedPreviewURL,...
0
votes
0answers
25 views

List get does not return items

Beginner with sp js api here. $pnp.sp.crossDomainWeb(addinweb, hostweb).lists.getByTitle("Sites").items.get().then(function(result) { console.log(result); }); I can see it does ...
1
vote
1answer
39 views

.docx files uploaded to SharePoint through REST API being corrupted. Other file types okay

I have two ajax calls below. First to get the contents of a document on my server into an arraybuffer. Then a second call to a Flow to add the file contents into a new file on SharePoint. This works ...
1
vote
1answer
19 views

Sharepoint client.PostAsync(“Url”, null) Gets 401 unauthorized error REST API Xamarin.Forms

I am developing a cross mobile app using Xamarin and I am trying to post some items to a SharePoint List. I have created a windows form app just to test the SharePoint Rest API and it is working good,...
1
vote
1answer
40 views

How to fetch version history of list item and display in a list

I have requirement where I need to fetch the version history of each list item and display in a separate list where a specific column value has been changed. For Example: I have list named "Demo" and ...
1
vote
1answer
22 views

Filters result in “Expression not valid” - Sharepoint 2013 API

Here is the request: https://sub.domain.com/Stores/CrisisMgmt/_api/web/Lists/GetByTitle('StoreClosures')/Items$select=StoreRegion When I make a request without the filter, I get all this data just ...
1
vote
1answer
38 views

Using Sharepoint Search REST POST API: getting 403 error from HttpWebRequest

I am trying to use the SharePoint Search REST API to do a content search from my c# application. I have no problem using the GET method, but the POST method keeps returning a 403 forbidden error. ...
0
votes
1answer
25 views

Change approval status after insert item via Sharepoint REST API

I recently noticed that by modifying the column of an item in a list with active versioning, however much the item is approved, it changes the status to draft. When faced with this problem I decided ...
2
votes
1answer
38 views

Search API get team and communication sites

How do I search for Team Sites and Communication Sites using SharePoint Search REST API?
1
vote
1answer
40 views

Remove an external user access for a Folder/Document in a Document Library Programatically

I have shared a folder/document to an external user (outside the organization) in SharePoint online doc library. An email to the new user is shared with One time passcode to access the file. Now, the ...
0
votes
2answers
27 views

Why the AJAX function is only executed in the end?

I've this code below: jQuery(document).ready(function() { jQuery.ajax({ url: "https://test.sharepoint.com/sites/test/Negocio/OfertaParticulares/_api/web/folders('Dinamico')/...
0
votes
2answers
82 views

Rest API Post Request Returns '403 Forbidden'

I am trying to create a new choice (radio buttons) field using REST API request in my SharePoint Online environment and this is the code I'm using: $.ajax({ url: "https://mydomain.sharepoint.com/...
1
vote
1answer
42 views

How to get all the available sitecolllections in sharepoint online(not subsites)

How to get all the sitecollections of sharepoint online using REST api, I used the following end point.But it doesn't seems to give me all the sitecollections. https://xxxxxx.sharepoint.com/_api/...
0
votes
2answers
20 views

Data from Sharepoint REST API is returning undefined

I've this code below: jQuery(document).ready(function() { jQuery.ajax({ url: "https://test.sharepoint.com/sites/test/Negocio/_api/web/folders('Historico')/folders?$...
1
vote
1answer
31 views

Show the SubFolders in DIV using Sharepoint REST API

I have this code bellow: jQuery.ajax({ url: "https://test.sharepoint.com/sites/test/Negocio/_api/web/Folders('Historico')/Folders", method: "GET", ...
0
votes
0answers
9 views

Optimize Retrieval of Multiple Lists

The below code snipped retrieves all items within each list in a subsite. Then filters by list title so that only information from lists containing "RDTEN" or "procurement" in their title get parsed. ...
0
votes
0answers
15 views

SharePoint Online Project Web Server REST API - Status Field

We are trying to build a task dashboard, for multiple Projects residing within MS Project Online, using SharePoint REST APIs and HTML/Javascript. Currently, we are unable to get the value for the "...
1
vote
1answer
26 views

Rest API to display SharePoint list items on Webpage

I'm using the Rest API to pull in data from a SharePoint list and display the results on a webpage. How would I be able to target those two array items? All I'm receiving back in [object Object] [ ...
6
votes
4answers
230 views

Filter Created in SP REST API

I have this code below: jQuery.ajax({ url: res3 + "/_api/web/lists('" + normlistid + "')/items('" + normid +"')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu", method: ...
0
votes
0answers
17 views

Create Page .aspx in a list using SP REST API [duplicate]

I've this code below: var fields = { "__metadata": { 'type': "SP.Data.PagesItem"}, "Title": "test" } jQuery.ajax({ url: "https://.../sites/intranet/jobs/_api/web/lists/GetByTitle('Pages')/...
2
votes
1answer
31 views

Get list of alerts of the current user from the whole site collection

My scenario: i want to create a spfx web part that uses a rest API that will query all the alerts throughout the whole site collection for the current user. I want to know which API to use and ...
4
votes
0answers
63 views

Get SubFolders using Sharepoint REST API and show them in HTML DIV

I want to retrieve Subfolders using SP REST API and check if there is any created folder and If it exists, display HTML content like: <label>SubFolder Title</label> for each SubFolder. All ...
0
votes
1answer
58 views

Upload attachment to List Item using React & Axios (REST API)

Well the title pretty much sums it up. I've got a custom form outside of sharepoint that creates/updates/views items from a sharepoint list using Rest API (with accessToken). Now i need to be able ...
0
votes
0answers
24 views

FirstName and LastName are not available for expanding in SharePoint rest api

I used rest api to get FirstName and LastName of a user field. The code hasn't been updated for a long time now and it was working fine until last month, but now it doesn't seem to work Here is the ...
0
votes
1answer
29 views

Access List Item Attachment outside SharePoint Online

I am developing iOS app using SharePoint Online data. First I register app on Azure Then I have given delegated permission where I have give Read permission to the site and web Then I am generating ...