Questions tagged [sharepoint-rest-api]

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

Filter by
Sorted by
Tagged with
25
votes
6answers
96k 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/...
10
votes
3answers
20k 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
6k views

How to use SharePoint REST Api in an application that is hosted outside of SharePoint

I have a requirement where I have to perform CRUD operation on SharePoint 2016 List and Libraries using the REST API from JavaScript. The problem is the application from where I need to make the calls ...
8
votes
2answers
6k 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 ...
5
votes
1answer
3k 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 ...
13
votes
3answers
5k 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 ...
5
votes
1answer
12k views

REST API Getting Fields from an Lookup List

I have a REST query that looks like this /_api/lists/getbytitle('MainList')/items?$select=Title,LookupField/Id,LookupField/Title&$expand=LookupField That works fine. But when I try to pull ...
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 ...
1
vote
1answer
5k views

How to perform POST operations in SharePoint 2013 using REST API from external Application

I am trying to perform POST operations in SharePoint 2013 environment using REST API from external application running under the same company domain. Till now I am to do the GET operation successfully ...
0
votes
3answers
777 views

How to bind the REST API result

Today I got requirement to get the list data using rest and bind to html drop down . I am getting the information by filtering it from browser (_api/web/lists/GetByTitle('Tabletop%20Sessions')/items?...
2
votes
2answers
36k views

Connect to Sharepoint Online REST API using Java

I'm trying to connect Sharepoint online REST API using Java. Retrieved cookies -rtfa and fedAuth. Also got xForm Digest value and trying to authenticate. But it always throws Authentication error. ...
9
votes
3answers
18k 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: { ...
8
votes
1answer
2k 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 ...
4
votes
2answers
2k 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 ...
3
votes
2answers
8k views

How to authenticate to SharePoint Online (Office 365) using REST API when On-premise ADFS Sync to Office 365 cloud is enabled?

Many enterprises who use Sharepoint Online leverage the Office 365 integration with an on-premise ADFS. That way they can have the benefit of having Sharepoint on the cloud, but while being able to ...
2
votes
2answers
10k 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="...
5
votes
4answers
4k 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 ...
4
votes
1answer
13k views

SharePoint Online REST API List Items Paging

Can anyone confirm that they are able to page against a SharePoint Online List Items query? Either I'm not understanding how this query is supposed to work or it just doesn't work. tenant.sharepoint....
2
votes
1answer
1k views

Search REST API for documents modified by logged in user

I am working on a query to get the documents modifies by logged in user. I am able to get the documents with the specific file extension. var myurl = _spPageContextInfo.webAbsoluteUrl + '/_api/...
1
vote
1answer
2k views

How to get more than one SharePoint list using REST API?

I have created multiple lists in SharePoint 2013. I need to get the multiple list items using REST API call. I have tried the method to get the multiple list items using API within the for loop but ...
1
vote
1answer
4k views

Break inheritance on a folder using REST

I have a SharePoint Online farm. I am trying to break inheritance on a folder in a document library, and then assign permissions to user(s), all via the REST API. I can run this command successfully (...
0
votes
1answer
197 views

Flow to get all site collections in a tenant

Created a Flow by using the below REST call and stored the title and Urls in another list /_api/web/lists/getbytitle('DO_NOT_DELETE_SPLIST_TENANTADMIN_ALL_ SITES_AGGREGATED_SITECOLLECTIONS')/items?$...
0
votes
2answers
11k views

sharepoint rest api get distinct values from list

I have list with two columns, like group and users, while adding item to list am showing existing Groups in list new item form. the Group field is not unique. here my requirement is i want show ...
0
votes
1answer
46 views

Batch Update for 16K Items failing

We are trying to copy contents from one column to the other , However we get request digest error after 6K Items. Below is the code $(document).ready(function () { $("#btnSubmit").click(...
0
votes
6answers
3k views

Removing Duplicate Value in Rest Api

I have a small requirement where in i need to remove the duplicate values from the array that i am getting. Overview In the below code, what i am trying to do is to get top 1000 employee names(Should ...
0
votes
1answer
1k 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 ...
8
votes
3answers
19k 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/...
5
votes
3answers
23k views

Download and upload file from share point using Java (Rest API call)

I Know there are several post on sharepoint.stackexchange/stack overflow for this. But I didn't get from any of the post how to achieve this. I have access of share point (I mean share point ...
5
votes
2answers
3k 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
4k 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 ...
3
votes
1answer
6k views

Multi line text field in REST API filter url

I want to filter the field with data type Multi line text, but somehow am not able to filter that. I guess this didn't work as it contains html code within it, between the div tag my text appears. ...
2
votes
1answer
1k views

Create list alert using REST

I want to create a list alert using the rest endpoint _api/web/alerts/add. For this I build a JSON-string representing an AlertCreationInformation-object. I tested this AlertCreationInformation-...
2
votes
2answers
565 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" ...
5
votes
3answers
14k 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')/...
4
votes
4answers
10k 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;...
3
votes
5answers
5k views

SharePoint Online authorization issue 'Token type is not allowed'

I'm setting up a NEW O365 tenant developer SharePoint Online site to test the REST API using PostMan by following this. I can successful setup Add-ins and generate access token, but when trying to ...
3
votes
2answers
3k views

How to update ModerationStatus (approval status) of a file in share point using Rest API

after check in a file using rest api , it having approval status as 'draft', do we have any rest api url (postman) to update approval status of a file in share point.
3
votes
1answer
1k views

Pass file name having space to update operation using REST API

I am using on premise SharePoint server 2016.I am using rest api to update a list.I have a list having space in it's name so while passing this name it causes problem.Is it possible to pass file name ...
3
votes
2answers
6k views

SharePoint 2013 REST API create list item with attachments javascript

By doing online research, I wrote code to create list item in JavaScript for SharePoint 2013 REST API, code is working fine. I have also wrote code to upload attachments for particular item. The ...
2
votes
1answer
1k views

How to make Two machine search service application using PowerShell?

we are using SP 2016 Enterprise On-Premises Search application , in development environment - used standalone machine with all the components in the same box. But while decided to go for production, ...
2
votes
0answers
489 views

Get Author/creator of a site/subsite using JSOM OR REST API

I am trying to get the Author of a site using SharePoint REST API. But I am getting author name as a blank. Below is the REST Url : https://mysiteName.sharepoint.com/sites/RohitW/_api/web/...
2
votes
2answers
8k 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 ...
2
votes
1answer
1k views

Sharepoint REST API empty value on expanded lookup columns causes error

I have a list with lookup columns. When I get an item from the list and expand the lookup columns, I get an error if any of the lookup column values are empty. For example if I have a list with the ...
2
votes
2answers
4k views

Connect to Sharepoint online REST API using CURL

I'm have created a survey in my company sharepoint online site. The response is collected in a list. I want to extract the data from this list by sending a CURL request from another server to REST API ...
2
votes
1answer
2k views

How to create folder and file in SharePoint at the same time using REST API

Using REST API, is there a way we can upload a file to SharePoint and also create the folder to which file to be uploaded. Say for example here “/testfolder” does not exist already in SharePoint and ...
2
votes
1answer
3k views

Changing the owner of a group via REST API

I'm trying to change the owner of a group via the REST API. I'm working entirely within the host web, so no cross domain calls from the app web. If I run the below code, it succeeds and changes the ...
2
votes
4answers
3k views

Is there any REST API to start a SharePoint designer workflow?

I have a requirement to start a workflow from outside SharePoint. If any REST API exists to start SharePoint designer workflow. Can anyone help me with this, which API should I use for this?
1
vote
2answers
2k 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
1
vote
1answer
841 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) ?
1
vote
3answers
603 views

How to get list item in SharePoint using REST API?

I used this synthax to get list Items http://server/site/_api/lists/getbytitle('listname')/items I get a list repeating today's date but not items . EDIT: I notice that the number of lines that ...