We’re working on several improvements to the REST API in Jira 4.3. This is a sneak peek at what’s available in the first milestone release of Jira 4.3.
Search for issues and projects using JQL
One of the top complaints that we received regarding the REST API in Jira 4.2 was the lack of searching and discovery capabilities for issues and projects. It was easy enough to request an issue once you knew its key, but it wasn’t possible to discover the key through the REST API.
In Jira 4.3 Milestone 1, the REST API supports searching for issues with a JQL query. The newly-introduced /search resource is the REST API equivalent of Jira Advanced Searching, and it returns a paged result list with links to the issues returned by the search.
For example, to search for all issues containing the text “broken” you would perform a GET on the /search resource, optionally passing in a JQL query:
You can also obtain a list of all projects on a Jira instance:
CAPTCHA resolution headers
The REST login resource now contains a mechanism for clients to determine whether the user is required to pass a CAPTCHA challenge. If CAPTCHA’s are enabled in Jira, the user will be required to pass a CAPTCHA challenge after a number of failed login attempts. REST clients can now tell if this is the case by looking at the X-Authentication-Denied-Reason HTTP header. The only value currently supported is CAPTCHA_CHALLENGE.
HTTP/1.1 403 Forbidden
X-Authentication-Denied-Reason: CAPTCHA_CHALLENGE; login-url=http://localhost:8090/jira/login.jsp
We have also fixed several errors and omissions in the Jira REST API Reference. If you have any questions regarding the REST API that are not answered in the reference documentation or in the tutorial, let us know!