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
4,359,816
Community Members
 
Community Events
168
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 https://docs.atlassian.com/software/jira/docs/api/REST/8.3.2/
  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 https://developer.atlassian.com/cloud/jira/platform/rest/v3/

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 

 /rest/api/2/issue/{issueIdOrKey}

https://community.atlassian.com/t5/Jira-questions/How-I-get-issue-id-of-particular-issue-in-Jira-Service-Desk/qaq-p/977378

 

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