json status response

Confluence User - 21 May, 2018

Dear Experts

I am using the json tool plugin to post data to external site on form submission.

The plugin always return with "....returned with status : xxx"

Does one know what field/variable i can use to access the returned status code

Thanks in advance.

 

json_tools

3


22 May, 2018
confluenceUser
confluenceUser

Hi, what is the status code returned, unless you mean it literally returns "xxx"? I believe the status code is returned from the external site itself, so perhaps you could check the actual response from the site using an external tool like curl.

22 May, 2018
confluenceUser
confluenceUser

Hi Anders

Maybe i didn't explain properly.

I have the list of status codes from the external site and when the data submitted is processed correctly a status of 200 is returned by the external site. when there are issues, either 400 or 500 range are returned.

My challenge is what variable within the JSON plugin can i use to capture and direct the user one form if a status of 200 is received and a different form for other statuses.

 

Thanks

24 May, 2018
confluenceUser
confluenceUser

I don't see an option in the JSON tool to check the status code, but alternatively you could try routing based on the contents of the response instead? For example you could have a workflow variable "result" that stores one property of the JSON response and create a condition based on whether that value is empty or not.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print