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

1
vote
1answer
60 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
33 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
343 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
50 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
46 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
33 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
17 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
37 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
355 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
21 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
41 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
70 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
180 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
31 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
30 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 ...
1
vote
1answer
58 views

Can't retrieve all Items from all lists that reside on a single subsite

SP Community, I am absolutely stumped and desperate for help. I have been up and down StackExchange trying to get 3 separate attempts to - 1. query all of the lists within a subsite and to then - 2. ...
1
vote
0answers
85 views

“GetFolderById” available in REST API?

is GetFolderById available in REST API- SharePoint 2013 on premises.
0
votes
0answers
40 views

how to insert multiple values to lookup field in Sharepoint list?

I have Assignee field which accepts multiple values and its lookup column but whenever i try to post multiple values I am getting the below error "Cannot convert a primitive value to the expected ...
0
votes
1answer
51 views

Error in metadata type when I'm trying to POST

I have this code below: function insertuser(obj){ var listID = obj.getAttribute('data-listid'), itemID = obj.getAttribute('data-itemid'), URLID = obj.getAttribute('...
1
vote
1answer
64 views

How to add new value user field in sharepoint list?

I have people look up field in my list ..lets say "Checker" , its single selection user field but when i try to add user data to "Checker" field through rest api its not getting posted ... $scope....
0
votes
2answers
39 views

SharePoint Dashboard

I need to create a dashboard in SharePoint that shows a sum of values per category. Example: Display this: Category 1 - 5 Category 2 - 3 Category 1 - 7 Category 3 - 4 Category 2 - 5 as this ... ...
0
votes
2answers
59 views

Rest API Fetching details

I have a major requirement from my manager and this needs to be fulfilled as early as possible. Requirement: There is a List A and List B. List A acts as a database from which data has to be fetched ...
1
vote
0answers
79 views

The maximum number of bytes allowed to be read from the stream has > been exceeded

I'm trying to create a list item through REST api, but the multitext field contains content larger than 1mb and I'm getting this error: "The maximum number of bytes allowed to be read from the ...
1
vote
2answers
89 views

Trying to Create a Javascript dropdown with Managed Metadata terms

I am trying to use JavaScript and REST to grab terms out of a Term Set and bind them to a Bootstrap select field in the NewForm.aspx for a list. Thus far I just cannot pull the terms and bind to ...
0
votes
1answer
78 views

SharePoint CreateAnonymousLink with Rest API in Postman

According to this, this, and this resource, one can call the Web.CreateAnonynousLink via the Rest API (in addition to CSOM). I am trying to get a working example going in Postman, but not having any ...
0
votes
1answer
30 views

impossible reach items list with REST API in SharePoint 2013

i've a problem with a REST API call. i can reach the list without problems, as you can see in the image that follows but the problem come when i try to reach the list items i looked around but i ...
0
votes
0answers
102 views

Site collection through REST API on SP 2019

Can we create site collection through REST API on SP 2019 on-premise environment?
0
votes
1answer
26 views

Hide div or span based on user's permission

I'm using REST API to populate contents on a page. Each item has an Edit link to allow content provider to edit the text and image. Content Providers are members of 'CPGroup' SharePoint Group with ...
1
vote
1answer
58 views

REST API Item Versions Endpoint

In this question, it appears there is a "/versions" endpoint for the ListItems REST API. /_api/lists/getbytitle('ListName')/Items(#)/versions returns a 404 'Not Found' on our SharePoint 2016 On-...
0
votes
0answers
52 views

Retrive storage metrics data with JavaScript on SharePoint 2013

Is there any possibility to retrive data which is in ../_layouts/15/storman.aspx ? The way which mentioned below is not what I need. I need to learn folders size, % of Parent and Last Modified dates. ...
0
votes
1answer
301 views

Rest API POST method getting 400 Bad request

Im new on SharePoint 2016 and i want "POST" items to list ` var data = JSON.stringify($scope.formData); console.log(data) data = data.replace(/[{}]/g, ''); var datavalue = "{__metadata:{'type':'...
0
votes
0answers
25 views

Is there a way we can identify status of Content Type with REST

I am trying to see if there is a way we can find out whether a content type in content type hub is published on not. If it's published then which date it was published. Basically, I am looking for ...
0
votes
2answers
248 views

Send HTTP Request error in Flow (Invalid JSON)

I am creating a flow right now that will create pages every week. The thing is, im using the "Send an HTTP request to sharepoint" to create the pages. Below you can see that part: The problem is, ...
1
vote
1answer
133 views

SharePoint Online rest api to declare item as record

does SharePoint Online have a rest api to declare an item as a record? I will use it in MS Flow Thanks Maurizio
0
votes
1answer
46 views

Sharepoint Rest API Error 403

i have a sharepoint farm with two different web applications. When i'm trying to access the second web application with java script from a page of the first web application, i always get an http error ...
1
vote
1answer
39 views

SharePoint server REST: Find folder by attribute

I am developing an integration between several systems and in one point I have to find the files inside a folder using the SharePoint REST API. The data I have to look for the folder is the List were ...
0
votes
2answers
31 views

REST API: I want to display all items with a certain value first, even though they are not in order alphabetically (asc and desc won't work)

I'm essentially wanting to implement a custom sort order. I have a list of items with a 'Status' choice column. The status choices are 'New Item', 'Funded', and 'Pending'. In my query, I'd like to ...
0
votes
1answer
121 views

Spfx dropzone component

I am using the sample react-file upload sample and upon and upload am changing the metadata of the file. The catch is it is working when am testing and when the app is deployed it no more works.The ...
0
votes
0answers
15 views

Create a reference thread using Social Feed REST API (e.g. rating notifiation)

We are using SharePoint Social Feed as a social component in our company network, but without using the SharePoint UI. All things are done in a modern React based webapp using the REST API. In the ...
1
vote
2answers
62 views

Sharepoint Online REST: field property names in Item response JSON

Is there an exhaustive document of how (possibly user-added) field values are returned in the Sharepoint REST ListItem GET endpoint's response? Afaik, most field values are returned by its ...
0
votes
1answer
35 views

Can someone help me on how to handle CORS to access other site collection in SharePoint online?

Scenario: I have one Site Collection in abc.com domain and other Site Collection I have inside xyz.com domain. Now I want to access list item from abc.com domain inside xyz.com domain. Both Sites are ...
2
votes
1answer
188 views

Add files to subfolders using rest api in javascript

What is working right now is i can upload to the root folder of a library using the code below : myDropzone.options.url = `${_context.pageContext.web.absoluteUrl}/_api/web/Lists/getById('${_parent....
1
vote
1answer
77 views

Attach File to Document Set via REST

Is there a way to upload files using Sharepoint REST API to my created Document Set? Document Set: Inside "Test" woud be: I can upload files via browser but how do I do it via REST?
3
votes
1answer
48 views

How to get a list's new Name after changing it with the REST API on SPO?

On SPO, after changing a list's Name in 'List Settings' > 'List name, description and navigation', the list's Name in the SPO webpages gets immediately updated, but the GET /_api/Web/Lists(guid'my-...
1
vote
0answers
50 views

Create Item in Document Library thru REST API

Is there a way to create an item inside a list library? Or perhaps convert a folder/file into a custom Content Type? I have added an item using custom content type thru the "New" menu (named "g1q" on ...
2
votes
1answer
21 views

sharepoint 2013 on-premise copy document between site collections using rest api

Can I copy documents between site collection using rest api? I know its possible within the same library and also between sub-site. I need to send copies a number of documents from one library to ...
0
votes
1answer
70 views

AJAX to Angularjs Response SharePoint

Can someone give me some assistance in converting this AJAX get list items to $http? Specifically I am trying to get the different fields to $scopes. I am aware that when doing $http now you can no ...
1
vote
0answers
32 views

How to process sharepoint page (site pages) data returned from rest api, i.e fetch title comments likes etc ,

How to process the html(ish) content returned by rest API while fetching site pages from Sharepoint , and is there any better approach to fetch page data. Trying the same with search api fetches ...
2
votes
0answers
27 views

How to exclude the null values in SharePoint search REST API

I am using the SharePoint search api to get the documents from the libraries. I have a managed property call L1DTI corresponding to a custom column. Now I do not want the search results where this ...
1
vote
1answer
70 views

Get “lastModifiedDateTime” with MS Graph or REST

I want to extract the "lastModifiedDateTime" from a list. I don't want to search the list by ID, but rather from its name. I know you can do it by MS graph, but the examples needs site ID as well as ...