I won't be unique with my question: I just need to get normal URLs to all attachments from SharePoint list items. Unfortunately I can't use JavaScript or any 3rd party solutions (have neither knowledge nor rights in my organization).

So, where I am now: successfully extracted JSon with AttachmentFiles parameters of needed list item. As per all manuals the next step is to put a part of this data to string variable via Get /d/results but I cannot do it - each time my variable comes empty!

I've tried a lot of different variations like /d/results(0)/ServerRelativeUrl and so on but got nothing. I guess the reason is in string variable size limit as per MickB story but don't know how to resolve it.

Appreciate any help!

  • Are you able to query the site using PowerShell? – jpollar Mar 6 '18 at 20:50
  • From above, what i understand is, you are using REST API of SharePoint to get the data. Where you are executing this code? What is your environment? And from tags, its look like you are using Designer WF to get it done? – ThinkB4Code Mar 6 '18 at 20:56
  • Hi, I'm just a regular user and have no access to any advanced tech like PowerShell. I'm using SharePoint Designer 2013. – Skotofey Podrocek Mar 7 '18 at 8:47
  • Why do you require all attachment url's please brief us a little. – Sunil Sahu Mar 7 '18 at 10:30
  • Sunil, sorry, I didn't understand your question. I need to sent e-mail notification with normal URLs to list item attachments as soon as new item was created. – Skotofey Podrocek Mar 7 '18 at 10:34

This is the outcome of GET request from where I need extract URL

{"d":{"__metadata":{"id":"a561a55b-3d99-4931-95c8-d71d9ea16b0a","uri":"https://XXXXXX/_api/Web/Lists(guid'6b2c3df4-098c-4368-a27c-aea33cbfc7a3')/Items(2)","etag":"\"60\"","type":"SP.Data.BSS_x0020_Finance_x0020_PreTicketingListItem"},"AttachmentFiles":{"results":[{"__metadata":{"id":"https://XXXXXX/_api/Web/Lists(guid'6b2c3df4-098c-4368-a27c-aea33cbfc7a3')/Items(2)/AttachmentFiles('2018-03-02 09_48_22-.png')","uri":"https://XXXXXX/_api/Web/Lists(guid'6b2c3df4-098c-4368-a27c-aea33cbfc7a3')/Items(2)/AttachmentFiles('2018-03-02%2009_48_22-.png')","type":"SP.Attachment"},"FileName":"2018-03-02 09_48_22-.png","FileNameAsPath":{"__metadata":{"type":"SP.ResourcePath"},"DecodedUrl":"2018-03-02 09_48_22-.png"},"ServerRelativePath":{"__metadata":{"type":"SP.ResourcePath"},"DecodedUrl":"/sites/spaces-RU-SCFS/Lists/BSS Finance PreTicketing/Attachments/2/2018-03-02 09_48_22-.png"},"ServerRelativeUrl":"/sites/spaces-RU-SCFS/Lists/BSS Finance PreTicketing/Attachments/2/2018-03-02 09_48_22-.png"}]}}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.