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

Jira API jars

Gurpreet Singh Jul 25, 2013

How do i get access to JIRA api jars ?

5 answers

0 votes
Nic Brough [Adaptavist] Community Leader Jul 25, 2013

I'm afraid that is far too vague a question. In what context do you want "access"? I mean, what are you trying to do - write a plugin that depends on the API? Modify core functionality? Read the code for them? Include them in an IDE somehow?

0 votes
Gurpreet Singh Jul 25, 2013

i want to build my code on top of jira api i want to read the data from jira in code... similar to plugin kind of stuff but not plugin ... i want the jira api jars in my java project

0 votes
Nic Brough [Adaptavist] Community Leader Jul 25, 2013

Ok, so you'll need to import them into your projects as dependencies, the same way Jira plugins do.

I do think you might have a structural problem here though. It sounds like you are writing a system that will be using Jira data, but not inside Jira. You'll be able to use some of the Jira API you import, but you'll effectively need to build an entire Jira skeleton in order to use them - that's potentially a vast project to clone part of Jira.

Could you explain the actual requirement here? What does your code need to do? If it's a completely new view of Jira by an external application (like Almworks Jira client, JRJC, a phone or tablet application, making it run on a toaster, etc), then you may find it far easier to simply use Jira's REST interface. Or *read* the database directly. Or write a Jira plugin that exposes the bits of Jira you need.

0 votes
Gurpreet Singh Jul 25, 2013

My actual requirement -

Reading custom fields from jira (but from outside jira).

for reading other type of jira data i was using jira rest api...but for the fact that jira custom fields can be widely configured/built using plugins...

so reading them using rest api will doesn;t give me generic approach (for e.g. somebody entering new custom field using a plugin to their jira system)

i need to read the value of this field.. upfront i will not know the json data representation of this field. so in a way i cannot

read this field's value(though i can read entire json representation).

For e.g. in a standard custom field(following data).

type - string

class - com.atlassian.jira.plugin.system.customfieldtypes:select

representation - "customfield_10005":{"self":"http://localhost:8080/rest/api/2/customFieldOption/10002","value":"Resend Epicurean","id":"10002"}

in this i know i will be reading value component of json object if if's of above mentioned class "com.atlassian.jira.plugin.system.customfieldtypes:select" i.e. is a standard custom field in java

so i am looking to read the values of custom fields of all types created through plugins in a generic way. so that i dont need to change my code..once a new type of custom field is entered through a plugin

0 votes
Nic Brough [Adaptavist] Community Leader Jul 25, 2013

Ah, I see, you need to get at stuff REST does not natively expose.

To use the Jira APIs though, you need to be running inside Jira, or at least something that's very like a Jira skeleton. That means you'll need to reconstruct a database connection layer, the core of a web application, the functions to support the APIs to a minimal level, and so on.

I'm not sure that you can really code for every eventuality that someone adds new fields via a plugin. But I can see why you want a generic handler for this.

My suggestion would be to write a small plugin for your Jira that provides the information you need over REST. Something that, when poked, returns "here's a list of all the custom fields and their types" so that your application then has all the information it needs about the fields (Options - you could copy and extend the existing REST plugin, or create one that runs just your new functions at a different location)

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Jira Software

Demo Den Ep. 5: Meet Jira Mobile

See how to use Jira on the go! Demo Den Episode 5 is here: meet Jira Mobile with  Jira  Product Manager Rayen Magpantay.  Demo Den is in our monthly series where a Jira PM demonstrates...

315 views 1 10
Join discussion

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