Is there any Jira Rest api's to upload the requirement data into external database ?

navya k September 24, 2019

I have created Jira plugin Rest api to upload requirement text and issue id to my external db.

I would like to call the "Upload" service when my project gets closed.

How can I achieve this scenario? Should I use Workflow Post function? Do we have Jira API to directly upload our data into the external source?

I don't know about Atlassian Connect add-ons, Can you help me to understand this? When we go for Atlassian connect add-ons?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2019

No.  Jira can't provide code for doing a random arbitrary update to a system Atlassian may never have seen.

A post-function is likely to be the right place, but you will need to write apps (or scripts if you have scripting/automation apps) that you design to understand the remote application.

Connect apps are apps built for Cloud Jira (or Confluence/Bitbucket), they only work on Cloud and cannot be used (or even translated) to Server apps.

navya k September 24, 2019

@Nic Brough -Adaptavist- Thanks for the response.

To Conclude, we need to have post-function on Project close transition and create a script which consists of the Rest API call to upload the document.

What about the performance?

Consider I have a project having 2000+ issues When I close the project all 2000+ issues documents should get uploaded to my DB.

I hope everything runs on the Jira server itself, Will it impact the performance? here everything refers to the Jira plugin and script.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2019

To confirm, your remote system has a REST API that you will need to code for?

Performance depends mainly on how fast your Jira can talk to your other system.  It can send quite a lot quite fast itself, but there's no way of knowing how fast any responses may come back without knowing the other application.

Jira doesn't have a "close project" function, so I'm not sure where you are going to be trying to run this.  I'd also say sending 2k issues in one go really is going to fail - Jira has a built in limit of exporting 1k to CSV because trying to do too much in one go cripples it.

I think I would take a step back an look at what you are doing rather than trying to start half way through one possible solution.  What is the goal for the end users?  What do they get out of it?

navya k September 24, 2019

We have created the Jira plugin Rest API to upload the issue id and its requirement to the DB. 

Rest API details : 

Method - POST

Request body - { "requirement" : "some text", "jira-id" : "1234" }

 

We will upload the Jira plugin jar to our Jira Server so that Rest API is available to access.

Consider the scenario - We have a project with 2000+ user stories/issues When this project gets "closed/completed", we need to call above mentioned Rest API to upload 2000+ issues of this project to our DB.

Help me in achieving this scenario?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 24, 2019

I am totally unclear on what you are trying to do.  Instead of talking about databases and plugins, could you just tell us what the end goal is?

What is the goal for the end users? What do they get out of it?

navya k September 24, 2019

End-user wants to maintain all the user stories in external DB and when they create a new project with the same requirement, they will first search in our DB based on the requirement text and use the existing feature as reference.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 28, 2019

Would it not be easier and faster for them to do the user stories in Jira, as designed?

Suggest an answer

Log in or Sign up to answer