Get Release Bundle v2 Versions in a Specific Environment

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Returns a list of all versions of every Release Bundle v2 located in a specified environment.Environments

Since: 7.107.1

Security: Requires Read permissions to the target Release Bundle path.

Usage:GET  /lifecycle/api/v2/promotion/release-bundles-by-environment/{{environment}}

Path Parameter (mandatory):

Parameter

Type

Description

environment

string

The name of the environment.

Query Parameters (optional):

Parameter

Type

Description

offset

integer

Sets the number of records to skip before returning the query response. Used for pagination purposes.

limit

integer

Sets the maximum number of versions to return at one time. Used for pagination purposes.

order_by

string

Defines the criterion by which to order the list of Release Bundle versions: created, created_by, release_bundle_name, release_bundle_version, environment

order_asc

boolean

Defines whether to list the promotions in ascending (true) or descending (false) order.

The default value is false.

Note

See Common Optional Query Parameters for additional query parameters that are available for all Release Lifecycle Management APIs.

Sample Request:

curl --location --request GET 'http://localhost:8082/lifecycle/api/v2/promotion/release-bundles-by-environment/DEV?limit=10&offset=0&order_by=release_bundle_name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' \

Sample Response:

{
    "promotions": [
        {
            "repository_key": "release-bundles-v2",
            "release_bundle_name": "RC-bundle",
            "release_bundle_version": "1.0.0",
            "environment": "QA",
            "created": "2025-01-23T11:39:04.815Z",
            "created_millis": 1737632344815,
            "created_by": "admin",
            "project_key": "default"
        },
        {
            "repository_key": "release-bundles-v2",
            "release_bundle_name": "Commons-Bundle",
            "release_bundle_version": "1.0.7",
            "environment": "QA",
            "created": "2025-01-23T11:38:54.499Z",
            "created_millis": 1737632334499,
            "created_by": "admin",
            "project_key": "default"
        },
        {
            "repository_key": "release-bundles-v2",
            "release_bundle_name": "Commons-Bundle",
            "release_bundle_version": "1.0.8",
            "environment": "QA",
            "created": "2025-01-23T11:38:51.276Z",
            "created_millis": 1737632331276,
            "created_by": "admin",
            "project_key": "default"
        }
    ],
    "offset": 3
}

The response includes the following information:

Property

Description

repository_key

The repository that contains the Release Bundle version. The default value is release-bundles-v2. If a project was specified, the name of the project is appended to the beginning of the repository name.

release_bundle_name

The Release Bundle name.

release_bundle_version

The Release Bundle version.

environment

The target environment to which the Release Bundle version was promoted.

created

The timestamp of the promotion (ISO 8601 standard).

created_millis

The timestamp of the promotion in milliseconds.

created_by

The name of the user who initiated the promotion operation.

Note

Names longer than 64 characters will appear truncated.

project_key

The project associated with the Release Bundle version.

Status Codes:

Code

Description

200

Submitted (asynchronous)

401

Bad Credentials

403

Permission Denied

404

Not Found (repository/build)