Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Where to write URL and payload in order to execute POST REST API on 3rd party application

djsm
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!
December 3, 2021

HI,

I'm new in Jira.

Would like to get advice on how to write URL with Payload in Jira to enable Jira to be able to execute POST REST API to another 3rd party application?

I'm successfully executed the following script on postman:

-------------------------------------------------------------------------------

URL: http://3rdPartyServer/api/odata/businessobject/incidents

Authorization: rest_api_key=CDD40D2DSDSB71WA5FC6341233ES6EDF7
Content-Type: application/json
{
"Service" : "CRM Service",
"Category" : "Functionality",
"ProfileFullName" : "Admin",
"Status" :"Active",
"Subject" : "test subject",
"Details" : "test details test details",
"Urgency" : "High",
"Impact" : "High",
}

-------------------------------------------------------------------------------

My requirement is when status in Jira is changed to another status, Jira will automatically generate ticket to my 3rd party application.

And the 2nd question is how to trigger this status changes that will automatically trigger that POST?

Thanks for any feedback

1 answer

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
December 3, 2021

Hi @djsm welcome on the community :)

I'm not sure what version of Jira Server you use, but I guess you can use webhooks (https://developer.atlassian.com/server/jira/platform/webhooks/). You can configure it to add a webhook as a postfunction so you can invoke it during issue transition - https://developer.atlassian.com/server/jira/platform/webhooks/#adding-a-webhook-as-a-post-function-to-a-workflow.

djsm
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!
December 4, 2021

Hi Martin,

Thanks for the info, I read the docs you provided, and I already registered a Webhooks and also already configured the trigger when status changed.

But one thing I couldn't find is where to put the following info of REST API?

Authorization: rest_api_key=CDD40D2DSDSB71WA5FC6341233ES6EDF7
Content-Type: application/json
{
"Service" : "CRM Service",
"Category" : "Functionality",
"ProfileFullName" : "Admin",
"Status" :"Active",
"Subject" : "test subject",
"Details" : "test details test details",
"Urgency" : "High",
"Impact" : "High",
}

 

Could you advise please. thank you

fyi I use Jira v8.20.2

Martin Bayer _MoroSystems_ s_r_o__
Community Champion
December 7, 2021

Hi @djsm , I'm very sorry, I didn'tread proparl. Webhooks does not allow an authentication call.

There can be a workaround. Do you have for example ScriptRunner App installed?

Suggest an answer

Log in or Sign up to answer