I want to write a java based program which will interaction with the Rest API exposed by Jira Cloud (https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/).
This program will interact with Jira to perform tasks like "Create Issue", "Update issue" etc.
I could not find and Java based rest client library that I can you for this purpose.
Does Atlassian publish and maintains such a library?
What I found on the internet is the following client library but can you confirm if this can be used to integrate with "JIRA Cloud"?
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
Hi there. Good question!
No Atlassian does not publish a pre-built library to call Jira Cloud APIs. The Maven artifact you list is the Jira Server library. The Jira Server library is built to work with a specific version of Jira Server. You will find that many things are different in Jira Cloud.
There is a solution though! We publish an Open API (aka "Swagger") spec that describes our API, and this works quite well with code generation tools. That way you can generate a client library in your language of choice (e.g. Java) from the spec.
This blog post walks you through a simple example: https://blog.developer.atlassian.com/update-to-jira-clouds-swagger-openapi-docs/
You may choose to generate a stand-alone library (like in the blog post), or you may choose to use the swagger codegen maven plugin to generate the library at build time.
Can you also explain the usage of the following java library.
Can this library be used in the java code to interaction with Jira Cloud APIs? I understand that I have to write a REST client anyways but I want to understand the purpose of this library.
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>9.5.0</version>
<scope>provided</scope>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a Java API for Jira Server for writing Java plugins, where you install the plugin in your Jira Server/Data Centre instance. This is very different to the REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do not use swagger-codegen, use openapi-codegen (java version). Otherwise you will have to make endless tweaks to the generated code. Compile with java 8.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, just for reference quick guide on how-to generate client using docker:
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
-i https://developer.atlassian.com/cloud/jira/platform/swagger-v3.v3.json \
-g java \
-o /local/client-from-openapi/java
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.