Create a version from a kanban board using the REST API

karl October 17, 2019

Hi, 

The API documentation gives clear instruction on how to create a new version in a project but what if I wanted to create a new version from a Kanban board. Is that possible?

It would be a much better solution than creating the release and then adding the tickets to the release afterwards.

1 answer

1 accepted

0 votes
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 18, 2019

Hello Karl,

Thank you for reaching out.

I understand that you would like to create a version from the rest API and apply it to all issues in a specific Kanban board. Is it correct?

As you can see in this documentation, Versions are related to projects and are used to schedule and organize your releases applicable only for the specific project it was created. With that in mind, we do not have a REST API to create versions from specific boards because boards are based on a JQL filter which can be related to multiple JIRA projects or not, making the versions not applicable to all the scenarios of a board.

That being said, I  recommend you two steps to achieve your need in an efficient way:

1 - Create the version through rest API

2 - Use the Edit Issue API to set the board filter and properly edit the issues with the version you created.

Let me know if this information helps.

karl October 21, 2019

Hi, thanks for explaining! I understand why we have to do it this way now.

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 21, 2019

You are welcome, Karl.

Have a nice week!

Seth_Efrat November 26, 2019

Hi, can you please go into detail on your answer:

1 - Create the version through rest API

I've tried multiple curl commands but, I keep getting an internal server error when trying to create a version. I'm thinking my syntax may be wrong.

curl -kv -D- -u user:password -X POST --data '{"name": "1.10.10", "released":true, "project": "PROJECT-KEY", "releaseDate": "2020-22-39"}' -H "Content-Type: application/json" https://jira.net/rest/api/2/issue/

Suggest an answer

Log in or Sign up to answer