Link to home
Start Free TrialLog in
Avatar of test test
test test

asked on

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=Description

When I open this link in browser it shows correct data in XML format

    <?xml version="1.0" encoding="utf-8"?><entry xml:base="https://example.com/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:etag="&quot;1&quot;"><id>Web/Lists(guid'67dabfd0-ebde-4b62-82d8-bab80a78386d')/Items(2952)</id><category term="SP.Data.Trainings_x0020_CalendarListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" href="Web/Lists(guid'67dabfd0-ebde-4b62-82d8-bab80a78386d')/Items(2952)" /><title /><updated>2018-07-20T09:08:47Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Description m:null="true" /></m:properties></content></entry>

When I am trying to use same url in SP Designer Workflow in *Send Http Get Request**(HarePoint - workflow extensions - https://www.harepoint.com/), I am always getting *404 not found error**

 

    Response Code: 404
    Response Text: <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-1, System.ArgumentException</m:code><m:message xml:lang="en-US">Item does not exist. It m...

I know it seems obvious from error message that it is 404 error code, item not found but the problem is item does exists in list and ID which I am using in this call is valid.
Please help, I am really new to this and stuck on this for almost last 4 hours.

The reason I am trying to do this is because I want to get column value from parent site list, I have list name and ID of list item from parent site. If anyone could point me in correct direction on how to access parent site list column value by list item ID that would be really helpful.

*Please note my limitation is SharePoint 2010 workflow, I know it is possible with SharePoint 2013/2016 workflows.*
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.