JIRA REST API

asmaa salmaoui August 18, 2013

Hi,

i have a question please how can i use JIRA Rest api to present some data like jira issues, all what i find is an exemple of a small python script that use our REST interface, but me i have a java application, i don't have an idea how can i integrate this interface in my application code

Think you


2 answers

0 votes
LucasA
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 Leaders.
August 18, 2013

Hi Asmaa,

You'll need to write a JAVA code able to trigger HTTP methods against specific JIRA URLs. For retrieving data, you'll need to use the GET method; For inserting data, you'll need to use the POST/PUT methods, and for deleting data, the DELETE method.

As defined by REST API, all the JIRA's response will have a JSON format, so it's easily for parsing it and displaying on your application. I don't have any snipet in JAVA (I'm only fluent in Python, Perl and Bash), but you can search here on the forum (in threads like this) how to proceed.

As Atlassian, we do have some examples using Python, as well some examples using cURL. There's also lots of good browser extensions (I recommend Postman, for Google Chrome) for testing the methods/URLs before implementing the code in JAVA.

Best regards,
Lucas Timm

asmaa salmaoui August 18, 2013

an other question please Lucas.. for exemple i have an application that retrieve all client in a jsp field, i want show each row of my table that's mean every client in a jira issue (using an rest api), if you can help please

0 votes
MB
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 Leaders.
August 18, 2013

To be able to use JIRA's REST API, you need a REST client in your Java application. You can find a list of some popular java rest client implementations and use one of them to access JIRA REST services.

If you want to quickly test some REST services in JIRA, you can log in as an administrator in your JIRA instance and go to http://localhost:2990/jira/plugins/servlet/restbrowser (or go to Administration area - System - REST API Browser).

You can also try using JIRA REST Java Client library (JRJC) but I'm not sure if it will hurt you a lot or not :)

asmaa salmaoui August 18, 2013

think you very much Mladen B :)

Suggest an answer

Log in or Sign up to answer