Questions tagged [sharepoint-rest-api]

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

436 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
17
votes
1answer
416 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 ...
8
votes
1answer
368 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 ...
6
votes
0answers
828 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
1answer
195 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.
5
votes
0answers
150 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
193 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
85 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
3answers
679 views

Get columns type via REST

I successfully managed to get columns names but now I'm trying to get columns type via REST but surprisingly I didn't found something on it in documentations (or maybe I missed it). It's really ...
4
votes
0answers
288 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
131 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
1k 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
0answers
559 views

Using Rest API call to get list item in SharePoint 2010 workflow

I am trying to get list item using REST API syntax in SP Designer workflow. The url format is as follows: https://example.com/_api/web/lists/GetByTitle('List%20Name')/items(2952)?$select=...
3
votes
0answers
697 views

Sharepoint Online Rest api 403 forbidden

Trying to build an external c# web app that pulls information from SharePoint online using the rest api. rest call: https://mysite.sharepoint.com/sites/mySubsite/_api/web/lists/GetByTitle('My Repo')/...
3
votes
1answer
104 views

REST API equivalent of SPRoleAssignmentCollection.AddToCurrentScopeOnly

To add a custom permission to a List or an item, we can use SPRoleAssignmentCollection and we can also use AddToCurrentScopeOnly to avoid adding users with Limited Access permission to the parent. In ...
3
votes
2answers
99 views

Create folder in recently created folder

I'm using the function below to create a folder and I'm trying to make it also create a subfolder within the newly created folder. CreateFoldersbyparent("abc","") CreateFoldersbyparent("abc","\test") ...
3
votes
0answers
231 views

What is the purpose of “EntityPropertyName” property of field?

I am getting all list fields using REST API, In result, I found there is "EntityPropertyName" property for each field. For some fields, it shows exactly same value as "InternalName" property But for ...
3
votes
0answers
670 views

What is the Max File Size which can be uploaded to document Library through Rest API?

I am assigned with the requirement to upload multiple documents to the SharePoint online document library through rest API I have seen in the MSDN documentation that max limit is 2GB I want to know ...
3
votes
0answers
571 views

Search the document library using rest api in Sharepoint including its content

I dont require sharepoint search answers.I require using JS/Json/Web service/rest api.If i type anything in search box in top nav it should go to another page and show the results.Is there any way to ...
3
votes
0answers
60 views

How to show sharepoint context menu on my javascript page?

I have created a page and created list with the help of REST APIs, and also done some styling. This all working fine, but I need to show the custom sharepoint list context menu on this as below image. ...
3
votes
1answer
110 views

No default value for a column when copying files using rest API (SharePoint 2013 standalone)

I am trying to copy files from one SharePoint folder to another, using REST API, but I see that although all the files are copied, only some get default value for a particular column, while others do ...
3
votes
0answers
277 views

Uploading Large PDF Files in Sharepoint Library

