Search code examples
cloudjira-rest-api

Jira REST Client Library for Cloud


In the overview of the Jira Rest Java Client, Atlassian specify:

The Jira REST Java Client works with Jira Server, but not with Jira Cloud.

Is there a client library for the REST APIs of Jira cloud?


I can't find any open source libraries on the internet that are geared specifically towards using the Jira cloud REST APIs.

The following question seems to be implicitly asking the same thing as I am, but is explicitly focused on the existence of a POM: How to use JIRA REST client library?. So the answer there focuses on advise on usage of a POM found on Maven.


Solution

  • Client library

    An associate developer has finally built this library:

    https://gitlab.com/hectorjsmith/jira-api-client

    There's a README on that site for how to use it. It builds upon the raw library - see below.

    Raw Library Using OpenAPI

    Thanks to s. hesse for pointing me in the right direction, I got a Kotlin library generated using the Open API tools. The Open API generator was a bit buggy, first complaining about the JSON provided by Jira and then creating Kotlin with a little bug in it. But with some tweaking the Kotlin compiled to a JAR. I haven't tested yet but here's the repo for anybody interested: https://github.com/ColmBhandal/KotlinJiraCloudClient.

    Notes

    The library that's autogenerated by the Open API Generator is pretty ugly. That's to be expected of auto-generated code from a tool that's not specifically tailored towards Kotlin. However, there's not much point prettifying it as the APIs may change and so regenerating this might be necessary. Instead, it's advisable to generate another layer of code between this ugly library and your client code. The code would be a sort of decoration/facade on top of the raw exposed code that's auto-generated, wrapping it to give type-safety and better ease of use.

    Python Alternative

    It also looks like there's a Python library out there for connecting to Jira, though we didn't want to use Python in this case: https://pypi.org/project/jira-cloud-python/