Roll Back Application Version Promotion

JFrog REST APIs

Content Type
REST API

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

async

boolean

Determines whether the operation should be asynchronous (true) or synchronous (false).

The default value is false, which means that Artifactory waits for application version promotion to complete before allowing you to move on to the next task.

Request Body:

Parameter

Required/Optional

Type

Description

from_stage

required

string

The name of the stage from which to roll back the application version.

Note

This 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

application_key

string

The unique application key.

version

string

The application version identifier.

project

string

The project to which the application belongs.

rollback_from_stage

string

The source stage from which the application version was rolled back.

rollback_to_stage

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