Get Release Bundle v2 Versions with a Specific Artifact

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Returns a list of Release Bundle v2 versions that contain the specified artifact.

Since: 7.107.1

Security: Requires Read permissions to Release Bundle paths. Forbidden Release Bundles are excluded from the results.

Usage: GET /lifecycle/api/v2/release_bundle/search-by-artifact?{artifact_path}&{sha256}

Query Parameters (optional):

Field

Type

Description

artifact_path

string

The complete path of the artifact to search for.

Important

The request must contain either the artifact_path, the sha256, or both.

sha256

string

The SHA-256 checksum of the artifact.

Important

The request must contain either the artifact_path, the sha256, or both.

project

string

[optional] Defines the project associated with the Release Bundles. If this parameter is not specified, the default global project is assumed.Projects

origin

string

Defines where to search for the artifact:

  • source: Searches the Release Bundle versions that have been created on this device.

  • target: Searches the Release Bundle versions that have been received by this device when acting as a destination target. For example, this option enables you to search for Release Bundle versions received by an Edge node.

If this parameter is not specified, both source and target Release Bundle versions are searched.

order_by

string

[optional] Defines the criterion by which to order the returned records: release_bundle_name, release_bundle_version

The default is release_bundle_name.

order_asc {true|false}

boolean

[optional] Defines whether to list the Release Bundle versions in ascending (true) or descending (false) order.

The default value is true.

Sample Request (sha256 defined):

curl  http://localhost:8082/lifecycle/api/v2/release_bundle/search-by-artifact?sha256=ddf2f7b01600275ab94084db143d4f14b9d73f224b0f35a8f93d378138c60ff6&origin=target --header 'Authorization: Bearer ***********'

Sample Request (artifact_path defined):

curl --location 'http://{artifactory_url}/lifecycle/api/v2/release_bundle/search-by-artifact?artifact_path=commons-1.0.0.txt' \
--header 'Authorization: Bearer ***********'

Sample Response:

{
    "release_bundles": [
        {
            "repository_key": "release-bundles-v2",
            "release_bundle_name": "rb1",
            "release_bundle_version": "1.0.0",
            "origin": "source"
            "project_key": "default"
        },
        {
            "repository_key": "release-bundles-v2",
            "release_bundle_name": "rb2",
            "release_bundle_version": "1.0.2",
            "origin": "source"
            "project_key": "default"
        },
        {
            "repository_key": "release-bundles-v2",
            "release_bundle_name": "rb3",
            "release_bundle_version": "1.0.1",
            "origin": "target"
            "source_project_key": "default"
        }
    ],
}

The response includes the following information:

Property

Description

release_bundle_name

The Release Bundle name.

release_bundle_version

The Release Bundle version.

origin

The origin of the Release Bundle version:

  • source: Release Bundle versions that have been created on this device.

  • target: Release Bundle versions that have been received by this device when acting as a destination target (for example, and Edge node).

project_key

source_project_key

The project associated with the Release Bundle. When the origin is target, the API returns the project key associated with the Release Bundle version at its source.

Note

The response is limited to a maximum of 1000 records.

Status Codes:

Code

Description

200

Fetched

400

Bad Request (no criteria specified)

403

Permission Denied

Note

This API returns 200 with an empty body, if:

  • The artifact isn't a part of any Release Bundle v2 version.

  • The user does not have permission to see the relevant Release Bundle v2 version.

{
    "release_bundles": []
}