Questions tagged [rest]

The REST (Representational State Transfer) interface in provides access to lists and libraries as a relational data service. A core concept of any RESTful interface is the resource, and in SharePoint Foundation, lists and items are represented as HTTP resources that can be addressed by remote URLs.

1
vote
1answer
808 views

Create List item Sharepoint 2010 REST with Choice column

I am trying to create one new list item in Sharepoint 2010 using REST. Coding var itemProperties = { 'Title': ;Raja;, //Single line String 'Expiry_x0020‌​_Date': "02/02/2016", //Date '...
10
votes
2answers
7k views

getFileByServerRelativeURL fails when the filename contains a quote

I'm using the SharePoint online REST API. Things generally work fine, but I'm failing to figure out how to get information about a file (document) that contains a quote in its name. Here's my REST ...
0
votes
2answers
901 views

REST query not able to filter by FileRef, works in on-premise but not online

I have a REST query which works as it should in SharePoint 2013 on-premise, but not in SharePoint Online. The query is as follows (after encoding): https://<tenant>.sharepoint.com/projects/1/...
0
votes
0answers
12 views

SharePoint 2013 create text file in a library via REST

I am trying to create a text file in alibrary named "testRestDocs" The dev tool console the following error message: _spPageContextInfo.webAbsoluteUrl + "_api/web/getfolderbyserverrelativeurl('/s/...
3
votes
1answer
850 views

Retrieve Images Not Working Via REST API

I am trying to retrieve Images using the REST API from iOS/Android. The issue I’m running into is when the images are stored in the /sites/siteName directory, the REST call does not work. Let me ...
0
votes
1answer
11 views

Get a document modifiedBy in JAVA with RestApi

As you can see in images, I have some folder in my document library. I wanna reach the files in the folder and take the "modifiedby" column and change it with java-rest api. I can reach the file ...
0
votes
2answers
23 views

Sharepoint API authentication without OAuth

I'm trying to make an integration work between JIRA and Sharepoint to populate values in a custom field in JIRA from querying the Sharepoint API, but the JIRA Addon I'm using to does not support ...
0
votes
1answer
1k views

REST Service API executor.executeAsync Call Ends in Failure Function in Sharepoint Hosted App

Any Answers Will Help me to Forward and Gain Knowledge in SharePoint Development While i am Trying to get the list Items Using Rest API Calls in SharePoint Hosted App Using Below Function function ...
3
votes
2answers
635 views

SharePoint Online Create Site Collection using REST api?

Is it possible to create a site collection using the SharePoint Online REST api? I found some old notes about using admin.asmx in 2007/2010/2013 but I can't find anything related to SharePoint online ...
0
votes
1answer
15 views

Bypass password in sharepoint for external service

I have a external webservice that uses service account to login into sharepoint to access sharepoint apis. The problem we had is that the password would expire every 3 month. We want to seek out a ...
0
votes
1answer
16 views

403: Forbidden when trying to update item properties with SharePoint API

In my .NET Core API I'm trying to update a document library item property with the SharePoint API. I already succeeded to get the document library item by id and by filter. When I try to update an ...
1
vote
1answer
817 views

Sharepoint REST api: wasn't $.Ajax supposed to make asynchronous calls?

I don't understand why my code is running synchronous. At least it is what the attached print-screen shows. Are my assumptions correct? <script src="../SiteAssets/js/lib/jquery-2.2.0.min.js">&...
2
votes
1answer
33 views

Restrict the run of workflow

I have field that has attachment. And i have a workflow which triggers when item created or modified. How can i restrict the running of workflow when an attachment is added
10
votes
2answers
34k views

Get all Files and Folders in one call

I want to get all the files and folders contained inside a SharePoint folder in one rest API call. We have the below API to get all the folders inside a folder <YouDomainServer>/_api/Web/...
1
vote
2answers
20 views

Get the data from Multi line Text field and set it to text area line by line

I have a multi line rich text field and I want to get the data from column and set in text area line by line. I tried Splitting but I need another solution if possible.
0
votes
1answer
598 views

How to save CSV data to SharePoint 2013 list without iterating through the each record using JavaScript/REST?

I am having CSV with more than 3500 records. My need is to import the CSV data to SharePoint 2013 custom list. I have to achieve this programmatically. I have already tried some bulk operations/...
0
votes
1answer
23 views

Search REST API - An unknown error occurred

Wondering if you could help me please, I am currently calling the SharePoint rest search api with a number of parameters as below: GET: https://tenant.sharepoint.com/sites/sitecol/_api/search/query? ...
2
votes
2answers
1k views

Updating SharePoint list field property

I am trying to set the property ReadOnlyField to false on a column using the REST API. I am trying to do this using Postman in chrome and not able to get this to work. The Microsoft API lists how to ...
4
votes
2answers
243 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": [ { ...
0
votes
0answers
16 views

Query project server custom fields values when MSP_EpmProject_UserView is missing

Recently, I’d wanted to query one of my custom fields values from project server 2016 database but I couldn’t find MSP_EpmProject_UserView in my content database views!! After a few searches, I found ...
0
votes
1answer
18 views

The query to field 'list/ChoiceField' is not valid."

I have a lookup list that contains a choice field. I'm trying to retrieve it's values using rest Expand= "list" Select= "list/ChoiceField" I get The query to field 'list/ChoiceField' is not ...
1
vote
2answers
611 views

Read, Write, CheckIn/Out files in SharePoint 2010 with REST

Is there a way to Read, Write, CheckIn/Out files in SharePoint 2010 with REST? It is possible with SOAP but transferring base64-encoded seems to be inefficient. Thanks
0
votes
1answer
628 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 ...
3
votes
2answers
882 views

get user detail list of people who having access of ListItem/Folder SPD or Rest Api

I wanted to notify via email all those users having access or shared the listitem/folder and file with given item level permission. As my solution I was sending notification to the shared with field ...
1
vote
1answer
851 views

Can I Upload File with Metadata and Additional created Column Value in Document Library using Rest API

I am trying to Upload file in Document Library with its meta-data like file name using REST API. I have also created custom lookup column there in document library. now I also want add data in that ...
0
votes
1answer
17 views

Problem with User ID in different UserInformationList queries

I have got a custom SharePoint site setup, using JavaScript REST queries, and need to write a user into a "To" field of a custom list (setup as a Person field). The site is at <domain>/sites/...
0
votes
2answers
32 views

SharePoint rest api not bringing items from List

I tried to use Rest API to get list items in Office 365, the list has 3 items in total. When I visit the below URL: http://sitename/_api/web/lists/getbytitle('List Name')/ It shows list ...
1
vote
1answer
836 views

How can I loop through a json result by substituting field/column names with a variable

How can I loop through a json result by substituting column names for a variable End result: I'm building a table from a list (~25 columns). I want to attach custom classes to each cell based on the ...
0
votes
2answers
1k views

Populate person field of custom list via REST

How do I get the values of get_id() function into person/group field via REST? I know the syntax of the REST part has to be like: 'AssignedToId': {"results": [ID1, ID2,...]} But how do I load the ...
1
vote
1answer
885 views

SharePoint Online REST: Get User Profile Properties in 2013 Workflow

I'm looking for some help with a REST call I'm attempting to make in SharePoint Designer 2013 Workflow. The site is on SharePoint Online. The call is to get info related to a specific user account. ...
2
votes
1answer
533 views

Search API not returning all user objects

I'm trying to use sharepoint search rest api to return all the users in my organisation but it's missing a few for some reason: This is what I'm trying: var url = _spPageContextInfo....
2
votes
1answer
841 views

Search REST API call not working for anonymous

I'm trying to execute the following query for anonymous users. But, its not getting any results. When login, its working fine. Any idea about this ? /_api/search/query?QueryText='Category: "About ...
0
votes
2answers
49 views

REST API - Retrieve Group Members

We are using SharePoint Online. I am planning to add a flow to send out an email notification whenever a new page is added to the site. To do that, I need the list of members of that site cause I ...
0
votes
1answer
41 views

Read content of a file and display the result

My scenario: I am using SharePoint 2019, I am using the code below to search for a particular word in all the files found on the site. Once the files with the word that is queried is found, I want ...
0
votes
1answer
1k views

O365 Rest API Date/Time Fields Adding an Hour Since End of Daylight Savings Time

Here's what is happening in a nutshell. Date/time values for during DST (last week) are stored to reflect the actual local time. However, date/time values since DST ended (this week) are adding an ...
1
vote
0answers
18 views

Difference between List.ContentTypesEnabled & List.AllowContentTypes

I would like to enable content types on lists with REST. Microsoft says this about these properties: List.AllowContentTypes: Gets a value that specifies whether the list supports content types. ...
2
votes
2answers
640 views

Filtering Calendar Items Using REST API

I'am trying to get calendar items and filtering by EventDate and EndDate fields using rest api. DateTime field filtering works fine on other lists but I can not filter calendar items by EventDate and ...
2
votes
1answer
966 views

SharePoint REST Connection to Return Data - Error

I would like to ask your help to this scenario: I am trying to return item data from a SharePoint 2013 list using REST I am using this url: http://sharepointsitecollection/subsite/_api/web/lists/...
4
votes
1answer
881 views

preflight returns 401 response even though headers correct

I am trying to access a sharepoint server REST api to upload some files. Access is via our tomcat application Although I believe I setup correctly the headers in IIS the request does not pass the ...
0
votes
2answers
29 views

How to authenticate to use SharePoint rest api

I am using the code below and am getting unauthorized access. Can you guys show me what i am missing here.I am using SharePoint 2019. string URL = "http://sharepoint/sites/test/_api/search/query?...
0
votes
1answer
934 views

REST API Files in Folders from Document Library

I am building SharePoint add-in on Office 365 based on angular JS. I followed another article here to try and read documents from a folder in a document library from the HostWeb. here is the URL ...
0
votes
3answers
945 views

REST MERGE listitem forbidden (403)

I am trying to update a field in a list item via REST. I'm using the same passing of security info with the XML-RequestDigest header that works for adding items. Here is my REST call (via javascript ...
0
votes
1answer
18 views

PWA Workflow gets Access Denied for API Call to get Assignments

I have a SPD 2013 Workflow on our PWA site that has been working fine for 6 months. My colleague has left the business and Admin have disabled his 365 account. Suddenly, the Workflow is failing and ...
0
votes
1answer
1k views

Check In file with Javascript and REST

I am trying to check in a file from my sharepoint-hosted app with jsom and rest, but it wont work my code look like this: function checkInFile() { var hostUrl = decodeURIComponent(...
2
votes
3answers
15k views

SharePoint online REST: Get users profile properties

I'm looking for some help with a REST call I'm attempting to make in SharePoint Online. I'm doing an add-in that gives me the name, birhday and photo property of all user in user profiles I tried ...
0
votes
2answers
29 views

How to create a folder and a folder inside a folder using REST/JSOM/Flow in a Custom List (Not a library)?

The requirement is: When an item is created in a custom list, a folder should be created with the same name as Title of the item and the item should be placed inside the folder.
0
votes
1answer
603 views

How to retrieve value from SP.Data.UserInfoItem- rest odata

When i retrieve data from a person and group column this is what i get as a string below {"__metadata":{"id":"3d427c6e-2322-4121-b106-f248277eab3f","type":"SP.Data.UserInfoItem"},"LastName":"XXX"} ...
2
votes
2answers
1k views

Search REST API with the User Profile Service and Hyphenated Last Names

Using the Search REST API to get all users where their last name begins with a certain letter to make a custom user directory. For example, I hoped that the following would return all users that have ...
1
vote
1answer
1k views

POST request for Office365 using REST API

I want to POST method request for Office365 using REST API. For example, Feed/Post, Post/Reply, and Post/Like. Request Header: Accept : application/json; odata=verbose Content-Type: ...
0
votes
2answers
1k views

Using REST: Security invalid error with SharePoint Add-in

Currently getting an error when using REST to upload a file within SharePoint. Error reads "The security validation for this page is invalid and might be corrupted. Please use your web browser's Back ...