Description: Rolls back the latest promotion of the specified application version to its previous stage. This action removes the promotion record, but the audit log will retain a history of the rollback. The behavior of the rollback on the artifacts in the application version depends on the original promotion type:
Copy promotion: Artifacts in the current stage's repositories are deleted.
Move promotion: Artifacts are removed from the current stage's repositories and restored to the previous stage's repositories from a secure internal repository.
Note
Rollback can be performed from the PROD stage, if needed.
Since: AppTrust 1.16.4
Usage: POST https://{{artifactory-host}}/apptrust/api/v1/applications/{{application_key}}/versions/{{version}}/rollback
Query Parameters (optional):
Parameter | Type | Description |
|---|---|---|
| boolean | Determines whether the operation should be asynchronous ( The default value is |
Request Body:
Parameter | Required/Optional | Type | Description |
|---|---|---|---|
| required | string | The name of the stage from which to roll back the application version. NoteThis parameter acts as a safety check to ensure the rollback targets the correct stage. The request will fail if this value does not match the current stage. |
Consumes: application/json
Response Body:
Parameter | Type | Description |
|---|---|---|
| string | The unique application key. |
| string | The application version identifier. |
| string | The project to which the application belongs. |
| string | The source stage from which the application version was rolled back. |
| string | The target stage to which the application version was rolled back. |
Sample Request:
POST 'https://{host}.jfrog.io/apptrust/api/v1/applications/video-encoder/versions/1.5.0/rollback
Content-Type: application/json
Authorization: ••••••
{
"from_stage": "qa"
}Sample Response (success):
{
"application_key": "video-encoder",
"version": "1.5.0",
"project_key": "MEDIA-PROJ",
"rollback_from_stage": "qa",
"rollback_to_stage": "dev"
}
Status Codes:
Code | Description |
|---|---|
200 | Ok (synchronous) |
202 | Ok (asynchronous) |
400 | Bad Request |
401 | Bad Credentials |
403 | Permission Denied |
404 | Not Found |