Forums

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

Add Version via REST API (Server)?

Shawna Morris
Contributor
July 29, 2019

Hi Community! 

I am wanting to bulk add versions to existing JIRA projects (will be roughly 60) and am trying to achieve this through the JIRA APIs. We're currently running on JIRA Server and the API documentation for the Server version doesn't call out versions as something that can be done (however, it's there for Cloud). 

Is this possible? If yes, does anyone have the URI that I can plug in to something like Postman (curl works fine too). 

TIA!

1 answer

1 accepted

2 votes
Answer accepted
Shawna Morris
Contributor
July 29, 2019

I apparently just needed to poke a little bit further. Found a more set of robust API documentation here: https://docs.atlassian.com/software/jira/docs/api/REST/7.12.0/?_ga=2.171000544.1587847048.1564410774-1700155692.1531174923#api/2/version-createVersion 

To create a version, you need to do: (POST) /version 

{
"description": "Monthly Release",
"name": "2019.08.18",
"archived": false,
"released": false,
"startDate": "2019-07-22", //this wasn't in the JIRA documentation but you can set the date. 
"releaseDate": "2019-08-18",
"project": "JS",
"projectId": 11510
}

Now I just need to figure out how to create a collection of versions for about 60 projects. I could do it via PostMan and just 1) setup an API call for each version that needs to be added and then 2) make the "project" and "projectIds" variables and 3) change those variables with each run.

Anyone have an easier way? 

Wim Abts
Contributor
May 5, 2020

Hi Shawna, 

 

Did you succeed in doing this in a collection?

We create versions in around 60 projects using REST as well and currently have some issues when doing this. If we do this during office hours, jira gets an out of memory error and needs to be restarted.

Have you ever seen this kind of behaviour?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events