Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Use REST api user query results in automation

Edited

Hi,

when I validate user query in automation Send Web Request action, it returns correct payload with all data I need. But loging {{webhookResponse.body}} gives empty  line.

Do I use wrong variable to read response from GET method? How to access payload fields?

Thank you,

Vytautas

1 answer

Hi @Vytautas St 

That is the correct smart value, and you may need to use dot notation to look for the specifics you need.  https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--webhookResponse--

Have you checked the status to confirm the request succeeded?

Kind regards,
Bill

Thanks for hint, 

status 200, payload shows correct data when validating, but no logs when rule runs:

{{webhookResponse.body.accountId}} , {{webhookdata.accountid}},  {{webhookResponse.status}} are empty in log action audit.

It's user query, GET method.  Validation and rule test use the same issue key, actor permisions the same.

That is curious...Two other things to try:

In your rule, please try {{webhookResponses.last.body}} to see if that makes a difference when the response is a list; note the smart value is plural rather than singular.

And try running your request from a browser to examine the response with your parameters to see if it is structured as you expect.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you