It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

6 votes
Answer accepted
Timothy Chin Community Leader Feb 06, 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

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 Chin Community Leader Feb 06, 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>

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Apr 09, 2019 in Portfolio for Jira

Portfolio for Jira 3.0 is here!

The wait is over... Portfolio for Jira Server and Data Center 3.0 is now officially here! Platform releases offer Atlassian an opportunity to shift our strategy, make bold predictions about t...

1,246 views 12 24
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you