Global Automation / Send web request action: use rest api 3?

Atlassian Admin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 5, 2024

Hello,

we want to use "Send web request action" in Global Automation rules, to receive Epic/Issue updates in our system, like this: 

https://support.atlassian.com/cloud-automation/docs/issue-data-jira-format-payload-for-send-web-request-action/

Problem: The HTTP POST content is delivered only in rest/api/2 format (as also seen in the article above)

We expect/want to receive it in rest/api/3, so our question:

  • Where can we configure the rest api version for the HTTP POSTs (or in general)?

 

Thank you for hints and/or recommendations.

Best Regards,

Andreas

 

 

1 answer

0 votes
YY哥
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 5, 2024

Hi @Atlassian Admin 

Welcome to our Community.

What do you mean "our system"? Is it another system which receives jira epic information whenever the epic is updated?

Thanks,

YY哥

Andreas Kandzorra July 5, 2024

Hello,

correct: Initially, we use the API to create and updates Epics/Issues from changes in our system. (Here we already use the rest api v3 and this is working fine!)

Now/Additionally we want to receive also the changes done in JIRA: so we created these Web requests that call our system via HTTP POST request and providing the new information of that Epics/issues. (This is how it also works/worked in our Jira Server instance, using "Automation for JIRA")

Unfortunately the rest api v2 is sent here, which does not match for all the fields... our exact problem is in the field "description":

In rest api v2 it is a simple string, like this:

"description": "Problem: \r\n- Edit2"

In rest api v3 it is like this:

"description": {
"content": [
{
"content": [
{
"text": "Problem: \r\n- Edit2",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
}

 

So we hope that we do not need to implement both rest api versions...

But we cannot find a way to change the output.

YY哥
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 5, 2024

You meant whenever a jira epic udpates, it will trigger the automation rule to send a web request to update your internal system, right? The API is your system's API, right?

It will be better to show the screenshot of your automation rule as well as the REST APIs.

Andreas Kandzorra July 8, 2024

Yes, whenever some jira epic/issue values are changed by users (groups of initiators), we want them to update in our internal system. Our API / interface wants to user the jira rest/api/3 format (as we do it for creation/updates already).

Configuration: see screenshot #1

Verify configuration: see screenshot #2

-> As you can see: we receive user-data behind the HTTP POST from JIRA automation only in /rest/api/2 format... but we'd like to have it in /rest/api/3 format.

Webhook SOU TEST_Screenshot 2024-07-08 131730.pngWebhook SOU TEST_verify configuration_Screenshot 2024-07-08 131730.png

YY哥
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2024

Hi @Atlassian Admin 

Thanks for the details. Please see this answer and hope it helps you. We need to custom the data in the request body as per the definition of REST API in your internal system.

image.png

Thanks,

YY哥

Andreas Kandzorra July 8, 2024

Hi @YY哥 

so actually the answer is:
In the context of the "Send web request action", it is currently not possible to get the Jira-Data after HTTP POST in /rest/api/3 format.
It is avaible in /rest/api/2 format only.

 

Alternative solution understood:
Use the possibility to create an user-specific response for our Internal System.

 

Thanks for your support!

Best Regards,

Andreas

 

Like YY哥 likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events