How to find the contents of the Jira webhook payload
Asked by Leslie Martin:

![Screenshot 2024-01-09 130349.png](/t5/image/serverpage/image-id/299723i9BF80AE9DFE3F3BB/image-size/large?v=v2&px=999 "Screenshot 2024-01-09 130349.png")

Hello,

I am using automation rules to POST issue data to a webserver. Its working very well but randomly I get an HTTP response 400.

I am assuming the actual data structure of "Issue data (Jira Format)" is changing depending on the ticket data.

Is there anywhere in Jira logs that I can find the actual JSON payload that Jira sent to my endpoint?


Answers:
author: Leslie Martin
body: Hi [@Eugenio Onofre](/t5/user/viewprofilepage/user-id/4992586) or anybody ??

comments: author: Eugenio Onofre
body: I am sorry for the delay on this, I have been out of office on vacation.

Unfortunately I am not aware of any smart variable that can be used to log REQUEST.

I would recommend raising a ticket with atlassian support at <https://support.atlassian.com>


author: Leslie Martin
body: Okay. That is what I was trying to do.

Thanks for your insights.


author: Leslie Martin
body: Hello,

What is the best way to get answers from this community?


author: Leslie Martin
body: Hello,

Does any one have any insights for me?? I'd be glad to look through documentation, if someone could point me to where it gives the info I need. Thanks!


author: Leslie Martin
body: [@Eugenio Onofre](/t5/user/viewprofilepage/user-id/4992586) do you have any more ideas?

The {{web.request.body}} doesn't work for me.

comments: author: Eugenio Onofre
body: Hi, pardon. The correct is {{web.response.body}}


author: Leslie Martin
body: [@Eugenio Onofre](/t5/user/viewprofilepage/user-id/4992586) I am trying to capture the outgoing payload, not the response from the server.

Nonetheless, I tried your recommendation, but I get the same result.

![Screenshot 2024-02-02 0807432.png](https://community.atlassian.com/t5/image/serverpage/image-id/304028i5071BB7ABA6C9437/image-size/large?v=v2&px=999 "Screenshot 2024-02-02 0807432.png")![Screenshot 2024-02-02 080706.png](https://community.atlassian.com/t5/image/serverpage/image-id/304029i5C4CBCAC86973B3C/image-size/large?v=v2&px=999 "Screenshot 2024-02-02 080706.png")


author: Eugenio Onofre
body: Hi [@Leslie Martin](/t5/user/viewprofilepage/user-id/5365209) , would you mind sending a screenshot of the step where you call the API (please hide API details)


author: Leslie Martin
body: Hi [@Eugenio Onofre](/t5/user/viewprofilepage/user-id/4992586) ,

Sure, no problem. There are various here in this thread already. I can repost them or take more if they don't tell you what you need.

I am sending a web request to an external server. I would like to log both the post to the server and the response from the server. The response from the server works good with {{webResponse.body}} but I have not had any success with capturing the original payload that gets posted to the server.

I'd really appreciate your input!


author: Leslie Martin
body: [@Eugenio Onofre](/t5/user/viewprofilepage/user-id/4992586) Do you need me to upload more screenshots? I'd really like to get this fixed.


author: Leslie Martin
body: I found documentation for logging the web response, but I need to log the web request.

Thanks so much!


author: Eugenio Onofre
body: Hi [@Leslie Martin](/t5/user/viewprofilepage/user-id/5365209)

You can have the payload logged as part of your automation. To do so, you can add a log event after the webhook call and log {{web.request.body}}.

Another option would be for you to, inside the webhook automation, test it using the VALIDATION feature.

In case this answer helps you resolve your query, please accept it so it can help other community users in the future.

Regards,  
Eugenio

comments: author: Leslie Martin
body: Hi [@Eugenio Onofre](/t5/user/viewprofilepage/user-id/4992586)

Thanks for those insights. It will probably get me to where I'd like to be.

But its not working....

I added a log action to the end of my rule:

![Screenshot 2024-01-10 102545.png](https://community.atlassian.com/t5/image/serverpage/image-id/299915i9042A29669A39C52/image-size/large?v=v2&px=999 "Screenshot 2024-01-10 102545.png")

But I get this:

![Screenshot 2024-01-10 102903.png](https://community.atlassian.com/t5/image/serverpage/image-id/299917iBB3B7B9709C3670A/image-size/large?v=v2&px=999 "Screenshot 2024-01-10 102903.png")

I'm struggling to find documentation on what the correct smart values should be? Or is there something else wrong with my rule?


Tags: cloud

jira-service-management

jira-service-management-cloud