Description: Releases the specified application version by moving it to the PROD stage.
Since: AppTrust 1.16.4
Usage: POST https://{{artifactory-host}}/apptrust/api/v1/applications/{{application_key}}/versions/{{version}}/release
Query Parameters (optional):
Parameter | Type | Description |
|---|---|---|
| boolean | Determines whether the operation should be asynchronous ( The default value is |
Request Body:
Parameter | Type | Description |
|---|---|---|
| string | The type of release to perform:
|
| array:string | Use this option to include only the specified repository keys in the promotion. |
| array:string | Use this option to exclude the specified repository keys from the promotion. |
| array:string | Key-value pairs that define properties to add to each promoted artifact on top of any existing properties. NoteIf a property with the same key already exists on the artifact, the value defined in |
Consumes: application/json
Response Body:
Parameter | Type | Description |
|---|---|---|
| string | The unique application key. |
| string | The application version identifier. |
| string | The source stage from which the application version was promoted. |
| string | The outcome of the request (for example, success). |
| string | A human-readable summary of the outcome. |
| array:string | Repository keys that were specifically included in the promotion. |
| array:string | Repository keys that were specifically excluded from the promotion. |
| array:string | Key-value pairs that were added as properties to the application version. |
| string | Timestamp of when the version was promoted (ISO 8601 standard). |
| object | Contains the results of policy evaluations performed at the source and release stage gates. |
| object | The evaluation result at the exit gate of the source stage. |
| string | The unique ID of the evaluation. |
| string | The name of the source stage. |
| string | The status of the evaluation at the source stage exit gate ( |
| string | The summary of the exit gate evaluation outcome (omitted if the decision is |
| object | The evaluation result at the entry gate of the target stage. |
| string | The unique ID of the evaluation. |
| string | The name of the target stage. |
| string | The status of the evaluation at the release gate ( |
| string | The summary of the release gate evaluation outcome (omitted if the decision is |
Sample Request:
POST 'https://{host}.jfrog.io/apptrust/api/v1/applications/my-web-app/versions/1.2.0/release
Content-Type: application/json
Authorization: ••••••
{
"promotion_type": "copy",
"included_repository_keys": [
"docker-prod-local"
],
"artifact_additional_properties": {
"release.status": "approved",
"promoted.by": "jane.doe"
}
}
Sample Response (success):
{
"application_key": "my-web-app",
"version": "1.2.0",
"source_stage": "staging",
"promotion_type": "copy",
"status": "success",
"message": "Releasing version using Copy from 'staging' was successful.",
"included_repository_keys": [
"docker-prod-local"
],
"excluded_repository_keys": [],
"artifact_additional_properties": {
"release.status": "approved",
"promoted.by": "jane.doe"
},
"created": "2023-10-27T10:00:00Z",
"evaluations": {
"exit_gate": {
"eval_id": "eval_src_1698399600",
"stage": "staging",
"decision": "pass"
},
"release_gate": {
"eval_id": "eval_tgt_1698399605",
"stage": "PROD",
"decision": "pass"
}
}
}
Sample Response (failure):
{
"message": "Releasing using copy promotion from 'staging' failed due to policy violations.",
"promotion_type": "copy",
"details": [
{
"gate": "exit_gate",
"eval_id": "eval_src_1698399799",
"status": "passed",
"failed_policies": []
},
{
"gate": "release_gate",
"eval_id": "eval_tgt_1698399800",
"status": "failed",
"failed_policies": [
{
"policy_name": "Block Critical Vulnerabilities",
"reason": "Artifact 'my-web-app:1.2.1/service.jar' contains 3 critical vulnerabilities."
}
]
}
]
}
Status Codes:
Code | Description |
|---|---|
200 | Promoted (synchronous) |
202 | Promoted (asynchronous) |
400 | Bad Request |
401 | Bad Credentials |
403 | Permission Denied |
404 | Not Found |