How to pass authentication info with webhook URL

Kanhaiya Panigrahi December 23, 2019

I want to pass information of jira stories to Service now with the help of webhook where I mentioned scripted REST API of SNOW.

I am getting json data at service now side without authentication but Need to use authentication.

I want to pass username and password with URL from JIRA.

Please help me with this or if anyone has better solution than webhook please suggest that too.

1 answer

1 accepted

0 votes
Answer accepted
Andrew Morin
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.
December 23, 2019

This has been around for years and it looks like it was finally rejected.

https://jira.atlassian.com/browse/JRASERVER-31953

There was an old thread someone posted..

https://community.atlassian.com/t5/Answers-Developer-Questions/JIRA-Webhook-URL-requires-basic-auth/qaq-p/539810

Kanhaiya Panigrahi December 23, 2019

Thanks Andrew,

But is there any other way by which I can build a flow from Jira to SNOW??

Andrew Morin
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.
December 23, 2019

Are you trying to push data to SNOW from Jira? Actually either pushing or pulling I suggest you use the robust API's that are available in Jira. If you are doing this on https you will need to import the certificate that SNOW is using to your Java keystore. 

If you are in Jira cloud you will need a server to run your script on a schedule or as a cron job. I am not sure what you are trying to accomplish so it is hard to give you a clear answer.

Kanhaiya Panigrahi December 23, 2019

I want to pass info to SNOW when jira stories are updated, whether it is comment or status update.

And yes I am in JIRA cloud

Andrew Morin
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.
December 23, 2019

That is easy to do if you have ScriptRunner. You just call your script with a custom post function. Feel free to message me if you need some example scripts that we do this type of stuff with and you will have to wait until I go back to the office next week :-)

You can do inline scripts or have them on the server which I prefer because when it comes upgrade time it is nice to have all your scripts in one place. I appreciate Atlassian maturing their API functionality but when you have over 400 scripts in workflows it is a pain to get them all updated. Not sure what version of Jira you are opn but make sure you create the script so it 8.x compatible so you are ready to go if you are not there already.

Like Kanhaiya Panigrahi likes this
Kanhaiya Panigrahi December 24, 2019

We are using Jira v8.5.0-m0005 currently and having plugins only for portfolio and agile.

Can you please share yur example scripts & other stuff that can help me to build a flow from JIRA to SNOW

Kanhaiya Panigrahi January 8, 2020

Hey Andrew,

Can you send me some scripRunner examples that you were talking about. I want to understand what kind of scripting you have been using.

Thanks 

Suggest an answer

Log in or Sign up to answer