Skip to main content
Nintex Community Menu Bar

Call WebService error

  • September 5, 2017
  • 3 replies
  • 27 views

Forum|alt.badge.img+13

Hi,

I'm following Ben Stori‌ blog Get List Item Attachments using Web Services  to get the name of an attachment from a workflow task form so that it can be used later on in the workflow for building a hyperlink to it.

I'm getting a "Bad Request" response. First time using this action in O365 and there's plenty that looks wrong with what I'm doing, but hoping someone might be able to help me out with this.

Firstly I've built the dictionary

When I output this in an email I get this (are those additional backslashes meant to be there?)

{"Content-type":"application/json;odata=verbose","Accept":"application/json;odata=verbose"}

Then I build the URL

{Workflow Context:Current site URL}_api/web/lists/getbytitle('Workflow Tasks')/items(‍{Variable:vnumTaskID}‍)/attachmentFiles

When I output this in an email I get this

https://tenantname/sites/heals/_api/web/lists/getbytitle('Workflow Tasks')/items(117)/attachmentFiles

This looks right to me.

Then my Call Web Service action is configured with the following

Can anyone see why I'm getting the "BadRequest" error?

Thanks

3 replies

Forum|alt.badge.img+13
  • Author
  • Novice
  • September 5, 2017

Ignore me. The URL had a carriage return inserted into it, not sure why.


Forum|alt.badge.img+7
  • Nintex Partner
  • September 5, 2017

I am glad you were able to get this working!


Forum|alt.badge.img+13
  • Author
  • Novice
  • September 5, 2017

yes, ahem, user error.