So far, we have seen how to write the REST client using JRJC. Now it is time to move on to some real examples. In this recipe, we will take a look at using REST APIs for various issue operations, such as creating issues, browsing issues, and so on.
Let us start with creating issues using the JRJC client, before moving onto updating/editing issues and browsing issues.
The following are the steps to create an issue with the standard fields populated on it:
As mentioned in the Writing Java client for REST API recipe, initialize the REST client:
final AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory(); final URI uri = new URI("http://localhost:8080/jira"); final JiraRestClientjiraRestClient = factory.createWithBasicHttpAuthentication(uri, "username", "*****");
Retrieve...