Skip to end of metadata
Go to start of metadata



About

JIRA REST Java Client is a Java library (usable from any JVM language) which allows to easily talk to any JIRA 4.2+ instance using new (and still evolving) REST API.

JRJC currently provides a thin layer of abstraction on top of REST API and related HTTP(S) communication. It provides a domain object model of JIRA entities on the client side - objects representing issues, priorities, resolutions, statuses, users, etc.

In the future though JRJC may be extended to handle things like caching (conditional GET, metadata) or provide a higher level of abstraction on top of existing REST API - completely shielding the user from the specifics of REST.

JRJC should be useful for integrating systems using JVM-based languages (like Java) with JIRA and specifically for integrating Atlassian products with themselves.

Get started

Javadoc is not overwhelmingly rich, but the code and the object model is rather self-explanatory and follows clear naming convention. But remember:

Use The Force, read the source.

Compatibility with JIRA

The goal for the release lifecycle of this library is to provide fully compatible version with the most recent JIRA version at the time of its release plug provide backward compatibility for officially supported JIRA versions.
You can check current compatibility here.

Asking for help

https://answers.atlassian.com/ is the most convenient place to ask JRJC development related questions. Try tagging your question with jira-development, jrjc and I should be able to answer the question quickly.
There are already tons of questions expressed and answered as comments to these wiki pages here and that's getting difficult to manage and read.

Your feedback

Both JIRA REST API and JRJC are still being developed (are only in alpha phase). Your early feedback is priceless. Feel free to raise issues in JIRA project or here (for JRJC itself), ask on Atlassian forums, comment these pages.

It's for you!

Recently Updated

 

  • No labels

9 Comments

  1. Anonymous

    I am using the JIRA REST Java client library from a Grails/ Groovy web app.  When I use the api to create an issue Client or a search client and then invoke a method to retrieve the data, I get the data back correctly.  But, I then get java.net.SocketException.

    Specifically, it says:

    Finalizer, called close()
    Finalizer, called closeInternal(true)
    Finalizer, SEND TLSv1 ALERT: warning, description = close_notify
    Finalizer, Exception sending alert: java.net.SocketException: Socket closed

    How do I prevent these exceptions?

    Yesterday, I got so many of them, I was no longer able to connect to the JIRA server.

    Please advise...

    1. where do you get these exceptions? On the client side or on the error side? Do you have any stacktraces?

  2. Anonymous

    Can you plz give link to REST sources? As it is still pretty buggy. For example when user have been deleted REST fails.

    And debugging becomes pretty necessary in this case to be able read issue even if some fields can't be read.

    1. Anonymous

      You can ignore that. Current java version is extremely buggy.

      Refused from idea to use that plugin.

      1. Hey, which sources do you mean? And which java version is extremely buggy?
        Do you mean JRJC here? Or REST API itself (on the server side)? BTW: the source code of the latter is part of JIRA source distribution (available to every commercial license holder).

        1. Anonymous

          I mean: Jira REST Java Client v0.3

          I have tried to use it to retrieve data from our Jira 4.3 and found lot's of bugs on:

          - retrieving log data for deleted users (you expect only Anonymus)

          - retrieving TimeTracking - sometimes in jira issues (Tasks) it's just Null. But you can see it in JIra

          - some more errors were happening which would need Rest Java Client to be decompiled to see the reason.

          But surely looks like that client needs much more testing and bugfixes.

          1. deleting users in JIRA is "a bad thing" (tm). JRJC did not bother about supporting such scenarios, but I will look into it.
            WRT missing time tracking info - could you provide me with a concrete examples (best with JSON representation of the issue which JRJC cannot parse).
            I would also be very thankful if you could provide me with more details about which errors were making you to decompile JRJC (which actually is an open source lib, so you have a very easy access to the source code (smile)).

            If people shared more detailed feedback it would be easier for us to quickly come up with improvements and make JRJC more powerful and stable.

  3. Anonymous

    Need help trying to add comments and issues.  Is it possible to add comments using the JIRA REST api?  I cannot use the RPC SOAP API because it requires AXIS 1.3.  I have a security jar that requires AXIS 2.0, so SOAP is not going to work.  I have not been able to successfully implement the RPC XML API because I cannot find additional detail on how to implement the JIRAXmlRpcService.  I do not know how to connect to JIRA using the constructor for the JiraXmlRpcService class.  What is the PluginAccessor class?  How do you configure it?

    JIRAXmlRpcService(com.atlassian.plugin.PluginAccessor)

    As far as the comments are concerned, can you generate another version of the REST api that will work with JIRA 4.3.4?  It  is able to transitions with comments.  Why can't it do just a plain comment?????

    1. adding issue comments and creating issues via REST is only supported since JIRA 5.0.
      JRJC does not yet support it, but I am hoping to close this gap in incoming weeks rather than months.

      JIRAXmlRpcService is a server-side component. You are talking here about extending server side XML-RPC (which requires coding a plugin which has the access to other components/services/managers lik PluginAccessor - being here just injected by the container), instead of using on the client side. Feel free to post question on answers.atlassian.com and people should be able to quickly help you discover how to use XML-RPC.

      If you want just to add a comment via REST API in JIRA 4.3.4, if I were you, I would create a simple REST resource (plugin) which would expose such functionality. There is a tutorial which should make clear how to do it - https://developer.atlassian.com/display/REST/REST+Plugin+Module and https://developer.atlassian.com/display/DOCS/Incomplete+Plugin+Tutorial+-+Writing+REST+Services.
      Unfortunately for JIRA versions 4.x, REST was only evolving and was far from being complete (it was mostly read-only). With 5.0, REST is finally the first-class citizen and you should be able to achieve anything you could do with SOAP and XML-RPC and more.