Hot answers tagged

8 votes

How to send a "like" or "unlike" command via REST API?

Do you use Javascript to send "Like"? At this case you could use JSOM to set likes: <script type="text/javascript"> SP.SOD.registerSod('reputation.js', '/_layouts/15/reputation.js'); SP....
user avatar
7 votes
Accepted

REST API Query Syntax

Try following. I am assuming that you have included Title column in your lookup column. Building a clause for ProjectName="X" and Active="Yes", you have to use $filter operator. http://<siteurl&...
user avatar
7 votes
Accepted

Using REST when colon appears in column name

The internal name for columns replaces colons with _x003a_ just like you suspected. So a column named Image:Thumbnail should be Image_x003a_Thumbnail as you suggested. I'm guessing that the display ...
user avatar
  • 5,403
6 votes
Accepted

Get CreatedBy using REST API SharePoint

Please try following REST URL, you must expand the Person and Group field. var Ownurl = _spPageContextInfo.webAbsoluteUrl + "_api/web/lists/getbytitle('Listname')/items?$filter=Id eq 1&$expand=...
user avatar
6 votes
Accepted

How to do Microsoft Graph API Filter on Lookup Column in SharePoint List Items?

The the following expression demonstrates how to filter by lookup field id: &filter=fields/<LookupFieldName>LookupId eq '<LookupFieldValue>' Pay attention to lookup field name ...
user avatar
5 votes

How to send a "like" or "unlike" command via REST API?

The below example demonstrates how to like/unlike a resource via SharePoint REST API, it simulates Microsoft.Office.Server.ReputationModel.Reputation.setLike method to some extent Prerequisites: ...
user avatar
5 votes
Accepted

PNP JS in SharePoint

For me the answer is pretty obvious: for sure you should use it. A few things why I think so: the learning curve is very straightforward and not so difficult pnpjs is a wrapper on REST API, by ...
user avatar
4 votes
Accepted

How get multiples users by id with REST API?

For few items in ID's array, then you can try following /_api/Web/Lists/GetByTitle('User Information List')/Items?$filter=(Id eq 426) or (Id eq 352) or (Id eq 155) It will give you all users in one ...
user avatar
4 votes
Accepted

Start Workflow from Sharepoint Designer with REST call (Workflows 2013)

Just an issue with the parameter type; the itemID needed to be the ID, not the GUID. Documentation here: https://msdn.microsoft.com/en-us/library/dn683475(v=office.12).aspx
user avatar
4 votes

Searching Users in AD through REST in sharepoint?

You can use following end-point. It can search users from all directories. var userSearchSuggestionEndpoint = "/_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface....
user avatar
4 votes

Update person or group field using REST API in Document Library

To add/update Person or Group field, you need the Id of Person or Group. Let say, Person or Group Id is 11 and internal name of the field is PersonField. So the request will be var data = { ...
user avatar
4 votes

Get file data from REST

You can combine these two by $expanding ListItemAllFields column of the File. ListItemAllFields is __deferred property of File. I believe you know that we need to $expand all Lookup columns and ...
user avatar
4 votes
Accepted

Was -NoADLookup Removed from New-SPOMigrationPackage?

This parameter was replaced with -NoAzureADLookup
user avatar
  • 56
4 votes
Accepted

API field setup requirements?

That is happening because you are creating list columns directly from the page. Like in below image. Instead of doing that, would suggest that you go to the list/library settings page by clicking ...
user avatar
  • 30.3k
3 votes

$batch operations on SharePoint 2013 on-premise not working

As far as I know REST API batching is only supported in SharePoint Online and SharePoint 2016. Support for REST API batching did not get pushed down to SharePoint 2013.
user avatar
  • 11.7k
3 votes

SharePoint throttling: Receiving a 429 without any details

"429 TOO MANY REQUESTS" itself a detail error message. It says that you are exceed of request limit for particular time. Normally this error comes when you try to request more than 1 request in 1 ...
user avatar
3 votes
Accepted

Problem with workflow REST

This is because of a minor typo in the post data. The "t" in the "type" object property should be lower case: {"__metadata":{"type":"SP.User"},"LoginName":"i:0#.w|abc\\nick"}
user avatar
3 votes

How to post value in multiple user field via SharePoint REST API

For posting multi user field the format we should use is FieldName: {"results": [UserId1,UserId2....] } From people picker control you can get the user ids as explained in the msdn article https://...
user avatar
  • 28.2k
3 votes

SharePoint 2013 REST API $expand issues

The problem is with the $select query, $select query option is to specify which fields to return for a given list, list item, or other SharePoint object represented by an entity set. Your ProjectList ...
user avatar
3 votes
Accepted

Weather api returns nothing in SP hosted app

Most likely this is because you are making an http request on an https site, this is a security issue and browsers will block it. Check to see if they offer the api over https and use that instead.
user avatar
3 votes
Accepted

Insert item in an external list via REST API

ok...first version of the script (with $.ajax) is the regular way to execute CRUD operations on items in lists (external and internal)..unfortunately it works only for internal list (by my experience)....
user avatar
3 votes
Accepted

Download sharepoint document with REST as binary file not working for me

Ok i found the problem... First: The API calls were both correct. The fact is that I am developing with Nodejs and I realized that the request module automatically converts the result to utf8 as the ...
user avatar
  • 343
3 votes

sharepoint get list fields including dropdown options

Option 1 The endpoint you need to hit is as below: https://one365dev1.sharepoint.com/sites/nieuwsportaal/_api/web/lists/getByTitle('Nieuwsberichten')/fields?$filter=EntityPropertyName eq '...
user avatar
  • 30.3k
3 votes

sharepoint get list fields including dropdown options

Try this https://one365dev1.sharepoint.com/sites/nieuwsportaal/_api/web/lists/GetByTitle('List Name')/fields?$filter=EntityPropertyName eq 'Choice Field Name'
user avatar
3 votes
Accepted

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

To get data from multiple list at a same time, we need to parallel Ajax get request for getting data from more than one list. Let's take one example: We have two list named "List1" and "List2" and ...
user avatar
3 votes

Limit and filter List

To return unlimited results, just drop the $limit=1000 from the query. EDIT: Indeed SharePoint by default returns 100 items of the list. The correct way to return a bigger subset of items would be to ...
user avatar
  • 5,239
3 votes
Accepted

Is it possible to set a Person or Group field through the REST API when the user is not listed on /sites/mysite/_api/web/siteusers?

If you want a reference to a SP.User stored on a SP.ListItem the user must exist in the SP.UserCollection siteusers of the specific SP.Web (i.e. tenant.sharepoint.com/sites/web/subweb/_api/web/...
user avatar
  • 2,321
3 votes
Accepted

How can we get the list items from multiple lists using Batch REST API?

The simplest way is to use PnPJS library for that purpose. $batch itself is a bit complicated when it comes to response parsing, etc. however PnPJS library hides all complicated logic inside. This is ...
user avatar
3 votes
Accepted

SharePoint 2013 rest API get the average of calculated column

First, you're missing a slash between getbytitle('listname') and Items, should be: <siteurl>/_api/web/lists/getbytitle('<listname>')/Items/?$select=Title,Response_x0020_Time Now I'm ...
user avatar
  • 1,505
3 votes

How to get version history of item using REST

What you're using works for me, but I'm in SharePoint online and you didn't mention a what version of SharePoint you're using. If I do: $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + "...
user avatar
  • 1,505

Only top scored, non community-wiki answers of a minimum length are eligible