The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to get the {id} of a project latest version through the REST api ?

Lior Pesoa
Contributor
October 25, 2016

Hi,

 

Is there a way to get ONLY the latest version {id} using JIRA REST api ?

I am trying using some scripts to archive the latest version and then creating a new version, but i can't get the {id} for that.

 

Any ideas?

{id}

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Peter Geshev
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 Champions.
October 25, 2016

Hi Lior,

You can query the paginated project versions API restpoint and set the maxResults param to 1 and pass the orderBy param to startDate/releaseDate (adding - before the order param value will cause descending order to be used).

Regards,
Peter