Questions tagged [sharepoint-rest-api]

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

693 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
42 views

How can I edit the Tasks list Item? I want to update the Task RelatedItem value

var TaskItemObject = { "__metadata": { "type": "SP.Data.TasksListItem" }, "RelatedItems": '[{"ItemId":3,"WebId":"81d0cd95-2364-48a7-a7c3-f8fdaa2e263c","ListId":"1596591e-928a-4e59-b4b0-...
1
vote
0answers
165 views

Trying to do a POST from SP to Service Now

I have been trying to do a post in Service Now through an angularjs form in SP, however I am always getting a CORS error. I've taken all CORS rules from Service Now and still am getting this error and ...
1
vote
0answers
268 views

Addroleassignment uses a subsite specific principal guid using Rest

I am trying to add role assignments to SharePoint Online to a folder on a personal sub site. I looked up all the users against the parent site and I have a guid of 282. When I try and assign a new ...
1
vote
0answers
75 views

How to Check if a SharePoint Item satisfies a CAML Query condition - Javascript (Rest or CSOM)

For one of my current project I am working on following requirement, Whenever a User Opens any item in SharePoint List on edit form, display form, I want to check if the item being opened satisfies ...
1
vote
2answers
694 views

List item created with REST API not triggering workflow

I have a SPD 2013 workflow on a list that has an App step in which it creates a List Item on a Targetlist in a different Site Collection using the Call HTTP Webservice action with HTTP Post to create ...
1
vote
1answer
1k views

How can I create a alert through SharePoint REST API?

Is there any REST API which can create the alert on a SharePoint List? We have a customized website which user can view files on SharePoint, but when user want to subscribe to a folder or file ...
1
vote
0answers
26 views

Function call not calling synchronously REST

I am trying to create a HTML list with the below code. I have managed to create it. but for some reason the output is not in order. Is the function calls synchronously? when i put alert(heading); in ...
1
vote
1answer
9k views

C# REST Add File to SharePoint Library

I'm trying to upload a file to SharePoint 2016 On-Prem via the REST API, I'm currently getting 403 Forbidden Response. SharePoint is sat behind ADFS, I'm successfully authenticating, and I'm sending ...
1
vote
1answer
554 views

Get documents thumbnail using pnp-js-core or rest api

How can I get documents thumbnail using pnp-js-core or rest api. I need to render a document card with its thumbnail. Thanks.
1
vote
1answer
405 views

Extracting attachments URL from list items

I won't be unique with my question: I just need to get normal URLs to all attachments from SharePoint list items. Unfortunately I can't use JavaScript or any 3rd party solutions (have neither ...
1
vote
1answer
51 views

adding file by ajax - using rest API

When using this code for adding files: $("#getFile").on('change', function () { var idVal = $("#" + itemID).val(); var files = this.files; $.ajax({ url: _spPageContextInfo....
1
vote
0answers
1k views

VBA: Get request on a SharePoint list

I'm trying to get elements of a Sharepoint list with VBA to show and use them in an Excel sheet. The normal get request on MSXML2.ServerXMLHTTP60 Dim xmlObj as Object Dim sUrl as String sUrl = "...
1
vote
1answer
5k views

Upload a file to SharePoint document library using post man

Need to upload a file to one document library SP2013 , and see the response in POSTMAN, using REST API, which format , which parameter to pass
1
vote
1answer
5k views

Batch update/create list items using REST API in Sharepoint 2013

I know the OData batch process built into SharePoint Online 2016 and O365 has not made it to SharePoint 2013 Online, but I have read a few places that say using a batch create/update IS possible in ...
1
vote
1answer
281 views

Call REST API from a console program OUTSIDE Sharepoint server

I'm trying to call a corporate Sharepoint REST API in order to retrieve a list data. When I use the browser I'm able to call the API (I use Restlet Client to test) provided I log first into the ...
1
vote
2answers
422 views

Break inheritence at itemlist level inside my SPFX webpart

I'm facing this error while using the endpoint below, to break the inheritance of permissions at itemlist level: const spHttpClient: SPHttpClient = this.context.spHttpClient; spHttpClient.get(...
1
vote
1answer
202 views

rest api to insert value in title field of list

I want to insert "100" value in my sharepoint list title field. I tried jsom but it not even giving alert. Below is the code. What change I need to make in JSOM code or can someone help with rest api. ...
1
vote
1answer
74 views

Results Limit for Expanded Field

I need to get all items for a series of lists and I'm hoping to do this in a single call to the REST API. Right now I can get all lists within a site and get can each list's content by using $expand=...
1
vote
1answer
75 views

How do I enter an item ID from one column into another

I am currently developing a SharePoint site for managing contract tenders. The site is currently laid as follows: I have a subsite in the main site collection. This has custom lists which holds the ...
1
vote
0answers
248 views

Custom Outlook form that saves data to SharePoint list

My requirement: A form with check-boxes, labels and buttons inside a outlook email that can take input from the recipient of the email and when submit button is hit should save data to SharePoint ...
1
vote
0answers
209 views

Approaches to overcome 255 characters limit of string variable in visual studio 2013 declarative workflow

We have one visual studio 2013 declarative workflow. In this workflow we are retrieving value of multiple line of text field & storing it within string variable. Now, We are passing this string ...
1
vote
1answer
486 views

How to get a list or library name if you have the full url of the list only?

SO I Have the list or libraru URL. Now i am trying to get the title of the list or library. not all the time the URl has the same title has the list or library has here is my example https://...
1
vote
1answer
116 views

How to get data from SharePoint host header site collection to another host header site collection with in same Web application

While Getting data from SharePoint host header site collection to another host header site collection using rest API we are getting 401 unauthorized error. please help. Source URL: http://cph....
1
vote
0answers
88 views

Can't set Context in Provider Hosted App

I'm trying to get access to context in a provider hosted Sharepoint App, so that I can use the following to move folders via javascript: SP.MoveCopyUtil.moveFolder(context,currentFolder,...
1
vote
1answer
571 views

GetFolderByServerRelativeUrl api returning nothing

http://sp.domainname.com/_api/Web/GetFolderByServerRelativeUrl('listname')/Folders returns nothing but <?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:...
1
vote
0answers
15 views

What's more optimized in a list: several items with one number each, or one item with a string containing several numbers?

I'm using a Sharepoint list to keep track of items that users have favorited, mapping user aliases to item IDs. I have two options, and I'm wondering which is more efficient. One makes for less total ...
1
vote
0answers
51 views

How to retrieve Version history of lookup column using jquery?

How we can retrieve version history for a lookup column in custom list using jquery SPservice or using rest api?
1
vote
0answers
143 views

Get Original Link of Link to document using rest api in sharepoint

I am using a link to document in document library. when i fetch all document using rest API I am not able to get the original link of Link to Document. How can i get that. Thanks
1
vote
0answers
51 views

Invalid API response while removing public links for a document (though the action is performed)

I'm noticing a strange API behavior where the action goes through but the errors say Bad request. This was working fine 4 days back. Now, it is returning the following response {"error":{"code":"...
1
vote
0answers
79 views

How can I calculate the average of a sum of list column data, excluding zero values?

I have 10 users who have each ranked 10 items (1-10) in a list. I am using REST to post their rankings to a second list called my 'Rankings List'. This rankings list has 10 items in it for each user, ...
1
vote
1answer
216 views

How to Change pagination in SharePoint default search

How to Edit or change Pagination in sharepoint default search page? I want to put button for next and previous it is possible.
1
vote
1answer
76 views

SharePoint List dialog box URL

How to get url of List dialog box in SharePoint? It means that when we click on newform.aspx How to detect that it is newform.aspx?
1
vote
1answer
525 views

How to get site owner using JSOM/REST when logged in user has read only access

How to get site owner using JSOM/REST when logged in user has read only access. currentContext.Site.Owner or REST API, fail with unauthorized access error. As it is just readonly property it should ...
1
vote
0answers
384 views

Download pdf document from Sharepoint library to local folder

How to download Pdf from document library to local folder using rest api or jsom? anyone has idea? help.
1
vote
1answer
85 views

Create List / Library with Different URL and Title

I'm trying to create a document library with a different URL and Title in one operation, as opposed to creating then updating the title. { '__metadata': { 'type': 'SP.List' }, '...
1
vote
1answer
2k views

REST API System.FormatException: Input string was not in a correct format

I've encountered a strange problem with Rest API. I use it to collect data from SharePoint to my report. It works fine for all libraries on my site except for one. String that I use: https://<my ...
1
vote
0answers
345 views

Creating new Sharepoint Document folders and sub folders programatically

How to create New Document Directories and sub directories programatically in SharePoint Site Document Library using PHP REST API calls. Any example is appreciated.
1
vote
1answer
2k views

Update list item using REST Merge, but field names are ambiguous

I have a sharepoint online list which I am updating via javascript in the same sharepoint site. The list has two similarly named columns: Display name: "Learner Score" Internal name:"LearnerScore" ...
1
vote
0answers
70 views

query multiple sharepoint task list

Please I need to query multiple SharePoint default task list using SharePoint Rest API. With the code below I can only query one list, https://fabrikam.sharepoint.com/_api/web/Lists/getbytitle('...
1
vote
0answers
67 views

Recurring Event Created by SPD Web Service Call gives error Item does not exist when trying to open in Calendar view

I have tried adding the following code (found [here]) to remove the timestamp from the url after creating the recurring data item from a SharePoint Designer 2013 workflow using the Call to Web ...
1
vote
0answers
100 views

PUT survey results on SharePoint 2013

I have a custom survey form build in jquery mobile. How can I PUT the json string with results on the Sharepoint server? var jsonstring = JSON.stringify(form_data); It doesn't really matter if each ...
1
vote
1answer
869 views

API POST Call "Failed To Fetch"

API Post call returns "Failed to Fetch" I have created a SPFx Web Part using React. It implict authenticates and acquires access token. When i am calling graph api for GET it works fine. ...
1
vote
0answers
1k views

403 Forbidden - sharepoint APIs

I am facing a strange issue with the access to SharePoint APIs using an access token. I have generated the tenantid and client_id using the below URL https://<site-name>.sharepoint.com/...
1
vote
1answer
146 views

geturlvars - regex explanation sought - SharePoint 2013

I'm relatively new to javascript and i am currently working on a project that has previously had a SharePoint contractor involved, person has now left the organisation. He has used some script on an ...
1
vote
0answers
269 views

REST API to activate publishing feature

Need to activate SharePoint Server Publishing feature from SharePoint Hosted App by using REST API at Site level. I've tried below code, function activateFeature() { $.ajax({ url: siteURL + "/_api/...
1
vote
0answers
311 views

Programmatic (using HTML, javascript, ?) create link to open excel/doc/pps files in client application

Lately, I'm facing a problem with SP 2013. I Created my own GUI in .aspx file but without using any Web Art. I created view list of files using REST API, and now I want to open files but not in ...
1
vote
0answers
352 views

Getchanges() rest api fetching only 1000 records

I am using sharepoint rest api to fetch all change logs of a sub site using https://XXXXXX.sharepoint.com/sites/XXXX-Test-SharePoint/_api/web/getchanges But it is fetching only 1000 records I want ...
1
vote
0answers
251 views

Retrieving Sub Site data Rest Api is not working for java code

I am trying to get last modified Sub-Sites from sharepoint site using Sharepoint rest api and executing rest calls using Java I am using below url: https://XXXXX.sharepoint.com/sites/XXXX-Test-...
1
vote
1answer
623 views

Connecting Kendo UI Chart to SharePoint 2013 REST API

I am a beginner to Telerik's Kendo UI Toolset and am having trouble connecting my UI Chart to our SharePoint's REST API. The chart displays when I debug the add in, in Visual Studio. However, the ...
1
vote
0answers
97 views

Custom Document Library - SharePoint Online

I am trying to create a document library with few managed metadata columns and views (group by, filter etc.) and make this available to the tenant. I know I can save the 'library as the template' but ...

1
3 4
5
6 7
14