Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get all issueKeys in a jira project by rest api?

Ronaldo Huang
Contributor
January 12, 2021

I have a jira projectKey,and I want to get all issueKeys by rest api.

1 answer

1 accepted

1 vote
Answer accepted
Daniel Wong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 12, 2021

Hi Ronaldo,

I'm going to quote an answer (with a bit of updates to direct at this question) from a previous answerer as that person has given a very good description and brief guide on how to use Jira's REST API:

  1.  Get the total issues in a project with a basic and 'quick and light' query
    1. URL: https://<server>/rest/api/2/search?jql=project=<YourProjectKey>
    2. This gives a result like --> 
      { "startAt": 0,
        "maxResults": 50,
        "total": 24,
        "issues": [...] }
  2. Iterate over the total number of issues to fetch the desired details/fields of each issue.
    1. Note: Maximum allowable fetch seems to be 1000 issues at a time.
    2. We can also filter the fields that we are interested to fetch. Since you are only interested in key, we will filter fields shown to just key.
    3. search on URL: "https://<server>/rest/api/2/search?jql=project=<YourProjectKey>&fields=key"

I highly suggest reading the previous answerer's post as it will give you more context and has some other useful tips to handle projects with > 1000 issues - sayeed1310's answer

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events