Problems to use the payload of a GET request (REST API)

Rudy Rohde May 10, 2024

Dear JSM community

I started 2 days ago to look into the REST API, but now I am stuck to use / extract the payload of my GET ISSUE request.

I have established for testing a very simple automation rule as follows:

SCR-20240510-rwmw.png

When validating the GET ISSUE request: every thing seems fine, positive response and payload visible (I shortened the screenshot a bit):

SCR-20240510-rwxe.png

When I try to write the payload down into the Audit log (or a comment in the ticket): the {{webResponse.body} seems to be empty:

SCR-20240510-rxhw.png

What I am missing here? Hope someone can help me out.

Kind Regards, Rudy

1 answer

1 accepted

1 vote
Answer accepted
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2024

Hello @Rudy Rohde 

Correct syntax is {{webhookResponse.body}} 

And subsequently {{webhookResponse.body.key}} or {{webhookResponse.body.fields.priority.name}} etc to reference the fields..

Hope it helps and accept answer if it solves your problem, thanks!

 

Rudy Rohde May 10, 2024

Dear @Kalyan Sattaluri 

With {{webhookResponse.body}} or {{webhookResponse.body.key}} or {{webhookResponse.body.fields.priority.name}}...still the same result: nothing :(

SCR-20240510-tpdh.png

 

 

Rudy Rohde May 10, 2024

@Kalyan Sattaluri : YOUR ANSWER IS CORRECT

I just forgot now with the changed to delay the further execution till the GET method completed. Working now

Thanks a lot

Rudy

Like Kalyan Sattaluri likes this
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2024

Hmm.  Strange. Can I suggest..

Instead of using smart value in the GET call, for test purposes, provide directly issue key like below and trigger the rule from an issue and log {{webhookResponse.body}} as you were and see if you getting results.

https://mbgroup-atlassian.net/rest/api/2/issue/TEC-90

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events