---
updatedAt: 2026-08-05T12:31:19.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/artifactory/llms.txt
---

# Distribute by Last Days

Redistributes all release bundles that were distributed within a specified time window to a target edge node.
The time window is defined by a date and a number of days to look back from that date.
For example, specifying `date: "2025-03-11"` and `lastNumberOfDays: 7` will redistribute all release bundles
that were distributed in the 7-day window ending on March 11, 2025.

The `lastNumberOfDays` value must be between 1 and the configured maximum (default: 7).

Requires admin permissions.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "JFrog Distribution API",
    "description": "REST API for JFrog Distribution - manages distribution of release bundles to edge nodes. Supports both Release Bundles V1 and V2 workflows including distribution, remote deletion, air-gap export, signing key management, and distribution tracking.",
    "version": "1.0.0",
    "contact": {
      "name": "JFrog Support"
    }
  },
  "servers": [
    {
      "url": "https://{jfrog_url}/distribution/api",
      "description": "JFrog Platform",
      "variables": {
        "jfrog_url": {
          "default": "myserver.jfrog.io",
          "description": "Your JFrog Platform hostname (e.g., mycompany.jfrog.io)"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Maintenance",
      "description": "Maintenance operations including redistribution of release bundles to edge nodes"
    }
  ],
  "paths": {
    "/v1/maintenance/distributeByLastDays": {
      "post": {
        "tags": [
          "Maintenance"
        ],
        "summary": "Distribute by Last Days",
        "description": "Redistributes all release bundles that were distributed within a specified time window to a target edge node.\nThe time window is defined by a date and a number of days to look back from that date.\nFor example, specifying `date: \"2025-03-11\"` and `lastNumberOfDays: 7` will redistribute all release bundles\nthat were distributed in the 7-day window ending on March 11, 2025.\n\nThe `lastNumberOfDays` value must be between 1 and the configured maximum (default: 7).\n\nRequires admin permissions.\n",
        "operationId": "distributeByLastDays",
        "requestBody": {
          "required": true,
          "description": "Configuration for the time-based redistribution",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DistributeByLastDaysRequest"
              },
              "examples": {
                "redistributeLastWeek": {
                  "summary": "Redistribute last 7 days to an edge node",
                  "value": {
                    "date": "2025-03-11",
                    "lastNumberOfDays": 7,
                    "edgeName": "edge-node-1",
                    "autoCreateMissingRepositories": true
                  }
                },
                "redistributeLastDay": {
                  "summary": "Redistribute last day to an edge node",
                  "value": {
                    "date": "2025-03-11",
                    "lastNumberOfDays": 1,
                    "edgeName": "edge-node-1",
                    "autoCreateMissingRepositories": false
                  }
                },
                "redistributeWithPriority": {
                  "summary": "Redistribute with explicit priority",
                  "value": {
                    "date": "2025-03-11",
                    "lastNumberOfDays": 7,
                    "edgeName": "edge-node-1",
                    "autoCreateMissingRepositories": true,
                    "priority": "low"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success - Redistribution triggered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DistributeByLastDaysResponse"
                },
                "example": {
                  "totalTriggered": 3,
                  "triggered": [
                    "release-bundles-v2/my-bundle/1.0.0",
                    "release-bundles-v2/my-bundle/1.1.0",
                    "release-bundles-v2/another-bundle/2.0.0"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid date format, lastNumberOfDays out of range, or edge node not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Bad Credentials - The provided authentication is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied - Admin permission required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "detail": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "status_code": {
            "type": "integer"
          }
        }
      },
      "DistributionPriorityLevel": {
        "type": "string",
        "description": "Distribution scheduling priority. Higher priority work is handled before lower priority work.",
        "enum": [
          "low",
          "medium",
          "high"
        ],
        "default": "medium"
      },
      "DistributeByLastDaysRequest": {
        "type": "object",
        "description": "Request model for redistributing release bundles from a time window to a target edge node",
        "required": [
          "date",
          "lastNumberOfDays",
          "edgeName"
        ],
        "properties": {
          "date": {
            "type": "string",
            "description": "End date for the time window in YYYY-MM-DD format",
            "example": "2025-03-11"
          },
          "lastNumberOfDays": {
            "type": "integer",
            "description": "Number of days to look back from the specified date. Must be between 1 and the configured maximum (default: 7).",
            "minimum": 1,
            "example": 7
          },
          "edgeName": {
            "type": "string",
            "description": "Name of the target edge node to redistribute the release bundles to",
            "example": "edge-node-1"
          },
          "autoCreateMissingRepositories": {
            "type": "boolean",
            "description": "Whether to automatically create missing repositories on the target edge node",
            "default": false
          },
          "priority": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DistributionPriorityLevel"
              }
            ],
            "description": "Base priority applied to redistributions triggered by this maintenance request.\nDefaults to `low` when omitted.\n"
          }
        }
      },
      "DistributeByLastDaysResponse": {
        "type": "object",
        "description": "Response from the distribute by last days operation",
        "properties": {
          "totalTriggered": {
            "type": "integer",
            "description": "Total number of release bundles triggered for redistribution",
            "example": 3
          },
          "triggered": {
            "type": "array",
            "description": "Identifiers of the release bundles that were triggered for redistribution (format repository/name/version)",
            "items": {
              "type": "string"
            },
            "uniqueItems": true,
            "example": [
              "release-bundles-v2/my-bundle/1.0.0",
              "release-bundles-v2/my-bundle/1.1.0"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    },
    {
      "BearerAuth": []
    }
  ]
}
```