How to bulk release versions through REST API in Jira

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article covers a way, through REST API calls, to bulk release versions in Jira.

The solution presented here can be tweaked to update any info on versions too.

The User Interface (UI) doesn't provide a bulk edition feature, only making it possible to update versions on a one-by-one basis:

(Auto-migrated image: description temporarily unavailable)

A built-in bulk edit feature's being tracked on JRASERVER-10981 - Bulk Version Management.

Environment

All versions of Jira Core and Software from 7.x to 8.x.

Solution

Through the REST API, we'll print the commands to update each unreleased version for the same project. The output commands will be ready to be executed back in the terminal.

This solution may be adjusted to bulk update other fields available on the update Version endpoint:

1 2 3 4 5 6 7 8 9 10 11 12 { "self": "http://www.example.com/jira/rest/api/2/version/10000", "id": "10000", "description": "An excellent version", "name": "New Version 1", "archived": false, "released": true, "releaseDate": "2010-07-06", "overdue": true, "userReleaseDate": "6/Jul/2010", "projectId": 10000 }

1) Produce the update commands

Execute the below command to list the update commands for all unreleased versions from project P1.

On the examples below, replace http://localhost:50805 by your Jira's base URL (port optional), admin:admin by an admin's username:password and P1 by the project key which versions are to be updated:

With releaseDate

1 curl -s -u admin:admin -H "Content-Type: application/json" -X GET "http://localhost:50805/rest/api/2/project/P1/versions" | egrep -o '{.*?}' | grep '"released":false' | sed 's/{"self"://g' | awk -F"," '{print "curl -s -k -u admin:admin -H \"Content-Type: application/json\" -X PUT --data '\''{"$3", \"released\":\"true\", \"releaseDate\":\"2020-11-02\"}\'\'' " $1}'

Without releaseDate

1 curl -s -u admin:admin -H "Content-Type: application/json" -X GET "http://localhost:50805/rest/api/2/project/P1/versions" | egrep -o '{.*?}' | grep '"released":false' | sed 's/{"self"://g' | awk -F"," '{print "curl -s -k -u admin:admin -H \"Content-Type: application/json\" -X PUT --data '\''{"$3", \"released\":\"true\", \"releaseDate\":null}\'\'' " $1}'

The output should be similar to:

1 2 3 4 curl -s -k -u admin:admin -H "Content-Type: application/json" -X PUT --data '{"name":"v1", "released":"true", "releaseDate":"2020-11-02"}' "http://localhost:50805/rest/api/2/version/10100" curl -s -k -u admin:admin -H "Content-Type: application/json" -X PUT --data '{"name":"v2", "released":"true", "releaseDate":"2020-11-02"}' "http://localhost:50805/rest/api/2/version/10101" curl -s -k -u admin:admin -H "Content-Type: application/json" -X PUT --data '{"name":"v3", "released":"true", "releaseDate":"2020-11-02"}' "http://localhost:50805/rest/api/2/version/10102" curl -s -k -u admin:admin -H "Content-Type: application/json" -X PUT --data '{"name":"v4", "released":"true", "releaseDate":"2020-11-02"}' "http://localhost:50805/rest/api/2/version/10300"

You may copy the output to file and adjust the releaseDates accordingly for each version. Note the version "name" is being updated to the same value — it's just to make the editing of the output more human-friendly as you'll know to which version each line corresponds.

2) Execute the batch commands

Once you're satisfied with which versions will be updated and with which releaseDates, simply copy the contents to the terminal. Each newline will be automatically executed.

Updated on March 11, 2025

Still need help?

The Atlassian Community is here for you.