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
25 views

Inconsistency in REST calls between folder and library creation

In the process of automatisation creation of a sub sites with a few libraries I have noticed some inconsistencies between how one would create a library and a folder using the REST API. For creating ...
0
votes
2answers
65 views

Get current user group name

I am trying to get current user group name when the member is added via Active Directory in SharePoint 2013 using Rest/jQuery. Any help is appreciated.
1
vote
2answers
113 views

Sharepoint REST API: Get filtered results of files in a document library subfolder and sub-subfolders

Let’s say I have a Document Library “Documents” with structured folders like this: - Folder1(ID1) - SubfolderA(ID3) file-1-in-SubFolderA(ID4).txt file-2-in-SubFolderA(ID5)...
0
votes
1answer
69 views

SharePoint Online - Get User Information & Location

I have built a powerapp form for requesting access to certain groups. This app is then submitted into the SharePoint list. In this list it stores the information based on the user who has created the ...
0
votes
2answers
100 views

CAML Query vs Odata Query string operators

For getting SharePoint list values through rest. I came through two solutions writing CAML Query in the body of AJAX call Odata query selector operators(eq: select,expand) in the url ...
1
vote
2answers
218 views

How to use CAML query with rest

I am trying to get list data with an id from my SharePoint online through REST. I have my ajax call like below. getFunction:function(id){ return new Promise(function (resolve, reject) { $.ajax({ ...
0
votes
1answer
37 views

How to use SharePoint 2010 REST api to update column values?

I just found the REST API for SharePoint 2010. I'm trying to use cURL to call the API to update empty columns. I've managed to use the links below to access various information for my company's test ...
0
votes
1answer
34 views

Return items within Date Range

My array: urlArray = dataArray.map(function(item){ return { Id: item.Id, Title: item.Title, ...
0
votes
1answer
187 views

How to Move folder using REST API

I am trying to Move folder to different location within Document library using REST API. What i have done is:- I have created SharePoint add-in through which i want to move folder from one location to ...
0
votes
1answer
48 views

Rest API Update Person Field (Multi user), Lookup Field(Multi lookup), Taxonomy Columns(Multi terms)

how do i update complex fields like person/Group, Taxonomy, Lookup in rest api? any code samples would definitely help me?
0
votes
0answers
26 views

Add webpart to page using a workflow?

Does anybody know a way to add a webpart to a page using SharePoint workflows? As far as I have read so far there's no endpoint for it in the REST api. I have a working solution using CSOM, but that ...
1
vote
1answer
67 views

Look Up value through REST without select or expand

Can we get the lookup value from SharePoint list through REST without using the query operators (select/expand) ?
0
votes
1answer
186 views

How to change null value to empty using REST

How to change null value to empty string in Sharepoint custom script? Here is my code. $(document).ready(function() { getUserListItems() }); function getUserListItems() { var ...
0
votes
2answers
260 views

Multiple filters on a large list using REST

I am running into an issue when using the listdata.svc REST API on large lists. I have a query that looks like: .../_vti_bin/listdata.svc/MyList?$filter=(substringof('<query>',LastName))or(...
1
vote
2answers
31 views

API results changes

I am using this rest api in SharePoint online "web/lists/GetByTitle" to get list item using javascript. It was working nicely before but suddenly somehow the format changes when I am trying to get ...
1
vote
1answer
118 views

Create Site Policy in SharePoitn Online with PowerShell/CSOM

I was researching for add/edit/delete Site Policy in SharePoint Online with PowerShell/REST but with no luck. Is it possible with SharePoint Online with PowerShell/CSOM?
0
votes
2answers
51 views

How do I return the subsite Link URL for each subsite? Right now, it only displays the title of each subsite

This is what I have so far to basically get all of the subsites but I cannot find a way to link each subsite to it's own subsite url.
0
votes
1answer
112 views

How to sort SC results from search REST API

I need to sort my list of sites retrieved by search rest call but when trying to perform the action the list is not sorting. if I go to the xml I can see a property Title on which I should apply the ...
0
votes
1answer
85 views

AD error AADSTS90124 when accessing Office 365 SharePoint Online

From my web api on trying to call the Sharepoint REST API I am requesting for an on-behalf of access token: string[] sharepointScopes = { "https://tenantid.sharepoint.com/Files.ReadWrite.All", "...
0
votes
2answers
69 views

File properties not updating using rest api

I'm trying to update file metadata in document library using rest api. I'm getting Success alert but file's Title is not getting modified. below is code, function updateFileMetadata() { var ...
0
votes
1answer
282 views

REST API - List view threshold

We have a list that is now over 5000 and the following stopped working. All the fields used in filters are indexed var requestPendUri = webAbsUrl + "/_api/web/Lists/getByTitle('LeaveRequest')/Items?$...
0
votes
1answer
34 views

Migrated infopath form does not find UDCX file for rest query when opened in the browser

We have migrated / moved some site, to a different Sharepoint location. Previous status: site was a root master site on a collection. Updated status: site is a subsite on a different site ...
1
vote
1answer
111 views

Update attachment file in SharePoint using custom JavaScript

Anybody know how to update attachment file in list item using javascript? Any idea are so much appreciated.
1
vote
0answers
196 views

Call to Search REST Api with jQuery results in 401 Unauthorized

I have been trying to make a call through jQuery to the Search REST API but I'm always getting' 401 Unauthorized, this is my code var siteUrl = "http://myspserver:27180/sites/eyksmainportal"; $(...
1
vote
1answer
57 views

How to obtain field description using REST?

My coworker is trying to get the text from the description for a single line of text field using REST. We have so far been unable to find any methods that allows us to access it. We know how to get ...
0
votes
0answers
45 views

How to return the last item modified from each queried list using Search query api?

I would like to query all lists across different site collections based on a specific content type, but getting only the last modified item. Using Rest api and caml query, can be achieved, but that ...
1
vote
1answer
153 views

How to retrieve items from large list using rest API?

I have a list having approx 10000 items, I am trying to retrieve items filtering by 'UserEmail' column, using REST api. http://SpServer:1122/sites/Large-List-PORTAL/_api/web/lists/getbytitle('MyList'...
0
votes
0answers
134 views

Uploading base64 stream To SharePoint Online Via Rest

I have a requirement to take a file (base64) and upload it to SharePoint Online document library using a call to the RESTful endpoints. When I do this the file ends up in SharePoint Online document ...
1
vote
1answer
156 views

SP Online REST API Durable Document Link

My google searches have all led to dead ends. Is there a way to retrieve the durable link code for a document using the REST API? When you copy a link in the GUI, it takes the form of:- https://...
0
votes
1answer
44 views

SharePoint online REST API - not showing all files

I'm using the following REST endpoint for getting all items from a list: https://myCompany.sharepoint.com/sites/portal/myName/_api/web/Lists/GetByTitle('MyFolderTitle')/Items?$select=FileLeafRef,...
1
vote
0answers
31 views

Sharepoint Online REST API - cannot get .aspx files

I'm using a Java app to get files from sharepoint online. I'm using the following REST API endpoint: apiUrl = BASE_API_URL + "/web/Lists/GetByTitle('" + sharepointList + "')/Items?$select=...
1
vote
1answer
476 views

How to call the SharePoint rest API using Java web application?

I have developed one of the web based Java Application in which one of the page containing the form for uploading a files, as of now uploaded file stored on the Application server, but instead of this ...
1
vote
1answer
337 views

SP Online REST API Change the Content Type of a Document Library Item

I would like to change the Content Type of items in a SharePoint On-Line Document Library, using VBA and the REST API. I would like to change existing Folders to a custom Content Type, derived from ...
0
votes
1answer
101 views

jQuery and REST API to list all subsites and users in those subsites with full control

I'm looking to display on a web part in SharePoint online a list of all sub-sites and all users with full control to that particular site i.e. Team Site Site Owners https://ab/...
1
vote
2answers
117 views

Sharepoint REST API Download File Using NodeJs

i'm trying to save file to my drive using NodeJS as backend. So far, i managed to access https://${sites}/_api/web/GetFolderByServerRelativeUrl('Shared%20Documents')/Files('test.xlsx')/$value and ...
1
vote
2answers
273 views

Sharepoint REST API 403 Error

I've setup an App in Azure using instructions from various places, including: http://www.ktskumar.com/2017/01/access-sharepoint-online-using-postman/ http://tech.bool.se/basic-rest-request-sharepoint-...
0
votes
0answers
84 views

Calling SharePoint /_api/$batch and passing in complex object type to POST request

Looking at how SharePoint move items using the Network tab in chrome, the items get moved using _api/site/CreateCopyJobs. This returns result in type=Collection(SP.CopyMigrationInfo) This contains ...
2
votes
2answers
334 views

C# console call sharepoint online rest api with credentials problem

My goal is to call REST API and retrieve specific folder and files metadata to specific site. I wrote a console application in C#. The SharePoint site is multi-factor enabled and I can get the site ...
0
votes
1answer
34 views

Retreiving files' meta-data via API lacks data on some deployents

I'm using API call /GetFolderByServerRelativeUrl('/path/to/folder')/Files?$select=ListItemAllFields/ID,ListItemAllFields/FileRef,Properties&$expand=ListItemAllFields,Properties&$top=10&$...
0
votes
0answers
41 views

How to fetch data from a different site collection SharePoint site using restapi

Hi am trying to fetch data from a different site collection site using restapi. $http({ url: "http://test.com/sites/test"+ "/_api/lists/getbytitle('TestList')/items", method: "GET", ...
2
votes
1answer
76 views

orderby Created is not working in SharePoint rest api

I am trying to orderby Created date in SharePoint Rest api Below is the url that I use /_api/web/getfolderbyserverrelativeurl('style%20library/Gallery')/Files?$expand=ListItemAllFields&$orderby=...
-1
votes
1answer
137 views

Is it posible to upload file in Lists Attachments in SharePoint in custom way

Is it posible to upload file in Lists Attachments in SharePoint in custom way I already tried using REST and JS but I am facing an error and it can't upload if it's posible kindly suggest what way to ...
0
votes
1answer
174 views

Expand Multiple Lookup field whit Microsoft Graph

How can I Expand a Multiple Lookup field whit Microsoft Graph. I need to get all fields from a multiple lookup field. Thanks.
2
votes
2answers
78 views

How to attach file in sharepoint I am using that function but its error [duplicate]

What is the problem with this? Im trying to attach file in SharePoint. <!DOCTYPE html> <html> <head> <title>Sample</title> <script type="text/javascript" ...
1
vote
2answers
25 views

Attachment File using REST was failed to upload with the problem of SP.RequestExecutor.js

How can I add attachment in SharePoint I am stuck on this problem hopefully can help me to proceed this problem. I will so much appreciate your help. Thank you.
0
votes
1answer
154 views

A value without a type name was found and no expected type is available

I want to update my fields: { "Activitiy": [ { "LookupId": 110, "LookupValue": "110" } ] } But I got an incorrect response. How to ...
0
votes
1answer
65 views

Datatables Rest filter count on Sharepoint

I've got a SharePoint site that I'm running some Rest API queries on and filtering results. I was just wondering if anyone had a quick tip on if its possible to pull a count from the following code ...
0
votes
1answer
19 views

How to run function on every object REST call returns or active one?

Missing one important component here. I'm making a REST call with jQuery ajax, and would like to know how to run my if statement for all items or the current active item [this] instead of just the ...
0
votes
0answers
27 views

SharePoint Rest API - not able to get “Form Data” property of a list item

I am trying to get a field named "Form Data" using Rest API I tried the below url https://site.sharepoint.com/sitename/_api/web/Lists/GetByTitle('List Name')/Items(5581)?$select=FormData I got the ...
1
vote
2answers
178 views

Couldn't update list item in SP 2013 using Rest

I am trying to update a field in my list but I keep getting this error: "A type named 'SP.Data.ttcuAnnListItem' could not be resolved by the model. When a model is available, each type name must ...