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?

ROUAG Ines Feb 06, 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

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

ROUAG Ines Feb 06, 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 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>

0 votes
Jonathan Hult Oct 06, 2015

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 in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

9,948 views 43 44
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you