What is the release button api end point?

Vikraman December 15, 2021

I'm planning to trigger release in jira, when prod CI/CD pipeline is triggered using curl command. To perform, I need api end point for release button. Also I have an API endpoint to trigger my pipeline, so is there a way to trigger an API endpoint from Jira when I click the same release button. 

Screenshot 2021-12-16 at 1.04.45 PM.png

1 answer

0 votes
Muhammad Fahad
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.
December 16, 2021
Vikraman December 16, 2021

@Muhammad Fahad We are using jira cloud hosted by atlassian, but the confluence link you have shared is for server and data center.

Muhammad Fahad
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.
December 16, 2021

Hi @Vikraman - For cloud you can refer to these project version APIs (Create, Get, Update, Delete) - https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-group-project-versions

Vikraman December 16, 2021

@Muhammad Fahad I would appreciate if you can confirm that, we can use update API endpoint to trigger the release?

Muhammad Fahad
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.
December 16, 2021

Hi @Vikraman - Yes, that's correct. You need to use Update version endpoint and pass released as true for the released versions: 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-version-id-put

cURL example:

curl --request PUT \ --url 'https://your-domain.atlassian.net/rest/api/3/version/{id}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "archived": false, "overdue": true, "releaseDate": "2010-07-06", "name": "New Version 1", "self": "https://your-domain.atlassian.net/rest/api/~ver~/version/10000", "description": "An excellent version", "userReleaseDate": "6/Jul/2010", "id": "10000", "projectId": 10000, "released": true }'
Like Vikraman likes this
Vikraman December 17, 2021

Thank you!

Vikraman December 20, 2021

{"errorMessages":[],"errors":{"name":"A version with this name already exists in this project."}}

 

@Muhammad Fahad I'm getting the above response.
My requirement is to trigger an existing release using api end point

Nathan Hitchman January 18, 2022

We only provide released and releasedDate properties in the body.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events