I have a jira projectKey,and I want to get all issueKeys by rest api.
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:
- Get the total issues in a project with a basic and 'quick and light' query
URL: https://<server>/rest/api/2/search?jql=project=<YourProjectKey>
- This gives a result like -->
{ "startAt": 0,
"maxResults": 50,
"total": 24,
"issues": [...] }- Iterate over the total number of issues to fetch the desired details/fields of each issue.
- Note: Maximum allowable fetch seems to be 1000 issues at a time.
- 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.
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.