Get List Item attachment collection using REST API

  • 18 August 2015
  • 3 replies
  • 16 views

Badge +8

Hi,

i would like to build a workflow that will retrieve the list item attachments using REST request and update a field in the list item with the hyperlinks to attachments. How do i  Process the returned response in Nintex workflow to built the hyperlink text?

Please help,


3 replies

Badge +9

see collect task attachments in list item and show all attachments in next task . It will give You some hints.

Badge +8

Hi Manfred,

Thank you for the example. However, your example still uses SOAP asmx web service. I am trying to use REST end point.

Please advise,

Userlevel 5
Badge +9

To get the attachments of an item you can use this REST API query (with a Web request action) :

your_sharepoint_site/_api/web/lists/getbytitle('Your list name')/items(item_ID)/AttachmentFiles

To extract the url of the attachment files from the response of the web request, you can use a Query XML action with this XPath query :

//*[local-name()='ServerRelativeUrl']

Hope this helps

Reply