Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Communicate Jira with java client using REST

Tags:

jira

I have been reading the documentation that is in the page about Atlassian Jira.

I want to simply create a class in Eclipse to connect to Jira using Rest and get the name of an issue.

What do I need to install? I downloaded a jar of this page.

like image 703
F3RN1 Avatar asked Jun 22 '26 03:06

F3RN1


1 Answers

First solution

If you are using Eclipse than it is simple. Download the m2e plugin (Help -> Install new software --> Work with --> "m2e plugin download link").

Then New -> Project ... -> Maven Project In pom.xml add:

<dependencies>
...
    <dependency>
        <groupId>com.atlassian.jira</groupId>
        <artifactId>jira-rest-java-client</artifactId>
        <version>Version of the library you use</version>
    </dependency>
...
</dependencies>

And use what is needed from https://studio.atlassian.com/wiki/display/JRJC/Tutorial.

Other solution

Or, if your only need is to get the issues name then you can make an HttpRequest to the REST url and parse the returned JSON. How a REST response looks like: https://jira.atlassian.com/rest/api/latest/issue/JRA-9

See: How to send HTTP request in java? , Decoding JSON format in Java

like image 130
Peter Csiba Avatar answered Jun 23 '26 18:06

Peter Csiba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!