Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Token for Jira REST API

Tags:

java

rest

jira

I don't have much experience with REST. Trying to extract some stats from my company Jira, and don't want to use JQL.

The question is, the token that I need to make the API calls, do I get it from my company's Jira or do I need to create an account with Atlassian and use the token from that account?

Thanks in advance.

like image 326
user515232 Avatar asked Oct 19 '25 20:10

user515232


2 Answers

You should be able to create your own access token from within Jira when you are logged in.

From the Documentation:

  • In your Atlassian application go to:

    • Select your profile picture at top right of the screen, then choose Settings > Personal Access Tokens .
    • In Jira, select your profile picture at the top right of the screen, then choose Profile. Once you access your profile, select Personal Access Tokens in the left-hand menu.
  • Select Create token.

  • Give your new token a name.

  • Click Create.

  • Your personal access token is created. Copy the token and store it in a safe space.

However this might depend on your specific Jira installation. Your companies system administrators might have restricted this feature.

Access Token Documentation

like image 196
Leonhard Bauer Avatar answered Oct 21 '25 11:10

Leonhard Bauer


In Jira Server you could just use Basic Auth.

  • click F12 on your keyboard => Console type in :

btoa("your-username:yourpassword")

A token should be generated, You can use it to authenticate with Postman or any other API Tool you might use.

Headers: "Authorization : Basic ${token}"

Jira cloud behaves different,

Creating PATs in application

In your Atlassian application go to:

In Confluence, select your profile picture at top right of the screen, then choose Settings > Personal Access Tokens .

In Jira, select your profile picture at the top right of the screen, then choose Profile.

  • Once you access your profile,

  • select Personal Access Tokens in the left-hand menu. Select Create token.

  • Give your new token a name. Optionally, for security reasons, you can set your token to automatically expire after a set number of days.

like image 35
Shachar297 Avatar answered Oct 21 '25 10:10

Shachar297