O'Reilly logo

JIRA 5.x Development Cookbook by Jobin Kuruvilla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with issues

So far we have seen how to write the clients for REST, SOAP, and XML/RPC methods. Now it is time to move on to some real examples. In this recipe, we will have a look at creating an issue using REST APIs.

Getting ready

Create a JIRA REST client as mentioned in the Writing a Java client for the REST API recipe.

How to do it...

The following are the steps to create an issue with the standard fields populated on it:

  1. As mentioned in the Writing Java clients for the REST API recipe, initialize the Rest client:
    final AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory(); final URI uri = new URI("http://localhost:8080/"); final JiraRestClient jiraRestClient = factory.createWithBasicHttpAuthentication(uri, "userName", ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required