How to push a file generated from an external tool to my developed jira plugin?

Dongmei November 28, 2017

Hello, 

I developed a jira plugin(in Java and JavaScript) using the sdk. I also developed a tool (*.exe in C#) which will generate a json file. Everytime when this json file generated from my tool, I want this json file to be immediately transfered to and received by my jira plugin. Is that possible How could it be done? What extra work should I do? From my tool or from the server side of my jira plugin?

If someone could give me some hints, I would be very appreciated. Thanks.

 

Best regards,

 

Dongmei

1 answer

0 votes
Jobin Kuruvilla [Adaptavist]
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 1, 2017

Well, it is going to be a push or pull.

You can write a JIRA plugin that monitors for changes and pull it when the json file is generated but this may not be desired as you have to keep polling at regular intervals.

A better option might be to use a JIRA REST API which can then be invoked by your tool as soon as the json file is generated. You might have to create a custom REST end point in JIRA, using the rest plugin module, if you can't use any of the existing APIs.

Dongmei December 4, 2017

Hello Jobin,

Thank you very much for taking your time and answer my question.

My JIRA plugin already has a REST Endpoint Module. What I don't know is, how could I build up kind of connection or invoking, so that my external tool can push this json file to my JIRA plugin?

Do you mean I should define a push function in my external tool in C# and also define a get function in my JIRA plugin REST Endpoint module? Is that the right way? Thanks.

Best regards,

Dongmei Liu

Jobin Kuruvilla [Adaptavist]
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 4, 2017

Yes. Define a GET end point and then call it from your tool. That seems to be the most straightforward way.

Dongmei December 4, 2017

Hello Jobin,

Thanks for your answer. I will try to do it like this, still not sure if it will work. Define a GET end point in JIRA plugin I know how to do it, but I just wonder how this post function in my external tool written in C# should be defined.

Will this post function in C# just a normal function or what else?

Do you mean the function in C# should call the GET end point of JIRA plugin?

Jobin Kuruvilla [Adaptavist]
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 4, 2017

> Do you mean the function in C# should call the GET end point of JIRA plugin?

Yes. I do not know your design but it will be something like that I guess.

Dongmei December 4, 2017

Hello Jobin,

Thanks for your clarify. I will try to implement in this way and see if it works.

Best regards,

Dongmei Liu

Suggest an answer

Log in or Sign up to answer