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 |
---|---|---|
| string | The complete path of the artifact to search for. ImportantThe request must contain either the |
| string | The SHA-256 checksum of the artifact. ImportantThe request must contain either the |
| string | [optional] Defines the project associated with the Release Bundles. If this parameter is not specified, the default global project is assumed. |
| string | Defines where to search for the artifact:
If this parameter is not specified, both source and target Release Bundle versions are searched. |
| string | [optional] Defines the criterion by which to order the returned records: The default is |
| boolean | [optional] Defines whether to list the Release Bundle versions in ascending (true) or descending (false) order. The default value is |
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 |
---|---|
| The Release Bundle name. |
| The Release Bundle version. |
| The origin of the Release Bundle version:
|
| The project associated with the Release Bundle. When the origin is |
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": [] }