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.

25
votes
6answers
30k views

Send E-mail from javascript using REST API

I want to send email using Javascript/jQuery using REST API in SharePoint. I have tried _api/SP.Utilities.Utility.SendEmail and this is my code: Code $.ajax({ contentType: 'application/...
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/...
27
votes
3answers
42k views

REST expand people column

I have a list with a people column called AssignedTo. I'm making a rest call: .../_api/web/Lists/GetByTitle('listname')/Items?$expand=AssignedTo&$select=*,AssignedTo/Title Which is successfully ...
7
votes
3answers
67k views

How to get all items in a view using REST API

by using rest api I get items like this http://mydomain/_api/web/lists/GetByTitle('MyList')/Items I get the view like this and naturally in it I have the GUID http://mydomain/_api/web/lists/...
7
votes
5answers
9k views

What is the REST endpoint URL to get list of site collections?

If I go to SharePoint 2013 site, click on Admin -> SharePoint, you will see a list of site collections (the link is https://somename-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx) What ...
3
votes
2answers
8k views

Rest to read more than 5000 items from document library

Below is my code to read items from a document library. var url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('DocumentList')/items?$select=customerID"; $.ajax({ url: url, ...
7
votes
5answers
18k views

Checked null with dateTime in REST API SharePoint

I want to get all article pages which Article Date is not null. so I have try to do by this way. var ArticlePageContentTypeID = "...
6
votes
1answer
43k views

SharePoint 2013 REST api to update list item- Uncaught ReferenceError: etag is not defined

I try to update my sharepoint list using REST api. But following code throws exception in browser "Uncaught ReferenceError: etag is not defined " Can someone help to resolve this issue? // update an ...
31
votes
6answers
82k views

REST API filter by start and end dates using 'today'

I'm new to filtering dates with REST in SP but am trying to do something like below but am not sure how to get today's date in as a variable into the request. I don't think I'm too far off so any help ...
8
votes
1answer
19k views

Properties when uploading Files using REST in SP 2013

After a lot of research I finally got uploads via REST working in SharePoint 2013. But I would like to provide additional properties to the Add Function like Title. This code works so far but the only ...
13
votes
2answers
25k views

How to get all properties of all users in SharePoint 2013 Rest API?

I am using this code to get all properties for just myself (current user). But how can I change this so that I can get the same data but for all the users in SharePoint? var oldurl = ...
1
vote
1answer
3k views

Upload multiple files with REST API in document library with custom properties

I am trying to upload multiple documents to the document library, I followed the answer posted on this link, I am able to upload the documents but I have some custom columns in the library, please ...
5
votes
1answer
15k views

Sharepoint REST API - Using caml query and select/expand to get lookup data

I have a Sharepoint app and I use a caml query to filter the data I get back: var caml = "<View><Query><Where><And><Contains><FieldRef Name='PublishingPageLayout' ...
6
votes
2answers
16k views

Creating Folder using REST and JavaScript

I'm trying to create a Folder in a SharePoint Image library. I found an answer here but I can't seem to get it to work var web = 'my relative path to the current web'; var lib = 'name of the image ...
16
votes
3answers
21k views

Updating Lookup Values with the REST API

Is it possible to update a List Item's Lookup Field Value via the Rest API? I can retrieve the field value if I use $select and $expand, but I can't find documentation anywhere that explains how to ...
20
votes
3answers
57k views

Adding new list item using REST

I am currently using Office 365 and lots of REST queries to display data. However I am now creating my own forms using Bootstrap and jQuery. However, how do I use REST to add the data to the list? ...
8
votes
4answers
19k views

Combine REST query “GetItems” action with OData $filter parameter

I'm able to call GetItems through REST by using an example by Erik C. Jordan. Now I'm trying to combine this with a simple OData $filter parameter. I have a REST query like this (jQuery on SharePoint ...
16
votes
1answer
9k views

Is it possible to create a Document Set using REST API

I know this can be done using the JSOM, but is it possible via the REST API to create a document set?
5
votes
1answer
5k views

Update folder name using REST API

I am using REST to update folder name via sharepoint apps. My code as follows: executor = new SP.RequestExecutor(appweburl); executor.executeAsync({ url: appweburl + "/_api/SP.AppContextSite(@...
2
votes
2answers
4k views

Create a document-libary with SharePoint rest api

Is it possible to create a document-library via SharePoint Rest API?
6
votes
5answers
23k views

How to group distinct values from a list using odata rest api

Hi I have a list with two fields "Regions" & "Countries" I am using a rest api to retrieve the list of just regions like so: http:mysitename/_api/web/lists/getByTitle('TaxTool')/items?$select=...
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 ...
15
votes
2answers
4k views

Basic batched get requests using REST API

I'm hunting around on the web right now for some basic (preferably working) examples of making a batch of get requests using the new $batch endpoint in O365 with the REST API. I've located some good ...
13
votes
3answers
18k views

Check users group membership via REST API using AD-Groups in SP-Groups

I am aware that similar questions have been asked around here but none of them answers the part of AD-Groups that are used inside of SP-Groups. I have several SP-Groups in my teamsite. I follow best ...
7
votes
4answers
12k views

Updating SharePoint item using REST API from outside of SharePoint

I need to update (CRUD) SharePoint list items from a stand alone application outside of SharePoint. This application can only use JavaScript to call SP. Deploying it as an app on SharePoint won't be ...
1
vote
1answer
6k views

Get Department for current user using REST API (Javascript)

Is it possible to get the department of the current user using REST API (Javascript)?
17
votes
7answers
79k views

REST with $filter for List Items in Sharepoint 2013

Sharepoint 2013, REST API, native C++ application: I want to get all Folder items from the list. Try /_api/Web/Lists(guid'GUID')/Items?$filter=FileSystemObjectType+eq+1 and get HTTP 400 Bed request. ...
8
votes
3answers
7k views

How to get custom user profile properties in SharePoint 2013 restful api?

In my Sp2013, I tried this link http://mysite/_api/SP.UserProfiles.PeopleManager/GetMyProperties and it gets all properties including the custom managed ones from crawling. And one of them is called ...
6
votes
5answers
55k views

How to select and filter list items lookup column with Sharepoint 2013 REST Feature?

I am using SharePoint 2013 REST. I have list which contains many look up columns, I can get list items through list if they are not look up columns but I can't select and also filter based on look up ...
5
votes
2answers
3k views

Creating a SharePoint Wiki Page via JavaScript and REST or CSOM

I'm fairly new to developing SharePoint 2013 Apps, and I was tasked to customize the Create New Wiki Page for a Site. The user has to type in the Title, I do some processing, and then when everything ...
12
votes
6answers
18k views

Paging using REST/OData with SP 2013

I'm trying to do paging on a document library (also trying this on a list) with SP 2013 using REST/OData but I can't seem to get the skipping of items working. Here are some examples of URLs that I'm ...
11
votes
1answer
11k views

Manage File permissions using REST API

Is there a way to manage File permissions (roles) using the REST API? http://msdn.microsoft.com/en-us/library/office/jj860569(v=office.15).aspx I'm developing an app asking for permission on the fly: ...
4
votes
2answers
11k views

Upload multiple files using rest api

I am trying to write code to upload multiple files using SP2013 REST API. I referred the MSDN article "upload single file using REST API". But I am having problem when I modified the code to upload ...
9
votes
2answers
13k views

Can I use $expand to get Managed Metadata column values?

I want to get a list, using REST, which include Managed Metadata columns. Currently I get a TermGuid for these columns, which I then have to do more work on to get their actual default values. Is ...
7
votes
1answer
13k views

How to get all items with a specific content type using REST Api

There are five Custom Lists in a site collection, all have same content type. I would like to get all items from those five lists using rest api. Is there a way to get all items from all lists having ...
4
votes
1answer
2k views

REST call to get list not working

I would like to make a function to pass a list name, if it exists, then append random number to its name and create a new one, if there's no list with the passed list name, then create it. So I am ...
3
votes
1answer
6k views

Is it possible to make SharePoint lists accessible cross domain using REST API?

Is it possible to make SharePoint 2013 resources accessible via internet using REST API? Say I want to do CURD with a list from outside of SharePoint. How we can manage credentials for this situation? ...
2
votes
3answers
5k views

The length of the URL for this request exceeds the configured maxUrlLength value. REST API

I was wondering if someone could help, or am I missing something. In the articles found here http://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx#bk_FileStartUpload They refer ...
0
votes
2answers
5k views

Update person or group field using REST API in Document Library

I want to update the Person or Group field in Document Library using REST API. How can I achieve this. Thanks.
20
votes
1answer
5k views

REST list item delete does not go to Recycle Bin

I have a SharePoint 2013 autohosted app with a number of lists inside of it. I would like to be able to soft delete a list item using the REST API and have it go to the Recycle Bin instead of being ...
12
votes
5answers
5k views

SharePoint REST API getbytitle with ampersand in title?

Trying to use the SP2013 REST API to ping a library with the title "Prep & Admin Docs" and I can't use getbyID as this snippet will be used in multiple sites where the GUID of the list will vary. ...
10
votes
5answers
9k views

Workflow getting Access denied when calling the rest webservice from subsite

i have following problem. I am using SP 2013 Online and i am trying to access some informations from the sub site, like http://[SPOnlineUrl]/SubSite/_api/web/title. But i will always get the annoying ...
5
votes
3answers
6k views

SharePoint 2013 APIs for anonymous and/or mobile access

In SharePoint 2013 (Preview), does any of the APIs (csom, REST, etc.) work with anonymous access? With mobile access? I haven't found any reference to this in the documentation. I did a quick test ...
4
votes
3answers
8k views

REST API page validation error for SharePoint app

I need to do insert operation to SharePoint list. Below is my code.. $.ajax({ url: appWebUrl + "/_api/SP.AppContextSite(@target)" + "/web/lists/getbytitle('NewList')/items?" + "@target='" + ...
3
votes
4answers
11k views

Get the id value from the page url

In SharePoint how do you get the ID value from the url of the page you are on using javascript( Jquery,ajax, Rest..), e.g. I have the url like so: http:// ddd/mypage?ID=xx I tried before to ...
0
votes
1answer
233 views

Getting no REST data in SharePoint in a html file

I am trying to get some data from a REST Service Url in a html file. This works fine when i am using the code direct in my browser. But when i embedded it into my SharePoint Site it wont work. On my ...
2
votes
2answers
5k views

How to get content of html by using REST service in SharePoint 2013

Does REST service of SharePoint 2013 support us to get the content of HTML files of specified page? What I mean is request the HTML text of display form without navigate to there, like you clicked on ...
0
votes
3answers
277 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?...
0
votes
1answer
4k views

Inserting data to lookup field using rest API

In alert I am getting value in data.d.results[0](This is the value that I am getting from other list using rest).Subsystem.Title and also if I use only title column then the value is inserted in the ...
25
votes
6answers
49k views

How can I authenticate SharePoint REST calls from JavaScript?

I have been banging my head against a wall on this problem for weeks now Warning and Disclaimer .. I have very little JavaScript experience when it comes to REST / Web Services I have an on premises ...