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

17
votes
1answer
374 views

New List Experience allow bypass security bits (Item-level Permissions)

We recently found out (thanks to junior QA) that new list experience simply ignores security bit setting on list. I did some tests and I can confirm this on SharePoint Online. Below, you can find full ...
15
votes
3answers
17k views

SharePoint Online REST API Authentication In POSTMAN

I am trying to authenticate with the REST API for a list in SharePoint Online using POSTMAN. For example, the URL for my site looks something like this: https://mytenantname.sharepoint.com/sites/...
13
votes
3answers
3k views

When SharePoint list with 5000+ items queried with ID returns expected result but with any other column gives threshold error

I am trying to query a SharePoint list which has more than 5000 items. When I run filter query with ID, it returns the expected results. But when I run the same query with any other column it throws ...
8
votes
1answer
295 views

Retrive & Display a PDF document from SharePoint Document Library to a html canvas using Javascript

In SharePoint hosted App I need to get a specific PDF document from SharePoint Document Library & display its 1st page to a HTML canvas using JavaScript. For that, I tried to retrieve the PDF ...
7
votes
3answers
8k views

REST API call in SharePoint gets result, but when returns result becomes undefined

Getting data from a list using rest API. Here is my code , function getItems(url) { $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + url, type: "GET", headers: { ...
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: ...
6
votes
1answer
9k views

Make CAML query with in rest api call

I have a SharePoint list and i need to get the list items by using JSOM.how to add CAML query with in the API method? i have used the below code var url = "/_api/Web/Lists/GetByTitle('list')/...
6
votes
2answers
1k views

When using SharePoint 2010 rest api - /_vti_bin/listdata.svc/UserInformationList, what is difference between Name and Account

In SharePoint when I call the listdata.svc/UserInformationList, can someone help me understand Account versus Name? <content type="application/xml"> <m:properties> <d:Id m:type="...
6
votes
3answers
4k views

Retrieve all sites and all subsites from the SharePoint REST API

Using the SharePoint Online REST API, I'm trying to retrieve a list of all sites and subsites. This API gives me all top level sites, but no subsites: https://{mycompany}.sharepoint.com/_api/search/...
6
votes
2answers
3k views

REST API Limitations On Premise and Workarounds

I am just trying to understand the Limitations of the REST API in SP 2013 On Premise and it's workarounds. Can anyone please contribute with proper references? Some of the limitations I have heard ...
6
votes
1answer
988 views

Can powershell script be run using REST API / JSOM?

Is there a way to invoke and execute a .ps1 file using REST/JSOM? I am hoping to deploy a SharePoint Hosted App that runs a powershell script on the server.
6
votes
0answers
725 views

REST API to get Frequent Sharepoint Sites programmatically?

Sharepoint Online offers a view of the frequent sites of the current user. It is available in the home page of the "My Site" of the user. I'm asking if there is a REST API (or something like) to get ...
5
votes
2answers
965 views

Get installed apps using REST api

I'm trying to get all installed app on a SharePoint site using the REST API. I couldn't find any information about that. Is it possible?
5
votes
1answer
3k views

Approaches for using REST API on list with more than 5K items

We are building a SharePoint application where an external system will upload data into SharePoint list using REST APIs. The volume of data in the list would be high and it would go above 5k items in ...
5
votes
3answers
8k views

How to use SharePoint RESTful web services with Node.js?

I'm working on a Node.js app and I'd like to use some basic SharePoint services inside the app. I've already done this using java and SOAP web services (copy, list, search) And now I'd like to do the ...
5
votes
3answers
1k views

Get multiple list-items by URL with one Rest API request

I have an array with multiple SP list-item URLs. I want to get all data from every list-item . I solved the problem with a loop that does a Rest API Request for every single URL. I don't like this ...
5
votes
2answers
2k views

The query string “accountName” is missing or invalid

I'm trying to call the "getpropertiesfor" Sharepoint Onlines REST endpoint. https://msdn.microsoft.com/en-us/library/office/dn790354.aspx#bk_PeopleManagerGetPropertiesFor I'm logged in and am just ...
5
votes
4answers
2k views

Rest API to pull all list items that uses a unique Content Type under a specific URL

I am on SharePoint Online environment, where i have a site(Lets call it Site A) https://xxxxx.com/sites/sitecollection/SiteA and multiple sub sites under Site A (Subsite B, Subsite C, Subsite D and so ...
5
votes
2answers
1k views

How can I know REST API request done?

I use in my application a request REST API which works asynchronous. How I can do to know the request is done?
5
votes
1answer
2k views

How to Get Lookup column using lookup column using REST API

I have one summery custom list in which I have lookup column of detail list. So I am retrieve all data from it using expand it. But in detail list I also have one lookup column of personal Detail ...
5
votes
2answers
977 views

how to call external API with Authorization header from SharePoint

I have been trying to call external API using SharePoint hosted Addin past few day ,Due to CORS policy I have been using SP.RequestExecutor for last few days and i'm still unable to call the API, and ...
5
votes
0answers
131 views

Granting Library permissions to external users using REST API

Is there a possibility of inviting external users by e-mail and granting them collaborate permissions using the SharePoint REST API? (See the picture for reference) I have successfully managed to stop ...
5
votes
0answers
181 views

Empty result set with Folders SharePoint Online REST api with throttling

I am using the folders REST api with SharePoint Online to return subfolders for a folder: /_api/web/GetFolderByServerRelativeUrl('folderServerRelativeUrl')/folders. This works great until the number ...
4
votes
1answer
427 views

SharePoint 2016 : REST API issue

I have one list which contains cross-site lookup field. I need to filter with this field using REST API. Below is my URL var url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/Lists(guid'" + listId ...
4
votes
3answers
6k views

SharePoint Framework jQuery REST POST returns 400 Bad Request error

I am totally stumped again as to what is causing my update to fail. The same process works fine using the "old" approach inside a web content editor. Now that I am using the framework the jQuery ajax ...
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': {'...
4
votes
2answers
571 views

SharePoint Online Search is no longer returning People results when logged in as an external user

Calling the search API or using search web parts is no longer returning People results, when logged in as an external user. This was working for years for me, and stopped in early November 2017. I ...
4
votes
1answer
189 views

unable to filter UniqueId

This test /_api/web/lists/GetByTitle('doclib1')/items?$select=ID,DocIcon,LinkFilename,Modified,Editor/Title,UniqueId,GUID&$expand=Editor returns me { "d": { "results": [ { ...
4
votes
4answers
3k views

How to retrieve sharepoint list items attachments URL along with all other fields using REST API

PFB the code: $.ajax({ url: _spPageContextInfo.webAbsoluteUrl+"/_api/web/lists/GetByTitle('List Name')/items", type: "GET", headers: { "accept": "application/json;...
4
votes
1answer
54 views

REST: Create SP List with specific URL

How to create SP list via REST with List Title XYZ, but with List URL ZYX? I.e., Title and URL being different.
4
votes
1answer
158 views

Creating a form to collect submissions and collate them into a report

The task An executive report is compiled on a monthly basis with submissions from various departments. Currently a Word document is received from each department and they have to be manually merged ...
4
votes
1answer
2k views

Get all files inside a folder in a library using REST in SharePoint

I want to Get all files inside a folder in a library using REST in SharePoint. I have tried this code var folderUrl = '/attachment/test/1'; var url = _spPageContextInfo.webServerRelativeUrl + "/_api/...
4
votes
1answer
346 views

Update custom user profile property using JSOM in sharepoint 2013 on prem

How can I update user profile property using JSOM in Sharepoint 2013 on prem. Any ways will do either by REST or JSOM.
4
votes
1answer
339 views

Credentials popup issue while adding a user to SharePoint group with REST API

I am using SharePoint 2013 On-premise, We have two SharePoint groups(Group-A, Group-B) in a SharePoint site. Group-A is owner group of Group-B, Generally Group-A users can add,delete users from Group-...
4
votes
1answer
834 views

How to copy All Documents from Document Library to Document set

I have 2 Document Libraries Doc-A & Doc-B.I want to copy all Document from Document Library to Data set of Document Library-B. Using workflow & rest API.
4
votes
3answers
2k views

$batch operations on SharePoint 2013 on-premise not working

I need to do bulk inserts and learned that there is the $batch operation in the REST API. https://msdn.microsoft.com/en-us/library/office/dn903506.aspx I read through this and following and explored ...
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 ...
4
votes
1answer
1k views

unable to copy all documents from one library to another

I am trying to copy multiple documents from one library to another using SPD workflow2013 in which am using REST API's and Looping, for copying single document I followed This article and it works ...
4
votes
1answer
354 views

How to get the type of a web part (with JavaScript)?

I need to determine the type of a web part (eg. Script Editor, Search Results, etc.) on pages using JavaScript. I started with REST and succeeded in getting the web part manager for a page and got ...
4
votes
3answers
2k views

Loader Image on Synchronous call - Rest Api SharePoint

Stuck with "Loader" while deleting items. I have a set of items to delete and need to display a loader image while deleting. But, for some reason, i'm not able to solve this. I have came across ...
4
votes
1answer
847 views

Rest API Refinement Filter on Lookup Column

I am able to use the refinementfilters with the search api to refine a search for documents in a document library with this: /_api/search/query?querytext='(Search Term)+AND+(path:https://mysite....
4
votes
1answer
419 views

Using `SP.ClientContext` vs REST APIs in JavaScript

We are currently building an application and we have to create/update/fetch items in SharePoint lists. We are currently using REST APIs for just about every functionality. But now we need to update ...
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 ...
4
votes
1answer
166 views

Get number of views of blog post in Blog Site using Javascript Object Model or Rest API

How to get the total number of views of blog post in Blog Site using Javascript Object Model or Rest API ? Blog Post view will be count only one time for one user.
4
votes
0answers
246 views

Rest api to post documents, pictures in custom news feed web part

I have created custom web part for news feed.I can post text content through the rest API ,but I need to post images and documents through the rest API. I followed msdn blog also.In msdn blog text ...
4
votes
0answers
123 views

Rest API Data filter from Lookup column by current user and show in dropdown

I want to show data in lookup column. from a list which contains lookup column and Username and another list which contains lookup value. Example: List1 contains Text column value and List2 ...
4
votes
0answers
947 views

Authenticate to SharePoint REST API from external service

I am trying to figure out how to authenticate calls to our on premises SharePoint 2013 REST API. So far, I've come across a lot of blogs that show you how to do it for SharePoint online. Here's one ...
3
votes
3answers
11k views

Sharepoint 2013: Rest API - does header need to include X-RequestDigest?

I'm making progress in learning to use the rest API (HTTP web service) in SPD. WF1: Acivates to a change to a list. WF1 is suppose to launch WF2 using the Rest API. Within WF1 I have the WF2 GUID ...
3
votes
2answers
3k views

SharePoint get “Modified By” field from Library using REST API

I want to retrieve the OOTB Modified By value using REST API. I tried the below options in my REST Query: Editor/Title&$expand=Modified By Editor/Title&$expand=Editor I am getting the ...
3
votes
2answers
164 views

How to get today task from multiple team subsite's task list?

If I enter the project name in a project list then based on that project name it should create a team subsite which will contain a one task list. for example there are a 100 team subsites and each ...