The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How connect to Jira server with REST API and Java language?

ROUAG Ines
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 6, 2013

Hello,

I would like to use the REST API for communicate with JIRA. For example, I want to create an issue, so I must to connect to a JIRA server.

I don't know how to do. I use Java language. I search on every forums and Atlassian tutorials but it doesn't works.

I also install JRJC and Maven2 plugin for Eclipse dev cause I've seen in the Atlassian tutorial it's good to develop with this plugin but I don't know to use this plugin so when I create a Maven project I have a lot of errors. Can I have help for understand how this plugin works?

Can u help me to resolve my problem?

Thanks in advance,

Best regards.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

6 votes
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 Champions.
February 6, 2013

You need to create a client in your Java code to send and receive REST request and responses.

https://confluence.atlassian.com/display/DOCSPRINT/The+Simplest+Possible+JIRA+REST+Examples

ROUAG Ines
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 6, 2013

Thanks for your answer!

I know this tutorial but my problem is to add depedencies in my pom.xml without errors.

Can u help me? Do you know how works Maven2 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 Champions.
February 6, 2013

You'll have to find your own resources on how to use Maven 2 to add dependencies.

Just as a heads up, I use this for creating a REST client:

<dependency>
	<groupId>com.sun.jersey</groupId>
	<artifactId>jersey-client</artifactId>
	<version>1.8-atlassian-6</version>
	<scope>compile</scope>
</dependency>

I use this for parsing JSON:

<dependency>
	<groupId>com.googlecode.json-simple</groupId>
	<artifactId>json-simple</artifactId>
	<version>1.1.1</version>
	<scope>compile</scope>
</dependency>

0 votes
Jonathan Hult
Contributor
October 6, 2015