Federated Repository Full Sync

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Runs a full synchronization between the Federated repository members.

Note

Starting with Artifactory 7.104.2, there is an option to use the Federation Comparison tool, which uses the isDry query parameter to generate a JSON file listing the binaries requiring synchronization without carrying out the operation. This option requires the Artifactory Federation Service to be installed.Use the Federation Comparison ToolArtifactory Federation Service

Since: 7.18.3

Security: Requires an admin user

Usage: POST /api/federation/fullSync/{localRepoName}[?mirror={mirror_url}&isDry=false]

Query Parameters (optional):

Field

Type

Description

mirror

string

The URL of the specific Federation member on which you want to run the Full Sync.

If this parameter is not set, the Full Sync is run against all remote Federation members.

isDry

boolean

When set to true, runs the Federation Comparison tool to determine which files on the local member are missing on the remote members.

When mirror is set, the comparison is performed against that remote member only.

The default value is false.

Sample Usage:

curl -X POST "https://<your-artifactory-instance>/api/federation/fullSync/testDryFullSyncRepo?mirror=https://mirror-instance/artifactory/my-repo" \
     -H "Authorization: Bearer <your-token>" \
     -H "Content-Type: application/json"

Sample Usage (dry run):

curl -X POST "https://<your-artifactory-instance>/api/federation/fullSync/testDryFullSyncRepo?mirror=https://mirror-instance/artifactory/my-repo&isDry=true" \
     -H "Authorization: Bearer <your-token>" \
     -H "Content-Type: application/json"

Produces: application/json

Sample Output:

Example: Syncs all Federated repositories in the Federation

POST /api/federation/fullSync/generic-repo  

Full sync triggered successfully 

Example: Syncs only specific Federated repositories

POST /api/federation/fullSync/generic-repo?mirror=http://localhost:8081/artifactory/generic-repo2   

Full sync triggered successfully

Example: Full Sync Dry Run

{
  "message": "Dry full sync completed successfully.",
  "resultPaths": [
    "jfrog-full-sync-info/comparison-results/testDryFullSyncRepo-mirror-comparison-2025-02-04.json"
  ]
}

Example of retrieved contents of dry run report (stored in jfrog-full-sync-info system repository)

{
  "results": [
    {
      "name": "testDryFullSyncFile_1.txt",
      "type": "file",
      "fullPath": "folder/testDryFullSyncFile_1.txt"
    },
    {
      "name": "testDryFullSyncFile_2.txt",
      "type": "file",
      "fullPath": "folder/testDryFullSyncFile_2.txt"
    }
  ]
}