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.
Hi @Vikraman - please refer to this documentation: https://confluence.atlassian.com/jirakb/how-to-bulk-release-versions-through-rest-api-in-jira-1027124117.html
@Muhammad Fahad We are using jira cloud hosted by atlassian, but the confluence link you have shared is for server and data center.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Muhammad Fahad I would appreciate if you can confirm that, we can use update API endpoint to trigger the release?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vikraman - Yes, that's correct. You need to use Update version endpoint and pass released as true for the released versions:
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 }'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{"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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We only provide released and releasedDate properties in the body.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.