REST API get all issues of version?

Adria Alonso
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.
November 13, 2019

Hello all,

I'm trying to find the correct endpoint where I can make a xttp request and get back all issues specifying versionID orKey.

I can just get a count of resolved, unresolvet, etc.

I'd be surprised if Its impossible to get a JSON with all issues of a version

Is thisavailable?

 

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Warren
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.
November 13, 2019

Hi @Adria Alonso 

I use the cloud version, but looking at the API doc for server, this should be possible.

Run a generic search using /rest/api/2/search and pass in a JQL like fixVersion=ReleaseXX 

Adria Alonso
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.
November 13, 2019

Yes, thank you, just got into that by following this thread

https://community.atlassian.com/t5/Jira-questions/How-to-get-all-issues-of-a-project-using-Rest-API/qaq-p/832316

I was changing project for version, but its expecting fixVersion.

Awesome!!

Thanks

Like Marc Wampfler likes this
Adria Alonso
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.
November 18, 2019

@Warren 

Is it necessary to use POST to get more than 50 issues without modifying the hard coded 50 issues per jira search?

Thank you

Warren
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.
November 18, 2019

Hi @Adria Alonso 

I'm not sure what you're asking, POST is for changing data in Jira, you're using GET to read the data.

You should be able to add &maxResults=100 but you cannot retrieve more than 100 in one call, so your call would look something like :

/rest/api/2/search?jql=fixVersion=ReleaseXX&maxResults=100

If you expect or have more than 100 results, you will need to use multiple calls, where your second call would add &startAt=100 and the 3rd call would change it to &startAt=200

Like # people like this
Adria Alonso
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.
November 18, 2019

Thank you, Certainly POST is for sending not retrieving, just had a hard day.. (the parameter wasnt working and i thought maybe i needed to send it in post with a json in body)

Thank you for your answer, I understand for the 100, due to the fact that i can be a lot of time to deliver the Json and end in a timeout call. I think i'll stick with the maxresults at 100 and then the startat and use some pagination.

Thank you again,

Suggest an answer

Log in or Sign up to answer