Global Automation / Send web request action: use rest api 3?
Asked by Atlassian Admin:

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


Answers:
author: YY Brother
body: Hi [@Atlassian Admin](/t5/user/viewprofilepage/user-id/5440755)

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?

comments: author: Andreas Kandzorra
body: 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.


author: YY Brother
body: 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.


author: Andreas Kandzorra
body: 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.png](https://community.atlassian.com/t5/image/serverpage/image-id/333971i020D428F137591CA/image-size/large?v=v2&px=999 "Webhook SOU TEST_Screenshot 2024-07-08 131730.png")![Webhook SOU TEST_verify configuration_Screenshot 2024-07-08 131730.png](https://community.atlassian.com/t5/image/serverpage/image-id/333972i0C7E968A77B5317D/image-size/large?v=v2&px=999 "Webhook SOU TEST_verify configuration_Screenshot 2024-07-08 131730.png")


author: YY Brother
body: Hi [@Atlassian Admin](/t5/user/viewprofilepage/user-id/5440755)

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](https://community.atlassian.com/t5/image/serverpage/image-id/334011iF44F395F254CC0C5/image-size/large?v=v2&px=999 "image.png")

Thanks,

YY?


author: Andreas Kandzorra
body: Hi [@YY Brother](/t5/user/viewprofilepage/user-id/4083879)

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


Tags: cloud

jira-cloud

jira-software