I want to upload large PDF Files in a Sharepoint Library . I tried from normal code from GetFolderByServerRelativeUrl method and it is working fine , but taking too much time.(for ex. a PDF of size ...
3
votes
1answer
1k views

SharePoint 2013 REST API call Threshold limit

I am fetching data from a list using REST call. I have added filter query in the REST url also the the column on which filter operation id done is set as Indexed column in the list. The no of items ...
3
votes
0answers
724 views

Search query for keyword search in a particular list Sharepoint Hosted app/add in Online

I am trying to add keyword search functionality using REST api on a particular list. I have got the result using the query as : var queryUrl = appWeb + "/_api/search/query?querytext='" + keyWord + "+...
3
votes
1answer
530 views

Filter list items using custom field type in REST API

I have a custom field type created by inheriting default SPFieldLookup type field. I have a SharePoint custom list with these type of fields. I want to fetch list items from this list using REST API. ...
2
votes
0answers
25 views

SPException User cannot be found rest api

Hoping you can help, I currently have a REST query that returns a number of items however this is currently returning 'User cannot be found' { "odata.error": { "code": "-2146232832, ...
2
votes
0answers
33 views

Get document library size (REST API)

Does anybody know if there's any property on the document libraries that tells me the size of it? Or how many of the items that's folders and how many thats's files. I know I can query each library ...
2
votes
1answer
40 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 ...
2
votes
0answers
75 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 ...
2
votes
1answer
121 views

SharePoint 2013 RestAPI retrieve Task and subtask Parent id undefined

I am trying to retrieve the sub-task of the parent task from a list. query: ../_api/web/lists/getbytitle('Tasks')/items?$select=Title,Status,ParentID/Id&$expand=ParentID Code: function ...
2
votes
0answers
29 views

How to receive error description of invalid REST call in required language?

If my REST call to SharePoint server is invalid it returns error information with code and description, but always for xml:lang="en-US" language. For example: <?xml version="1.0" encoding="utf-8"?&...
2
votes
0answers
46 views

What permissions do I need to get the request digest of a SharePoint site using SharePoint's REST API?

What permissions do I need to get the request digest of a SharePoint site using SharePoint's REST API? If I have view only access to the site but I have contribute access to a list on the site can I ...
2
votes
1answer
428 views

Accessing SharePoint site list from Angular client

If I go to Microsoft's Graph Explorer and use a URL like: https://graph.microsoft.com/beta/sites/4development106.sharepoint.com:/sites/DBSchenker:/lists/OEC_Docs/items I can see my request succeeds. ...
2
votes
0answers
255 views

Find a document by the document ID REST API

I have looked around for this question and either couldn't find the answer or mis-understood it. Here is what I am looking for: All I have is a DocID from Sharepoint and I need to do a search on the ...
2
votes
1answer
108 views

Call rest api from provider hosted app

I want to call this API -> /_api/SP.UserProfiles.PeopleManager/GetMyProperties from SharePoint provider hosted app, but whenever I'm calling this API what I got is 403 forbidden issue. Here is my ...
2
votes
1answer
488 views

What is the correct way to create a custom action using REST API in SharePoint Online?

I'm trying to use Microsoft Flow and the Send an HTTP request to SharePoint action to deploy an SPFx application customizer to a modern team site. I'm able to use the /_api/Site/UserCustomActions ...
2
votes
0answers
544 views

Access-Control-Allow-Origin' not allowed access SharePoint Ajax call cross domain

I am trying to access cross domain service using ajax call in sharepoint. getting below error Failed to "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-...
2
votes
0answers
250 views

How to access a file given the absolute url of a SharePoint document via Microsoft Graph

Is there any way to access a file given the absolute url of a SharePoint document via Graph (or rest)? For example, how would I download a file with the absolute url "https://microsoft.sharepoint.com/...
2
votes
0answers
457 views

How to get a list of all Lists having a specific ContentType using REST API

In the new Sharepoint Framework need to build a reusable web part by having a list selection dropdown on the web part property pane. Hence, in order to build the property pane of the web part, need to ...
2
votes
0answers
417 views

Rest to filter files using modified date

I am using below api to get files in descending order of modified date, but it not working. url = _spPageContextInfo.webServerRelativeUrl + "/_api/Web/GetFolderByServerRelativeUrl('...
2
votes
0answers
289 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
0answers
476 views

How can I get Managed Metadata column values from sub sites by using rest API in SharePoint hosted app?

I have used two method to achieve my goal: var REQUESTEXECUTOR = new SP.RequestExecutor(APPWEBURL); REQUESTEXECUTOR.executeAsync({ url: _ihda.appWebURL + "/_api/sp.appcontextsite(@target)/...
2
votes
0answers
42 views

Unable to see All columns of list in result which is generated by Caml Query

here I am passing caml query to REST Api to get some result on sharepoint online 2016, the same query works fine on sharepoint 2013. my caml query is as below var viewXml = ""; viewXml = { ...
2
votes
0answers
246 views

Using javascript/REST API to access SharePoint data from CRM online

Is it possible to query Onpremises SharePoint site from a html page living inside CRM online and display the list of documents from a library? The Html page also needs to interact with Azure service ...
2
votes
0answers
58 views

Send mail to “Shared Mail Box” address using JSOM

I am able to send mail using this article : Send E-mail from javascript using REST API What changes do I need to make to send email to a "Shared Mail Box" email address.?
2
votes
1answer
662 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/...
2
votes
0answers
268 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
0answers
195 views

Retrieve Specific Tags in SharePoint 2013 REST API

I'm having some trouble with the following, i'm sure it's possible but i don't seem to be able to find an answer online. I'm looking at using the SharePoint 2013 REST API to try and pull back ...
2
votes
0answers
550 views

sharepoint file download link using rest api

I am doing Salesforce integration with SharePoint using OAuth 'client_credential' method. I am able to fetch file content and but unable to render that content as a word or pdf.or image file. Is there ...
2
votes
0answers
129 views

Read excel file in library1 and update excel file in library2/list using powershell in sharepoint online

If user enters/updates raw data in excel file in document library1 which resides in SharePoint online site updated data should be reflected automatically in excel file in other document library2 or ...
2
votes
1answer
128 views

SharePoint Online API for trending documents in mysite

Is there any API to fetch all the trending documents in My Site.