Distribute by Last Days

JFrog REST APIs

Content Type
REST API

Description: Redistributes all Release Bundle versions (v1 and v2) within a defined time period to a specified Edge node. This endpoint is useful, for example, for resending Release Bundles to an Edge node that was offline for a period of time.

Warning

Be cautious when using this endpoint, as it can result in heavy data transfers that can take time to complete.

Since: 2.33.0

Security: Admin only

Usage: POST /distribution/api/v1/maintenance/distributeByLastDays

Request Body:

Paramater

Required/Optional

Type

Description

edge_name

required

string

The name of the Edge node to which to redistribute the Release Bundle versions.

last_number_of_days

required

integer

The number of days prior to the defined date (see below) to include in the redistribution.

The default maximum is 7 days.

Note

The default can be changed using the max-days-allowed-to-redistribute property in the Distribution Application Config YAML. Bear in mind that increasing the maximum beyond the default can result in a heavy load on the system.Distribution Application Config YAML File

date

required

string

The cutoff date of Release Bundle versions to redistribute (using the format yyyy-mm-dd).

To take an example:

  • last_number_of_days is set to 3

  • date is set to 2025-07-05

In this example, all Release Bundle distributions to the defined target (as defined in the distribution_rules) between midnight on July 2nd, 2025 and midnight on July 5th, 2025 will be redistributed to the defined target.

auto_create_missing_repositories

optional

boolean

Determines whether to create missing repositories automatically on the distribution targets.

The default value is false, which means that if a missing repository is encountered in a particular target, the distribution to that target will fail.

Consumes: application/json

Response Body:

Parameter

Type

Description

total_triggered

integer

The total number of Release Bundle versions that were redistributed.

triggered

string

The list of Release Bundle versions that were redistributed to the specified distribution target (Edge node).

Produces: application/json

Sample Request:

{
    "edge_name": "edge1",
    "last_number_of_days": 3,
    "date": "2025-07-05",
    "auto_create_missing_repositories": false
}

Sample Response:

{
    "total_triggered": 10,
    "triggered": [
        "release-bundles-v2/RBv2-2-163930-698/v5-163930-698",
        "release-bundles-v2/RBv2-1-191120-561/v2-191120-561",
        "release-bundles/BD-163642-308/1.0.0",
        "release-bundles-v2/RBv2-192647-297/1.0.0",
        "release-bundles/BD-173123-741/1",
        "release-bundles/BD-173123-741/2",
        "release-bundles/BD-173106-177/1",
        "release-bundles-v2/RBv2-1-163930-698/v1-163930-698",
        "release-bundles-v2/RBv2-165326-031/v-165326-033",
        "release-bundles/BD-171717-820/1.0.0"
    ]
}

Status Codes:

Code

Description

200

Success

400

Bad Request

404

Not Found