Export Repository with Metadata

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Export repository with its metadata.

Since: 2.2.2

Security: Requires a valid admin user

Usage: curl -X POST -u admin:<password> http://localhost:8082/artifactory/api/artifactexport/repository

Consumes: application/json

Produces: text/plain

Sample Usage:

curl -X POST -u admin:<password> http://localhost:8082/artifactory/api/artifactexport/repository \
-H "Content-Type: application/json" \
-d '{
  "action": "repository",
  "path": "/path/to/export/location", # The location on the artifactory server where the repository will be exported to
  "repository": "repo-local", # the repository you want to export
  "excludeMetadata": false, # false: includes metadata, true: excludes metadata
  "m2": true,  #This parameter is specific to Maven repositories and indicates whether the output should be formatted for Maven 2. Setting it to true adjusts the export to be compatible with Maven 2 expectations.
  "verbose": true
}'

This command creates two directories:

  • Repository Data Directory: Contains the exported data

  • Metadata Directory: Contains the associated metadata

Note

This export API does not adhere to the same structure as the import command (/artifactory/api/import/repositories).