0

given a document "file.docx" located in a library "documents". When I enter http://server.site/_api/web/GetFileByServerRelativeURL('/site/documents/file.docx'), into the browser, I receive a correctly detailled xml view. When I use the same URL for a REST call in a ShP 2013 Designer workflow as a GET method (the required dictionary with the accept header 'application/json;odata=verbose' has been created aforehand), it fires a http500 error. What am I doing wrong? Thank you in advance for your support!

  • can you post your code? – Deepmala Jun 12 '18 at 12:01
  • Deepmala, it's a SpD2013 workflow, so I only can copy/paste like this: – Helimac Jun 12 '18 at 12:29
  • Stage:1 Log Initializing ... to the workflow history list Log creating vRequestHeader ... to the workflow history list Build {...} Dictionary (Output to Variable: vRequestHeader ) Log Starting the call ... to the workflow history list Call http://.../_api/web/GetFileByServerRelativeURL('/dev/restapi/docs1/TestDocTSG.docx')/listitemallfields. HTTP web service with request (ResponseContent to Variable: vResponseContent |ResponseHeaders to responseHeaders |ResponseStatusCode to Variable: vResponseCode ) Log vResponseCode = [%Variable: vResponse... to the workflow history list Go... – Helimac Jun 12 '18 at 12:29
  • What is your SharePoint version? – Bernd Rickenberg Jun 13 '18 at 15:35
  • 2013 on premises – Helimac Jun 13 '18 at 15:36

Your Answer

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

Browse other questions tagged or ask your own question.