JIRA plugin for REST API

som roysarkar February 15, 2018

Hi,

I am trying to build a JIRA plugin that will essentially be a REST api that can be called to take some actions like create issues, etc.

I was able to create a refapp plugin that has a simple get api (based on the tutorials).

I also stood up a standalone JIRA server, and added the plugin to it by uploading the 

JAR file from the target folder for the plugin.

I was able to make the rest calls to this api using postman and the standalone jira.

I didn't think it would need the plugin to be running (which I initially created calling atlas-run) for the api to work.

However, when I stopped it, the plugin api stopped working too.

So, my question is how do I need to deploy the plugin in production? I was initially considering just adding the plugin to our Jira server application by uploading the JAR file.

But seems like that won't work. Has anyone here done this before? It would be very helpful if you could point me in the right direction, as I am very new to this.

Thanks in advance!

 

1 answer

1 accepted

1 vote
Answer accepted
Timothy
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.
February 15, 2018

But seems like that won't work. Has anyone here done this before? It would be very helpful if you could point me in the right direction, as I am very new to this.

You will get the .jar when you package the code with atlas-package. atlas-run also packages the code before starting a application around it. The .jar is what you use to install into your test / production instance of Jira.

som roysarkar February 15, 2018

Thanks for the answer, Tim! It worked the second time I tried it.

Does it matter if I create the jira plugin using

atlas-create-refapp-plugin

or using atlas-create-jira-plugin?

Timothy
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.
February 16, 2018

The refapp command creates an add on that can be used on one or many Atlassian applications. If you are targeting specifically to use Jira only, use the Jira command.

som roysarkar February 16, 2018

Yeah that's what I thought. I was just wondering if it made sense to use the refapp command for Jira, as it is supposed to work for multiple Atlassian applications.

Itishree Mohanty April 13, 2018

Hi ,

I have the same problem. I have deployed the rest plugin jar in local jira application which is local host and  stopped local SDK  which started through atlas-run, .

When I am trying to call the POST method from webhook as http://localhost:8080/jira/rest/myrestresource/1.0/message it is throwing 404 not found.

 

any suggestion will be greatful.

Suggest an answer

Log in or Sign up to answer