Using the JIRA API via Chrome App


I started making a JIRA plugin (in JAVA) and was bothered by the all the fluff that was needed and terrible documentation from Atlassian. All I really needed was to call the JIRA API and handle the JSON data returned. So, I whipped up a Chrome App in a couple hours.

Bootstrap and jQuery

Typically I avoid these if at all possible. Not because they aren’t great or anything, but because I consider them ‘shortcuts’ and find more value in doing everything by hand. In a previous project, getting rid of jQuery cut my package size in half. For this project, I decided to use both in the interest in pumping out a Proof of Concept as fast as possible.

The Source Code

This project is hosted on GitHub. Pull down the package and load in Chrome by enabling developer options and loading the unpacked package. Alternatively, use this Chrome App to load the App.

Calling the JIRA API

The user is shown a login page. The user enters the JIRA URL, like, and their username and password (note this will not work if you only use oAuth to login). When the user submits the form I make an AJAX call to the endpoint rest/auth/latest/session using Basic Auth. If the login is successful a dummy dashboard is shown, else an error message is display on the login form.