Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to get Jira issue id from issue key

Zephyr apis accept issueId. How to we programmatically get the corresponding issueId for an issueKey?

If we have to use combination of Jira and Zephyr apis, then how do we authenticate programmatically for Jira api calls like we do for Zephyr through JWT.


2 answers

2 accepted

2 votes
Answer accepted
DPK J Community Leader Aug 18, 2019

What platform are you on?

  1. Jira server
    • You can call <JIRA_BASE_URL>/rest/api/2/issue/{issueIdOrKey}
      • This api accept issue id or key as path parameter.
    • For authentication on server platform you have two options
      1. BasicAuth (base64 encoded username and password)
      2. oAuth
    • You can read more about it here
  2. Jira Cloud
    • You can call <SITE_URL>/rest/api/3/issue/{idOrKey}
      • similar to server this api also accept issue id or key as path parameter
    • For authentication on cloud platform you have two options
      • BasicAuth with API Key (base64 encoded email and api key)
      • oAuth 2.0
    • You can read more about this here

I am getting 404 if I try GET/rest/api/2/issue/{issueIdOrKey} even though the issue exists for that key. Any help?

0 votes
Answer accepted

Hi @Sarangadhar.Sahani ,

You can get it using REST API 



If you want to get using JAVA API . You can user IssueMangaer class. From this you can get issue object using issuekey.

Thank you @Sreenivasaraju P can you help me how the authentication work for calling  atlassian apis? Does it work through JWT like Zephyr?

Suggest an answer

Log in or Sign up to answer