How to access JIRA cloud API

Prateek Neelgund
3 min readMay 20, 2020

--

Most people would try to play around with JIRA API but end up with no results. Likewise, I have been trying to access a couple of JIRA Cloud API but have faced issues in connecting to JIRA cloud and was not able to hit any API. After a lot of research on errors, I still could not get the exact solution to hit the API.

I am pretty sure before coming here, you would have searched for a solution (like crazy) but ended up with either one of the below-mentioned error messages.

{
“error”: “Failed to parse Connect Session Auth Token”
}

Or

{
“errorMessages”:
[“Issue does not exist or you do not have permission to see it.”], “errors”: {}
}

This page will give you complete step by step procedure to access the API.

Now let us fix this issue step by step

JIRA cloud app architecture

Step 1 : Generating the API Token

Log in to your Jira cloud account and then click on the below link
https://id.atlassian.com/manage-profile/security/api-tokens
or
1. Hover over on “Your profile and settings” and click on “Account settings”
2. Select the “Security” option and click on
Create and Manage API tokens” under API token section.
The information below will be displayed on your screen:

Create and Manage API token screen

3. Click on “Create API token” and generate and save it on your note pad for future use.

Step 2: Generating the Authorization Token to access the API

We cannot access the API using the token generated in Step 1.
Authorization token should always be in Base64 format so now we need to convert our API token into Base64 format.

How do we convert that ?
You can use any online converts but I have used the below mentioned link to convert it.
https://www.base64encode.org/
Enter your Email ID and Password in below format :
JIRA CLoud account EMail ID : API token [Generated in Step 1]
Example :
Prateek@gmail.com:PkZCF07tUyrNax1eScjS53C5
and click on “Encode” button and you would be ready with the Authorization token. And it looks something like this [c7ZjLmW1dG9tYXRpb251c2QyQGVnLmNvpFoQa0pDRjA1dFV5ck1heDFkU1NqUzUzQzU=]

So here we generated the authorization token using the email ID and the API token.

Step 3 : Accessing JIRA API

In the above steps, we have seen how we can generate the API token and authorization token so let us try to hit the API.
ARC is a plugin that can be used with Google Chrome browser.
You can configure ARC using this Link

Once the ACR is configured, lets hit the API and see the response.

Advanced Rest Client with all the parameters and the response

Enter the URI for the API that you want to see the result for, mention the header parameter for authorization and prefix the token with “Basic” and enter the Token.

Hit the send button and there you go. Hope you are successfully able to access the Rest API with this solution.

I would like to thank Mr. Aneesh Bhat (Aneesh b) for helping me understand the JIRA cloud API architecture.

--

--

Prateek Neelgund

An Engineer, interested in learning new things and sharing information.