I can easily get all open issues from the Kanban board with "https://<mycompany>.atlassian.net/rest/agile/1.0/board/<boardid>/issue", but I can not pull the closed issues. I have done it successfully with the Scrum board, where I get all issues back, open or closed. I am not sure why, but for Kanban, it seems that the API only pushes back open issues. Suggestions?
Thanks!
Hi Amy
I just tried the /issue call on a Kanban board of mine and it returned closed items, but I have these closed items showing on the Kanban board. The API call you're using is saying "show me everything that's on the board". Do you have all these closed items showing on your board? If not, I suspect your board filter is possibly excluding them, in which case you'd need to do as Domagoj said and pass in a ?jql= where you're negating what's in the board filter to exclude closed items. I hope that makes sense. If not, show us what your board filter is and we can tweak it for you
Thanks, Warren, for your response. No, we do not display our closed items, (actually I mean the "Done" issues), on our Kanban board. Evenually there would be hundreds and that would not display well :)
I am trying Domagoj's solution, but I have not done this before. Can you let me know if I am constructing this correctly? Here is my API call:
"https://<mycompany>.atlassian.net/jira/rest/api/2/issues/search?jql=project%20%3D%20<<myproject>>"
It doesn't work though--am I forming it improperly? Should it be a JIRA.com address instead?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please note the call that you're using is incorrect, it shouldn't have the /jira or the /issues - see my call further down
You need to see what your board filter is, but assuming it's just for the one project, I would imagine it looks something like
project=<myproject> AND status!=Done
so that it excludes the Done items.
What you want in the ?jql part is then just the first bit, so
https://<mycompany>.atlassian.net/rest/api/2/search?jql=project=<myproject>
where <myproject> is the 2, 3 or 4 letters before the issue number (e.g. a project called Digital Development Team would have issues DDT-232 and DDT-4568, so you would use DDT in that instance)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, sorry, I added the /issue at the last minute when I was trying to troubleshoot:
https://<mycompany>.atlassian.net/rest/api/2/search?jql=project=DMR actually works now! Thank you both for your help! I am so glad I joined the Atlassian community today--it saved me so much time!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, this is working fine. but i can get maxresults as 50. how can i get all records?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You need to perform multiple requests to get all the data. To do this you need to use the maxResults and startAt parameters, so the first call would be
https://<mycompany>.atlassian.net/rest/api/2/search?jql=project=DMR&maxResults=100&startAt=0
then the next call would be
https://<mycompany>.atlassian.net/rest/api/2/search?jql=project=DMR&maxResults=100&startAt=101
and keep going. There is a returned field called total which is the total number of records available.
So you could get returned values of startAt=0, maxResults=100, total=225 which means you would need to do the call 3 times (1-100, 101-200, 201-225).
The highest that maxResults can be is 100, this is a setting in Jira. It used to be 1000, but Atlassian reduced it last year (but that's another story!)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What about searching issues with jql?
Something like this
http://www.example.com/jira/rest/api/2/search?jql=...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answer, Domagoj. I am trying to figure out how to form the url for the search, as you suggested.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.