Description: Distributes a Release Bundle v2 version.
Since: 7.63.2 (Artifactory), 2.19.1 (Distribution)
Security: Requires permissions to distribute Release Bundles; requires destination permissions to the target Release Bundle path.
Usage:POST /lifecycle/api/v2/distribution/distribute/{release_bundle_name}/{release_bundle_version}
Query Parameters (optional): repository_key
, project
. See Common Optional Query Parameters.
Important
If the Release Bundle v2 version belongs to a specific project, you must specify either the repository_key
or the project
. The repository_key
refers to the system repository that contains the Release Bundles related to the project (<project_key>-release_bundles-v2
).
Consumes: application/json
Sample Request:
http://localhost:8082/lifecycle/api/v2/distribution/distribute/bundleName/1.0.0?repository_key=release-bundles-v2 { "auto_create_missing_repositories": "false", "distribution_rules": [ { "site_name": "*" } ], "modifications": { "default_path_mapping_by_last_promotion": false, "mappings": [ { "input": "(.*)/(.*)", "output": "$1/mapping/$2" } ] } }
The request includes the following information:
Property | Description |
---|---|
| Determines whether to create missing repositories automatically on the distribution targets. The default value is NoteIn Distribution versions prior to 2.19.0, the option to create missing repositories automatically could not work together with path mappings (defined under Starting with 2.19.0, the default setting of this parameter has changed to If you want to prevent missing repositories from being created automatically when path mappings are defined, change the setting of |
| Defines which distribution targets to include when distributing the Release Bundle. |
| (Optional) Specifies the path mapping for the artifacts on the distribution targets in the form of input and output regex mapping pairs. These mapping pairs define where the queried artifact is located and where it should be placed. Use this option if the path on the target is different than the source path. |
| NoteRequires Distribution 2.26.1 or higher. When this property is not set, the default path mapping is determined by the When this property is set, this setting overrides the configuration property in the Distribution Application Config YAML file:
NoteSetting this property to |
| Defines the input and output regex mapping pairs. WarningDo not configure mappings when |
Sample Response:
{ "id": 721286369066762240, "sites": [ { "name": "infra-dist-yevdoa-08244892-edge-2", "service_id": "jfrt@01h2wh4psm4mhf04w2n00p0rp4", "type": "artifactory" }, { "name": "HOME", "service_id": "jfrt@01h2wgyv4wn0c40jbv881c0www", "type": "artifactory" }, { "name": "infra-dist-yevdoa-08244892-edge-1", "service_id": "jfrt@01h2wh54qwn5rk1wp2rfzh032n", "type": "artifactory" }, { "name": "infra-dist-yevdoa-08244892-edge-0", "service_id": "jfrt@01h2wh9ebwyw5v01nanend06zf", "type": "artifactory" } ] }
The response includes the following information:
Property | Description |
---|---|
| The ID number of the distribution operation. |
| The |
| The name of Edge node serving as the destination target for the distributed Release Bundle. |
| The unique identifier of the Artifactory instance where the Release Bundle was distributed. |
| The destination target device type (e.g. Artifactory). |
Status Codes:
Code | Description |
---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
409 | Already Exists |