You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm working on a project to retrieve some info from JIRA using it's Rest APIs.
I just have project name with me. Requirements are:
1. How to get project key from only project name?
2. How to fetch all the unresolved issues of that project?
I went through REST documentation, but did not find much.
As you might have guessed I'm new to Jira.
So, please suggest.
the /rest/api/latest/search gives back a response you could use for pagination by default. For instance, the response will look something like the following:
"startAt": 0, // tells you from where JIRA started looking for you
"maxResults": 50, // how many it sent you in this response
"total": 5000, // how many it actually has in total
"issues": [0...49] // the 50 issues(maxResults) you asked for
In the next request you could then send the param startAt=startAt+maxResult (0+50, in this case) which will then return
On a side note, if you give maxResults=-1 JIRA will provide you as many results as it can, depending on what's configured on your JIRA instance by the admin
And, yes you can get results for multiple issues. Just give project in (p1, "p2 new") etc
project is not empty give all issues in all projects
Note that the double quotes are needed if the project name has multiple words with space in between. Also while using double quotes you might need to consider encoding or escaping it based on what client or programming language you are using to test the request
Hope this helps