Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >







Usage

Important

With the release of Artifactory 7.49.3, the REST APIs for all JFrog Platform functions - APIs that are not specific to Artifactory - have been moved to a dedicated page, JFrog Platform REST API

These include the following sections:

The Platform API page also contains the new Security REST APIs, which will eventually replace the ARTIFACTORY SECURITY APIs

Artifactory REST API endpoints can be invoked in any of the standard ways to invoke a RESTful API. This section describes how to use the Artifactory REST API using cURL as an example.


Using and Configuring cURL

/repo-key/path/to/artifact.ext

You can download cURL  here . Learn how to use and configure cURL  here .

Authentication

Artifactory's REST API supports these forms of authentication:

  • Basic authentication using your username and password
  • Using an access token instead of a password for basic authentication

  • Using an access token as a bearer token in an authorization header ( Authorization: Bearer) with your access token
  • Basic authentication using your username and API Key (note that the API Key is being deprecated)

  • Using a dedicated header (X-JFrog-Art-Api) with your API Key (note that the API Key is being deprecated)

Artifactory version

To use your API key for Basic Authentication, it must be generated using Artifactory 4.4.3 or later. If generated on a previous version, you must regenerate your API key and use the new key as a password for basic authentication.

Note that from Artifactory 7.47.x, the API Key is being deprecated.

Using JFrog CLI

JFrog CLI is a compact and smart client that provides a simple interface to automate access to Artifactory. As a wrapper to the REST API, it offers a way to simplify automation scripts making them more readable and easier to maintain, features such as parallel uploads and downloads, checksum optimization and wildcards/regular expressions make your scripts more efficient and reliable. Please note that several of the functions available through the REST API are also available through JFrog CLI and you should consider which method best meets your needs.

For more details on download, installation and usage of JFrog CLI, please refer to the JFrog CLI User Guide.

Updating Artifactory System Configuration Files

Artifactory provides a flexible way to configure an existing Artifactory instance using a simple YAML configuration file. Run single or multiple configuration changes as needed, to create, update, and delete any elements in Artifactory. For more information, see Artifactory YAML Configuration.

Base URL

The Platform REST URL is constructed of: 

<JFrog URL>/<Service Context>/

For example

# Using your JFrog URL 
http://myjfrog.acme.org/artifactory/

# Using your Artifactory server hostname and port
http://ARTIFACTORY_SERVER_HOSTNAME:8081/artifactory/

Example - Deploying an Artifact

The example below demonstrates how to invoke the Deploy Artifact REST API.

  • You are using cURL from the unix command line, and are presently working from the home (~) directory of the user 'myUser'
  • You wish to deploy the file ' myNewFile.txt ', which is located in your Desktop directory, (' ~/Desktop/myNewFile.txt ')
  • You have Artifactory running on your local system, on port 8081
  • You wish to deploy the artifact into the 'my-repository' repository, under the ' my/new/artifact/directory/ ' folder structure, and wish to store the file there as ' file.txt '
  • You have configured a user in Artifactory named 'myUser', with password 'myP455w0rd!', and this user has permissions to deploy artifacts
  • Your API Key is ' ABcdEF '
  • Where possible, the same example is demonstrated using JFrog CLI

To deploy the file using your username and password for authentication, you would use the following command:

Using cURL with the REST API
curl -u myUser:myP455w0rd! -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt
Using JFrog CLI
jfrog rt u file.txt my-repository/my/new/artifact/directory/ --user=myUser --password=myP455w0rd!


To deploy the file using your API Key for basic authentication, you would use the following command:

Using cURL with the REST API
curl -u myUser:ABcdEF -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt
Using JFrog CLI
jfrog rt u file.txt my-repository/my/new/artifact/directory/ --apiKey=ABcdEF


To deploy the file using your API Key in a header, you would use the following command:

Using cURL with the REST API
curl -H "X-JFrog-Art-Api:ABcdEF" -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt


To deploy the file using your access token for basic authentication, you would use the following command:

Using cURL with an access token
curl -u myUser:<Token> -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt


To deploy the file using your access token in a header, you would use the following command:

Using cURL with an access token
curl -H "Authorization: Bearer <Token>" -X PUT "http://localhost:8081/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt

Working with Artifactory Cloud

JFrog Artifactory Cloud offers the same extensive functionality and capabilities for automation as an on-prem installation, including authentication, use of JFrog CLI and the REST API endpoints.

As a Cloud service, the URL is different from an on-prem installation and the REST API endpoints can be reached at:

https://<Server Name>.jfrog.io/artifactory/


Example

The snippets below apply the same example described above to an Artifactory Cloud instance named "myArtifactoryCloud" (instead of to an on-prem installation).

To deploy the file using your username and password for authentication, you would use the following command:

Using cURL with the REST API for Artifactory Cloud
curl -u myUser:myP455w0rd! -X PUT "https://myartifactorycloud.jfrog.io/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt
Using JFrog CLI
jfrog rt u file.txt my-repository/my/new/artifact/directory/ --user=myUser --password=myP455w0rd!

Note that using JFrog CLI is identical with an Artifactory Cloud instance. You only need to configure JFrog CLI with the correct URL for your instance. 

REST Resources

The sections below provide a comprehensive listing of the REST resources exposed by Artifactory.

For details on handling errors please refer to ERROR RESPONSES below.

Usage of REST resources is subject to security restrictions applicable to each individual resource.



BUILDS

All Builds

Description: Provides information on all builds
Since: 2.2.0
Security: Requires a privileged user (can be anonymous). From version 6.6, requires read permission for the build or  basic read .
Usage: GET /api/build
Produces: application/json (application/vnd.org.jfrog.build.Builds+json)
Sample Output:

GET /api/build?project='projectKey'

{
    "uri": "http://localhost:8081/artifactory/api/build"
    "builds" : [
    {
        "uri" : "/my-build",
        "lastStarted" : ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ)
    },
    {
        "uri" : "/jackrabbit",
        "lastStarted" : ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ)
    }
]
}



Build Runs

Description: Build Runs
Since: 2.2.0
Security: Requires a privileged user (can be anonymous). From version 6.6, requires read permission for the build or  basic read .
Usage: GET /api/build/{buildName}
Produces: application/json (application/vnd.org.jfrog.build.BuildsByName+json)
Sample Output:

GET /api/build/my-build?project='projectKey'
{
    "uri": "http://localhost:8081/artifactory/api/build/my-build"
    "buildsNumbers" : [
    {
        "uri" : "/51",
        "started" : ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ)
    },
    {
        "uri" : "/52",
        "started" : ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ)
    }
]
}

Build Upload

Description: Upload Build
Security: Requires a privileged user. From version 6.6, requires deploy permission for the build, and delete permission for overriding existing build info artifact.
Notes: 

  • All build modules must have the  build.name  and build.number properties set as well as the correct SHA1 and MD5 in order to be properly linked in the build info.
  • The  ?project=<project> parameter applies to the Projects feature and is optional.

Usage: PUT /api/build?project=<project> -H "Content-Type: application/json" --upload-file build.json  
Consumes: application/json (application/vnd.org.jfrog.build.BuildsByName+json)
Example: curl -X PUT "http://localhost:8081/artifactory/api/build?project=projectKey" -H "Content-Type: application/json" --upload-file build.json
Sample format: 

{
  "properties" : {
   /* Environment variables and properties collected from the CI server.
      The "buildInfo.env." prefix is added to environment variables and build related properties.
      For system variables there's no prefix. */
   "buildInfo.env.JAVA_HOME" : "",
   ...
  },
+  "version" : "1.0.1", // Build Info schema version
+  "name" : "My-build-name", // Build name
+  "number" : "28", // Build number
-  "type" : "MAVEN", // Build type (values currently supported: MAVEN, GRADLE, ANT, IVY and GENERIC)
-  "buildAgent" : { // Build tool information
-    "name" : "Maven", // Build tool type
-    "version" : "3.0.5" // Build tool version
  },
- "agent" : { // CI Server information
-   "name" : "Jenkins", // CI server type
-   "version" : "1.554.2" // CI server version
   },
+  "started" : "2014-09-30T12:00:19.893+0300", // Build start time in the format of yyyy-MM-dd'T'HH:mm:ss.SSSZ
-  "artifactoryPluginVersion" : "2.3.1",
-  "durationMillis" : 9762, // Build duration in milliseconds
-  "artifactoryPrincipal" : "james", // Artifactory principal (the Artifactory user used for deployment)
-  "url" : "http://my-ci-server/jenkins/job/My-project-name/28/", // CI server URL
-  "vcsRevision" : "e4ab2e493afd369ae7bdc90d69c912e8346a3463", // VCS revision
-  "vcsUrl" : "https://github.com/github-user/my-project.git", // VCS URL
-  "licenseControl" : {  // Artifactory License Control information
-   "runChecks" : true, // Artifactory will run automatic license scanning after the build is complete (true/false)
-   "includePublishedArtifacts" : true, // Should Artifactory run license checks on the build artifacts, in addition to the build dependecies (true/false) 
-   "autoDiscover" : true, // Should Artifactory auto discover licenses (true/false)
-   "scopesList" : "", // A space-separated list of dependency scopes/configurations to run license violation checks on. If left empty all dependencies from all scopes will be checked.
-   "licenseViolationsRecipientsList" : "" // Emails of recipients that should be notified of license violations in the build info (space-separated list)
  },
-  "buildRetention" : { // Build retention information
-  "deleteBuildArtifacts" : true, // Automatically remove build artifacts stored in Artifactory (true/false)
-   "count" : 100, // The maximum number of builds to store in Artifactory.
-   "minimumBuildDate" : 1407345768020, // Earliest build date to store in Artifactory
-   "buildNumbersNotToBeDiscarded" : [ ] // List of build numbers that should not be removed from Artifactory
  },
  /* List of build modules */   
-  "modules" : [ { // The build's first module
-    "properties" : { // Module properties
-      "project.build.sourceEncoding" : "UTF-8"
    },
-   "id" : "org.jfrog.test:multi2:4.2-SNAPSHOT", // Module ID
-   /* List of module artifacts */
    "artifacts" : [ {
-     "type" : "jar",
-     "sha1" : "2ed52ad1d864aec00d7a2394e99b3abca6d16639",
-     "md5" : "844920070d81271b69579e17ddc6715c",
-     "name" : "multi2-4.2-SNAPSHOT.jar"
    }, {
-     "type" : "pom",
-     "sha1" : "e8e9c7d790191f4a3df3a82314ac590f45c86e31",
-     "md5" : "1f027d857ff522286a82107be9e807cd",
-     "name" : "multi2-4.2-SNAPSHOT.pom"
    } ],
    /* List of module dependencies */
    "dependencies" : [ {
-    "type" : "jar",
-    "sha1" : "99129f16442844f6a4a11ae22fbbee40b14d774f",
-    "md5" : "1f40fb782a4f2cf78f161d32670f7a3a",
-    "id" : "junit:junit:3.8.1",
-    "scopes" : [ "test" ]
    } ]
  }, { // The build's second module
    "properties" : { // Module properties
      "project.build.sourceEncoding" : "UTF-8"
    },
    "id" : "org.jfrog.test:multi3:4.2-SNAPSHOT", // Module ID
    /* List of module artifacts */  
    "artifacts" : [ { // Module artifacts
-     "type" : "war",
-     "sha1" : "df8e7d7b94d5ec9db3bfc92e945c7ff4e2391c7c",
-     "md5" : "423c24f4c6e259f2774921b9d874a649",
-     "name" : "multi3-4.2-SNAPSHOT.war"
    }, {
-     "type" : "pom",
-     "sha1" : "656330c5045130f214f954643fdc4b677f4cf7aa",
-     "md5" : "b0afa67a9089b6f71b3c39043b18b2fc",
-     "name" : "multi3-4.2-SNAPSHOT.pom"
   } ],
    /* List of module dependencies */
    "dependencies" : [ {
-     "type" : "jar",
-    "sha1" : "a8762d07e76cfde2395257a5da47ba7c1dbd3dce",
-     "md5" : "b6a50c8a15ece8753e37cbe5700bf84f",
-    "id" : "commons-io:commons-io:1.4",
-     "scopes" : [ "compile" ]
    }, {
-     "type" : "jar",
-     "sha1" : "342d1eb41a2bc7b52fa2e54e9872463fc86e2650",
-     "md5" : "2a666534a425add50d017d4aa06a6fca",
-     "id" : "org.codehaus.plexus:plexus-utils:1.5.1",
      "scopes" : [ "compile" ]
    }, {
-     "type" : "jar",
-     "sha1" : "449ea46b27426eb846611a90b2fb8b4dcf271191",
-     "md5" : "25c0752852205167af8f31a1eb019975",
-     "id" : "org.springframework:spring-beans:2.5.6",
-     mandma"scopes" : [ "compile" ]
    } ]
  } ],
  /* List of issues related to the build */
    "issues" : {
    "tracker" : {
-     "name" : "JIRA",
-     "version" : "6.0.1"
    },
-  "aggregateBuildIssues" : true,  //whether or not there are issues that already appeared in previous builds
-   "aggregationBuildStatus" : "Released",
    "affectedIssues" : [ {
-     "key" : "RTFACT-1234",
-      "url" : "https://www.jfrog.com/jira/browse/RTFACT-1234",
-      "summary" : "Description of the relevant issue",
-      "aggregated" : false  //whether or not this specific issue already appeared in previous builds
    }, {
-     "key" : "RTFACT-5469",
-     "url" : "https://www.jfrog.com/jira/browse/RTFACT-5678",
-     "summary" : "Description of the relevant issue",
-     "aggregated" : true
    } ] 
   },  
  }
}

+=mandatory; -=optional


Build Info

Description: Build Info
Since: 2.2.0
Notes: Requires JFrog Container Registry or Artifactory Pro.
Security: Requires a privileged user with deploy permissions. From version 6.6, requires read permission for the build.
Usage: GET /api/build/{buildName}/{buildNumber}
Produces: application/json (application/vnd.org.jfrog.build.BuildInfo+json), application/ vnd.org .jfrog.build.BuildInfo+json

Sample Output:

GET /api/build/my-build/51
{
"uri": "http://localhost:8081/artifactory/api/build/my-build/51"
"buildInfo" : {
        ...
    }
}

(Optional) Run the command with the Starter parameter.

GET artifactory/api/build/<BUILD NAME>/<BUILD NUMBER>?started=yyyy-MM-dd'T'HH:mm:ss.SSSZ"

Example

curl -uadmin:password "http://172.16.10.35:8082/artifactory/api/build/generic-build-test/1?started=2022-02-23T12:39:45.777Z"



Builds Diff

Description: Compare a build artifacts/dependencies/environment with an older build to see what has changed (new artifacts added, old dependencies deleted etc).
Since: 2.6.6
Security: Requires a privileged user. From version 6.6, requires read permission for the build.
Usage: GET /api/build/{buildName}/{buildNumber}?diff={OlderbuildNumber}
Produces: application/json (application/vnd.org.jfrog.build.BuildsDiff+json)
Sample Output:


GET /api/build/my-build/51?diff=50
{
    "artifacts": {
        "updated": [],
        "unchanged": [],
        "removed": [],
        "new": []
    }, "dependencies": {
        "updated": [],
        "unchanged": [],
        "removed": [],
        "new": []
    }, "properties": {
        "updated": [],
        "unchanged": [],
        "removed": [],
        "new": []
    }
}

Build Promotion

Description: Change the status of a build, optionally moving or copying the build's artifacts and its dependencies to a target repository and setting properties on promoted artifacts.
All artifacts from all scopes are included by default while dependencies are not. Scopes are additive (or). From version 5.7, the target repository can be a virtual repository.
Since: 2.3.3
Notes: 

  • Requires Artifactory Pro
  • Projects are supported from Artifactory 7.17.4.
    To promote builds within Projects, add the  ?project='projectKey' parameter.
    Note that the project parameter is optional and if it is not provided, use the default build-info repo. 

    /artifactory/api/build/promote/<build-name>/<build-number>?project=<project-name>

Security : Requires a privileged user. From version 6.6, requires  Deploy permission  for the build.

Usage: POST /api/build/promote/{buildName}/{buildNumber}
Consumes: application/json (application/vnd.org.jfrog.artifactory.build.PromotionRequest+json)

POST /api/build/promote/my-build/51
{
 "status": "staged", 							// new build status (any string)
 "comment" : "Tested on all target platforms.", // An optional comment describing the reason for promotion. Default: ""
 "ciUser": "builder", 							// The user that invoked promotion from the CI server
 "timestamp" : ISO8601, 				// the time the promotion command was received by Artifactory (It needs to be unique), 
												// the format is: 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'. Example: '2016-02-11T18:30:24.825+0200'.
 "dryRun" : false, 								// run without executing any operation in Artifactory, but get the results to check if the operation can succeed. Default: false
 "sourceRepo" : "libs-snapshot-local",			// optional repository from which the build's artifacts will be copied/moved 
 "targetRepo" : "libs-release-local", 			// optional repository to move or copy the build's artifacts and/or dependencies
 "copy": false, 								// whether to copy instead of move, when a target repository is specified. Default: false
 "artifacts" : true, 							// whether to move/copy the build's artifacts. Default: true
 "dependencies" : false, 							// whether to move/copy the build's dependencies. Default: false.
 "scopes" : [ "compile", "runtime" ], 			// an array of dependency scopes to include when "dependencies" is true
 "properties": { 								// a list of properties to attach to the build's artifacts (regardless if "targetRepo" is used).
     "components": ["c1","c3","c14"],
     "release-name": ["fb3-ga"]
 },
 "failFast": true 								// fail and abort the operation upon receiving an error. Default: true
}

Produces: application/json (application/vnd.org.jfrog.artifactory.build.PromotionResult+json)
Sample Output:

{
  "messages" : [
    {
      "level": "error",
      "message": "The repository has denied...."
    },...
  ]
}

Promote Docker Image

Description: Promotes a Docker image from one repository to another. Supported by local repositories only.
Since: 3.7
Notes: Requires JFrog Container Registry or Artifactory Pro
Security: Requires a privileged user 
UsagePOST api/docker/<repoKey>/v2/promote
Consumes: application/json

{
    "targetRepo" : "<targetRepo>",							// The target repository for the move or copy 
    "dockerRepository" : "<dockerRepository>", 				// The image name to promote
	"targetDockerRepository" : "<targetDockerRepository>"	// An optional docker repository name, if null, will use the same name as 'dockerRepository'
    "tag" : "<tag>",										// An optional tag name to promote, if null - the entire docker repository will be promoted. Available from v4.10. 
    "targetTag" : "<tag>",                     				// An optional target tag to assign the image after promotion, if null - will use the same tag
    "copy": false											// An optional value to set whether to copy instead of move. Default: false
}

Produces: application/text
Sample Usage:

POST api/docker/docker-local/v2/promote
{
  "targetRepo": "docker-prod",
  "dockerRepository": "jfrog/ubuntu"
}

Delete Builds

Description : Removes builds stored in Artifactory. Useful for cleaning up old build info data.
If the artifacts parameter is evaluated as 1 (0/false by default), build artifacts are also removed provided they have the corresponding  build.name  and build.number properties attached to them.
If the deleteAll parameter is evaluated as 1 (0/false by default), the whole build is removed.
Notes : Requires Artifactory Pro
Security : Requires a privileged user. From version 6.6, requires delete permission for the Build.
Produces : application/text
Usage 1  (since 6.13,  Consumes ) : to delete multiple build numbers of a certain build. This includes build numbers containing special characters.
Consumes: application/json
POST /api/build/delete

POST /api/build/delete -H "Content-type: application/json"
 
{
    "buildName": "test",
    "buildNumbers": ["build1", "build2"],
    "deleteArtifacts": <true | false>,  // default false
    "deleteAll": <true | false>,  // default false
}

Usage 2 (since 2.3.0; artifact removal since 2.3.3;) :

DELETE /api/build/{buildName}[?buildNumbers=n1[,n2]][&artifacts=0/1][&deleteAll=0/1]

DELETE /api/build/my-build?buildNumbers=51,52,55&artifacts=1
  
The following builds has been deleted successfully: 'my-build#51', 'my-build#52', 'my-build#55'.
  
DELETE /api/build/my-build?deleteAll=1
  
All 'my-build' builds have been deleted successfully.

Build Rename

Description: Renames a build stored in Artifactory. Typically used to keep the build info in sync with a renamed build on the CI server.
Since: 2.2.5
Notes: Requires Artifactory Pro
Security: Requires a privileged user. From version 6.6, requires deploy and delete permission for the build.
Usage: POST /api/build/rename/{buildName}?to=newBuildName
Produces: application/text
Sample Usage:

POST /api/build/rename/myJobName?to=myNewJobName

Build renaming of 'myJobName' to 'myNewJobName' was successfully started.

Push Build to Bintray 

Deprecation Notice

This endpoint is deprecated and is replaced with Distribute Build.

Description : Push a build to Bintray as a version.

Uses a descriptor file (that must have 'bintray-info' in it's filename and a .json extension) that is included with the build artifacts. 
Signing a version is controlled by the gpgSign  parameter in the descriptor file, and the gpgSign  paramater passed to this command. The value passed to this command always takes precedence over the value in the descriptor file.
If you also want a passphrase to be applied to your signature, specify gpgPassphrase=<passphrase>. 
You may omit the descriptor file by passing 6 override parameters (see below). If you wish to use the descriptor file you should pass an empty json string instead.

Since: 3.5.0
Security: Requires a valid user with deploy permissions and Bintray credentials defined (for more details, please refer to Bintray Settings).
Usage: POST /api/build/pushToBintray/{build.name}/{build.number}?gpgPassphrase=<passphrase>[&gpgSign=true\false]
Consumes : application/json (application/vnd.org.jfrog.artifactory.build.BintrayDescriptorOverrideParams+json)
Sample Input:

POST /api/build/pushToBintray/testBuild/1?gpgPassphrase=password&gpgSign=true
{
    "subject": "myUser",
    "repoName": "test",
    "packageName": "overridePkg",
    "versionName": "overrideVer",
    "licenses": ["MIT"],
	"vcs_url": "https://github.com/bintray/bintray-client-java"
}

Produces : application/json (application/vnd.org.jfrog.artifactory.bintray.BintrayPushResponse+json)

Sample Output:

{"Message": "Pushing build to Bintray finished successfully."}

Distribute Build

Description : Deploys builds from Artifactory to Bintray, and creates an entry in the corresponding Artifactory distribution repository specified.

Notes: Requires Artifactory Pro
Since
: 4.8
Security: Requires an authenticated user.
Usage: POST /api/build/distribute/{buildName}/{buildNumber}
Consumes: application/json

{
	"publish" : "<true | false>" 				// Default: true. If true, builds are published when deployed to Bintray
	"overrideExistingFiles" : "<true | false>" 	// Default: false. If true, Artifactory overwrites builds already existing in the target path in Bintray. 
												// Existing version attributes are also overridden if defined in the distribution repository Advanced Configuration
	"gpgPassphrase" : "<passphrase>" 			// If specified, Artifactory will GPG sign the build deployed to Bintray and apply the specified passphrase
	"async" : "<true | false>" 					// Default: false. If true, the build will be distributed asynchronously. Errors and warnings may be viewed in the log file
	"targetRepo" : "<targetDistributionRepo>",  // The Distribution Repository into which artifacts should be deployed
	"sourceRepos" : ["<repoKey>"]  				// An array of local repositories from which build artifacts should be deployed
	"dryRun" : "<true | false>"					// Default: false. If true, distribution is only simulated. No files are actually moved.
}

Sample input:

POST /api/build/distribute/my-build/1
{
	"targetRepo" : "dist-repo-jfrog-artifactory",  
	"sourceRepos" : ["yum-local"]  
}

Control Build Retention

Description: Specifies retention parameters for build info
Since: 5.2.1
Note: A promoted Build Info cannot be deleted using this API.
Security: Requires a privileged user. From version 6.6, requires delete permission for the build.
Usage: POST /api/build/retention/{buildName}?async=<true | false>
Consumes: application/json

{ 
    "deleteBuildArtifacts" : <true | false>, 	// When true, automatically removes build artifacts stored in Artifactory 
    "count" : <count>, 							// The maximum number of builds to store in Artifactory.
    "minimumBuildDate" : <date>, 				// Earliest build date to store in Artifactory - ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ)
    "buildNumbersNotToBeDiscarded" : [ ] 		// List of build numbers that should not be removed from Artifactory
}

Sample Usage:

POST /api/build/retention/myBuild?async=true

{ 
    "deleteBuildArtifacts" : true, 
    "count" : 100, // 
    "minimumBuildDate" : 1407345768020, 
    "buildNumbersNotToBeDiscarded" : [ 5, 9] 
}

ARTIFACTS & STORAGE

Folder Info

Description: Folder Info
For virtual use, the virtual repository returns the unified children. Supported by local, local-cached and virtual repositories.
Since: 2.2.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/storage/{repoKey}/{folder-path}
Produces: application/json (application/vnd.org.jfrog.artifactory.storage.FolderInfo+json)
Sample Output:

GET /api/storage/libs-release-local/org/acme
{
"uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme",
"repo": "libs-release-local",
"path": "/org/acme",
"created": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"createdBy": "userY",
"lastModified": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"modifiedBy": "userX",
"lastUpdated": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"children": [
{
            "uri" : "/child1",
            "folder" : "true"
        },{
            "uri" : "/child2",
            "folder" : "false"
         }
]
}

File Info

Description: File Info
For virtual use the virtual repository returns the resolved file. Supported by local, local-cached and virtual repositories.
Since: 2.2.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/storage/{repoKey}/{filePath}
Produces: application/json (application/vnd.org.jfrog.artifactory.storage.FileInfo+json)
Sample Output:

GET /api/storage/libs-release-local/org/acme/lib/ver/lib-ver.pom
{
"uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver/lib-ver.pom",
"downloadUri": "http://localhost:8081/artifactory/libs-release-local/org/acme/lib/ver/lib-ver.pom",
"repo": "libs-release-local",
"path": "/org/acme/lib/ver/lib-ver.pom",
"remoteUrl": "http://some-remote-repo/mvn/org/acme/lib/ver/lib-ver.pom",
"created": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"createdBy": "userY",
"lastModified": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"modifiedBy": "userX",
"lastUpdated": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"size": "1024", //bytes
"mimeType": "application/pom+xml",
"checksums":
{
        "md5" : string,
        "sha1" : string,
        "sha256" : string
    },
"originalChecksums":{
        "md5" : string,
        "sha1" : string,
        "sha256" : string
    }
}

Get Storage Summary Info

Description: Returns storage summary information regarding binaries, file store and repositories.
Since: 4.2.0
Security: Requires a privileged user (Admin only)
Usage: GET /api/storageinfo
Produces: application/json
Sample Output:


GET /api/storageinfo
{
   "binariesSummary" : {
     "binariesCount" "125,726" ,
     "binariesSize" "3.48 GB" ,
     "artifactsSize" "59.77 GB" ,
     "optimization" "5.82%" ,
     "itemsCount" "2,176,580" ,
     "artifactsCount" "2,084,408"
   },
   "fileStoreSummary" : {
     "storageType" "filesystem" ,
     "storageDirectory" "/home/.../artifactory/devenv/.artifactory/data/filestore" ,
     "totalSpace" "204.28 GB" ,
     "usedSpace" "32.22 GB (15.77%)" ,
     "freeSpace" "172.06 GB (84.23%)"
   },
   "repositoriesSummaryList" : [
     {
       "repoKey" "plugins-release" ,
       "repoType" "VIRTUAL" ,
       "foldersCount" 0 ,
       "filesCount" 0 ,
       "usedSpace" "0 bytes" ,
       "itemsCount" 0 ,
       "packageType" "Maven" ,
       "percentage" "0%"
     },
     {
       "repoKey" "repo" ,
       "repoType" "VIRTUAL" ,
       "foldersCount" 0 ,
       "filesCount" 0 ,
       "usedSpace" "0 bytes" ,
       "itemsCount" 0 ,
       "packageType" "Generic" ,
       "percentage" "0%"
     },

...
 
    {
       "repoKey" "TOTAL" ,
       "repoType" "NA" ,
       "foldersCount" 92172 ,
       "filesCount" 2084408 ,
       "usedSpace" "59.77 GB" ,
       "itemsCount" 2176580
     }
   ]
}



Refresh Storage Summary Info

Description: Refreshes storage summary information regarding binaries, file store and repositories.
Since: 6.17.0
Security: Requires a privileged user (Admin only)
Usage: POST /api/storageinfo/calculate
Produces: application/json


Item Last Modified

Description: Returns the last modified item at the given path. If the given path is a folder, the latest last modified item is searched for recursively. Supported by local and local-cached repositories.
Since: 2.2.5
Notes: Requires Artifactory Pro
Security: Requires a valid user with deploy permissions
Usage: GET /api/storage/{repoKey}/{item-path}?lastModified
Produces: application/json (application/vnd.org.jfrog.artifactory.storage.ItemLastModified+json)
Sample Output:

GET /api/storage/libs-release-local/org/acme?lastModified
{
"uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/foo/1.0-SNAPSHOT/foo-1.0-SNAPSHOT.pom",
"lastModified": ISO8601
}

File Statistics

Description: Item statistics record the number of times an item was downloaded, last download date and last downloader. Supported by local and local-cached repositories.
Since:
 3.1.0
Security:
 Requires read privileges
Usage:
 GET /api/storage/{repoKey}/{item-path}?stats
Produces: application/json (application/vnd.org.jfrog.storage.StatsInfo+json)
Sample Output:

GET /api/storage/libs-release-local/org/acme/foo/1.0/foo-1.0.jar?stats
{
  "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/foo/1.0/foo-1.0.jar",
  "lastDownloaded": Timestamp (ms),
  "downloadCount": 1337,
  "lastDownloadedBy": "user1"
}

Item Properties

Description: Item Properties. Optionally return only the properties requested. 
Since: 2.2.1
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/storage/{repoKey}/{itemPath}?properties[=x[,y]]
Produces: application/json (application/vnd.org.jfrog.artifactory.storage.ItemProperties+json)
Sample Output:

GET /api/storage/libs-release-local/org/acme?properties\[=x[,y]\]
{
"uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme"
"properties":{
        "p1": ["v1","v2","v3"],
        "p2": ["v4","v5","v6"]
    }
}

Set Item Properties

Description: Attach properties to an item (file or folder). When a folder is used property attachment is recursive by default.
In order to supply special characters (comma (,), backslash(\), pipe(|), equals(=)) as key/value you must add an encoded backslash (%5C) before them. For example: ..?properties=a=1%5C=1 will attach key a with 1=1 as value.
To specify multiple properties, you can separate the items in one of the following ways:

  • Use a semicolon - ; (recommended)
  • Use the encoding for the pipe ("|") character - %7C
    Alternatively, you may configure your NGINX to encode URLs so that if an unencoded pipe is used in the URL, NGINX will encode it to %7C. We recommend that you verify that this configuration does not break any other systems served by NGINX

Supported by local and local-cached repositories. 
Notes: Requires Artifactory Pro
The following special characters are forbidden in the key field: )(}{][*+^$\/~`!@#%&<>;=,±§ and the Space character.

Since: 2.3.0
Security: Requires a privileged user (can be anonymous)
Usage: PUT /api/storage/{repoKey}/{itemPath}?properties=p1=v1[,v2][|p2=v3][[&recursive=0]
Sample Usage:

PUT /api/storage/libs-release-local/ch/qos/logback/logback-classic/0.9.9?properties=os=win,linux|qa=done&recursive=0

Update Item Properties

Description: Attach and modify properties to an item: file or folder. Property attachment is recursive and atomic by default. 
If the atomicProperties parameter is evaluated as 0 (1/ true by default), the request will be performed in multiple transactions, a different transaction per node (folder or file).
Notes: Requires Artifactory Pro.
Since : 6.1.0
Security : Requires a privileged user (Annotate authorization required)
Usage : PATCH /api/metadata/{repoKey}/{itemPath}?[&recursiveProperties=0][&atomicProperties=0]
Consumes:  application/json
Sample Usage :

PATCH /api/metadata/libs-release-local/org/acme?&recursiveProperties=0&atomicProperties=0
{
    "props":{
        "newKey": "newValue",
        "existingKey": "modifiedValue",
        "toBeRemovedKey": null
    }
}



Delete Item Properties

Description: Deletes the specified properties from an item (file or folder). When a folder is used property removal is recursive by default. Supported by local and local-cached repositories.
Notes: Requires Artifactory Pro
Since: 2.3.2
Security: Requires a privileged user (can be anonymous)
Usage: DELETE /api/storage/{repoKey}{itemPath}?properties=p1[,p2][&recursive=0]
Sample Usage:

DELETE /api/storage/libs-release-local/ch/qos/logback/logback-classic/0.9.9?properties=os,qa&recursive=0

Set Item SHA256 Checksum

Description: Calculates an artifact's SHA256 checksum and attaches it as a property (with key "sha256"). If the artifact is a folder, then recursively calculates the SHA256 of each item in the folder and attaches the property to each item.
Since: 4.2.1
Security: Requires an admin user
Consumes: application/json
Usage: POST /api/checksum/sha256 -H "Content-Type: application/json"
Sample Usage: 

POST /api/checksum/sha256 -H "Content-Type: application/json"
{
   "repoKey":"ext-snapshot-local",
   "path":"artifactory-powerpack-3.9.3/bin/"
}

Zap Cache

Description: "Zapping" a cache means forcing the Retrieval Cache Period and Missed Retrieval Cache Period to time out. You can also zap cache an entire repository.
Since: 7.49.3
Security: Requires a privileged user, Requires delete permissions 
Usage: POST https://<host>/artifactory/api/zap/<repo-path>
Sample Usage

POST https://localhost:8081/artifactory/api/zap/repo1/com/acme-new

Sample Output: 

{“Message”:”Completed zapping cache in path repo1/com/acme-new”}

Retrieve Artifact

Description: Returns an artifact from the specified destination. skipUpdateStats param allows skip stats update.
You can also use Property-based Resolution as part of retrieving artifacts.
Security: Requires a user with 'read' permission (can be anonymous)
Usage: GET /repo-key/path/to/artifact.ext?[skipUpdateStats=true]

Sample Usage:

GET http://localhost:8081/artifactory/libs-release-local/ch/qos/logback/logback-classic/0.9.9/logback-classic-0.9.9.jar?skipUpdateStats=true

Retrieve Latest Artifact

Description: Returns the latest artifact version from the specified destination.
Latest Maven Release/Integration : Specify SNAPSHOT or [RELEASE] for the version in the requested path to get the latest Maven integration or release artifact.
Latest Non-Maven Release/Integration : Specify [INTEGRATION] and [RELEASE] for the version in the requested path, (replacing [folderItegRev] and [fileItegRev] ), 
as defined by the repository's layout) to get the latest integration version or latest release version artifact accordingly based on alphabetical sorting.
Integration and release tokens cannot be mixed together.
You can also use property-based resolution as part of retrieving artifacts to restrict resolution of artifacts assigned with specific properties.

NOTE:

  • Only local, cache and virtual repositories will be used.
  • To change the retrieve latest behavior to retrieve the latest version based on the created date you can add the following flag to $JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties and add the following flag artifactory.request.searchLatestReleaseByDateCreated=true  and restart Artifactory service.
  • Both  [folderItegRev]  and  [fileItegRev] have to be defined in the repository layout.

Notes: Requires Artifactory Pro.
Since: Latest Maven: 2.6.0; Latest non-Maven: 2.6.2
Security: Requires a user with 'read' permission (can be anonymous)
Usage: GET /repo-key/path/to/artifact.ext
Sample Usage:

Download the latest Maven unique snapshot artifact:

GET http://localhost:8081/artifactory/libs-release-local/ch/qos/logback/logback-classic/0.9.9-SNAPSHOT/logback-classic-0.9.9-SNAPSHOT.jar

Download the latest release artifact:

GET http://localhost:8081/artifactory/ivy-local/org/acme/[RELEASE]/acme-[RELEASE].jar

Download the latest integration artifact:

GET http://localhost:8081/artifactory/ivy-local/org/acme/1.0-[INTEGRATION]/acme-1.0-[INTEGRATION].jar

Retrieve Build Artifacts Archive

Description: Returns an archive file (supports zip/tar/tar.gz/tgz) containing all the artifacts related to a specific build, you can optionally provide mappings to filter the results,
the mappings support regexp capturing groups which enables you to dynamically construct the target path inside the result archive file.
Notes: Requires Artifactory Pro
Since: 2.6.5
Security: Requires a privileged user (can be anonymous)
Usage: POST /api/archive/buildArtifacts -H "Content-Type: application/json"
Consumes: application/json (application/vnd.org.jfrog.artifactory.build.BuildArtifactsRequest+json)
Produces: application/zip (for zip archive type), application/x-tar (for tar archive type), application/x-gzip (for tar.gz/tgz archive type)
Sample Usage:

POST /api/archive/buildArtifacts -H "Content-Type: application/json"
{
 +"buildName": "build-name" // The build name for search by
 +"buildNumber": "15" // The build number to search by, can be LATEST to search for the latest build number
 -"buildStatus": "Released" // Optionally search by latest build status (e.g: "Released") 
 -"repos": ["libs-release-local,ext-release-local"] // Optionally refine search for specific repos, omit to search within all repositories
 +"archiveType": "tar/zip/tar.gz/tgz" // The archive file type to return
 -"mappings": [ // Optionally refine the search by providing a list of regexp patterns to search by
 	{
		"input": "(.+)/(.+)-sources.jar",
		"output": "$1/sources/$2.jar" // Optionally provide different path of the found artifacts inside the result archive, supports regexp groups tokens
	},
	{
		"input": "(.+)-release.zip"
	}
 ]
}

Retrieve Folder or Repository Archive

Description: Returns an archive file (supports zip/tar/tar.gz/tgz) containing all the artifacts that reside under the specified path (folder or repository root). Requires Enable Folder Download to be set. From version 5.10, If any artifact in the folder is blocked for download by Xray, the whole folder download is blocked and this call will return a HTTP Forbidden (403) error.
Notes: Requires Artifactory Pro (Multiple downloads could be slow and CPU Intensive).
Downloading a folder or a repository's root is only supported for local (or cache) repositories.
Since : 4.1.0
Security : Requires a privileged user with read permissions on the path.
Usage : GET /api/archive/download/{repoKey}/{path}?archiveType={archiveType}[&includeChecksumFiles=true]
Produces:   */*
Sample Usage :

GET /api/archive/download/my-local-repo/path/to/folder?archiveType=zip
{Stream containing contents of path my-local-repo/path/to/folder}

GET /api/archive/download/my-local-repo?archiveType=zip
{Stream containing contents of repo my-local-repo}

Trace Artifact Retrieval

Description: Simulates an artifact retrieval request from the specified location and returns verbose output about the resolution process.
This API is useful for debugging artifact retrieval issues. 
Security: As applied to standard artifact retrieval by the requesting user.
Since: 2.6.0
Usage: GET /repo-key/path/to/artifact.ext?trace
Produces: text/plain
Sample Output:

GET http://localhost:8081/artifactory/libs-release-local/jmock/jmock/1.0.1/jmock-1.0.1.jar?trace
 
Request ID: 51c808f6
Repo Path ID: libs-release-local:jmock/jmock/1.0.1/jmock-1.0.1.jar
Method Name: GET
User: resolver
Time: 2012-05-06T10:49:09.528+03:00
Thread: pool-1-thread-31
Steps: 
2012-05-06T10:49:09.587+03:00 Received request
2012-05-06T10:49:09.588+03:00 Request source = 0:0:0:0:0:0:0:1, Last modified = 01-01-70 01:59:59 IST, If modified since = -1, Thread name = pool-1-thread-31
2012-05-06T10:49:09.697+03:00 Retrieving info
2012-05-06T10:49:09.723+03:00 Identified resource as a file
...
2012-05-06T10:49:09.788+03:00 Responding with selected content handle
2012-05-06T10:49:09.807+03:00 Request succeeded

Archive Entry Download

Description: Returns an archived resource from the specified archive destination.
Security: Requires a user with 'read' permission (can be anonymous)
Usage: GET /repo-key/path/to/artifact.jar!/path/to/archived/resource ( NOTE!  the '!' should be in between the archive file name and the archive entry path, and will not work without the '/' after the '!'.)

Sample Output:

GET http://localhost:8081/artifactory/repo1-cache/commons-lang/commons-lang/2.6/commons-lang-2.6.jar!/META-INF/LICENSE.txt

Create Directory

Description: Create new directory at the specified destination.
Notes: You can also attach properties as part of creating directories.
Security: Requires a user with 'deploy' permissions (can be anonymous)
Usage: PUT /repo-key/path/to/directory/
Produces: application/json (application/vnd.org.jfrog.artifactory.storage.ItemCreated+json)
Sample Output:

PUT /libs-release-local/path/to/directory/
{
"uri": "http://localhost:8081/artifactory/libs-release-local/path/to/directory",
"repo": "libs-release-local",
"path": "/path/to/directory",
"created": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"createdBy": "userY",
"children" : [ ]
}

Deploy Artifact

Description: Deploy an artifact to the specified destination.
Notes: You can also attach properties as part of deploying artifacts.
Security: Requires a user with 'deploy' permissions (can be anonymous)
Usage: PUT /repo-key/path/to/artifact.ext
Produces: application/json (application/vnd.org.jfrog.artifactory.storage.ItemCreated+json)
Sample Usage:

PUT /libs-release-local/my/jar/1.0/jar-1.0.jar
{
"uri": "http://localhost:8081/artifactory/libs-release-local/my/jar/1.0/jar-1.0.jar",
"downloadUri": "http://localhost:8081/artifactory/libs-release-local/my/jar/1.0/jar-1.0.jar",
"repo": "libs-release-local",
"path": "/my/jar/1.0/jar-1.0.jar",
"created": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"createdBy": "userY",
"size": "1024", //bytes
"mimeType": "application/java-archive",
"checksums":
{
        "md5" : string,
        "sha1" : string
    },
"originalChecksums":{
        "md5" : string,
        "sha1" : string
    }
}

Deploy Artifact by Checksum

Description: Deploy an artifact to the specified destination by checking if the artifact content already exists in Artifactory.
If Artifactory already contains a user readable artifact with the same checksum the artifact content is copied over to the new location and returns a response without requiring content transfer.
Otherwise, a 404 error is returned to indicate that content upload is expected in order to deploy the artifact.
If the X-Checksum-Deploy header is set to false, the artifact will be uploaded successfully with a 201 response, even if it didn't exist before, and submitted checksums will have status Uploaded: Identical.
Notes : You can also  attach properties  as part of deploying artifacts. 
Security : Requires a user with 'deploy' permissions (can be anonymous)
Usage : PUT /repo-key/path/to/artifact.ext
Headers : X-Checksum-Deploy: true, X-Checksum-Sha1: sha1Value, X-Checksum-Sha256: sha256Value, X-Checksum: checksum value (type is resolved by length)
Produces : application/json (application/vnd.org.jfrog.artifactory.storage.ItemCreated+json)
Since : 2.5.1
Sample Output :

PUT /libs-release-local/my/jar/1.0/jar-1.0.jar
{
"uri": "http://localhost:8081/artifactory/libs-release-local/my/jar/1.0/jar-1.0.jar",
"downloadUri": "http://localhost:8081/artifactory/libs-release-local/my/jar/1.0/jar-1.0.jar",
"repo": "libs-release-local",
"path": "/my/jar/1.0/jar-1.0.jar",
"created": ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ),
"createdBy": "userY",
"size": "1024", //bytes
"mimeType": "application/java-archive",
"checksums":
{
        "md5" : string,
        "sha1" : string
    },
"originalChecksums":{
        "md5" : string,
        "sha1" : string
    }
}

Deploy Artifacts from Archive

Description: Deploys an archive containing multiple artifacts and extracts it at the specified destination maintaining the archive's file structure.
Deployment is performed in a single HTTP request and only the extracted content is deployed, not the archive file itself. 
Supported archive types are: zip; tar; tar.gz; and tgz. If the archive is omitted from the call, a response of "100 - Continue" is returned.  NOTE!  that deployment of compressed archives (unlike tar) may incur considerable CPU overhead.
Notes: Requires Artifactory Pro
Security
: Requires a user with 'deploy' permissions (can be anonymous)
Usage: PUT path1/to/repo-key/ /path2/to/archive.zip
Headers X-Explode-Archive: true  - archive will be exploded upon deployment,   X-Explode-Archive-Atomic: true   - archive will be exploded in an atomic operation upon deployment
Produces: text/plain
Since: 2.6.3
Sample Usage:

PUT /libs-release-local/ /Users/user/Desktop/archive.zip

Push a Set of Artifacts to Bintray

Deprecation Notice

This endpoint is deprecated and is replaced with Distribute Artifact.

Description : Push a set of artifacts to Bintray as a version.

Uses a descriptor file (that must have 'bintray-info' in it's filename and a .json extension) that was deployed to artifactory, the call accepts the full path to the descriptor as a parameter.
Signing a version is controlled by the  gpgSign  parameter in the descriptor file, and the  gpgSign  paramater passed to this command.  The value passed to this command always takes precedence over the value in the descriptor file .
If you also want a passphrase to be applied to your signature, specify gpgPassphrase=<passphrase>. 

Security: Requires a valid user with deploy permissions and Bintray credentials defined (for more details, please refer to Bintray Settings).
Usage : POST /api/bintray/push?descriptor=pathToDescriptorFile[&gpgPassphrase=passphrase][&gpgSign=true\false]
Since : 3.5.0
Produces : application/json (application/vnd.org.jfrog.artifactory.bintray.BintrayPushResponse+json)

Sample Output:

{"Message": "Pushing build to Bintray finished successfully."}

Push Docker Tag to Bintray

Deprecation Notice

This endpoint has been deprecated.


Description
: Push Docker tag to Bintray
Calculation can be synchronous (the default) or asynchronous.
Notes:  Requires JFrog Container Registry or Artifactory Pro
Security : Requires a valid user with deploy permissions and Bintray credentials defined (for more details, please refer to  Bintray Settings ).
Usage : POST /api/bintray/docker/push/{repoKey}
Since : 3.6.0
Produces : text/plain
Sample Output :

POST api/bintray/docker/push/docker-local
{
  "dockerImage": "jfrog/ubuntu:latest", // The docker image to push, use ':' for specific tag or leave blank for 'latest'
  "bintraySubject": "shayy", // The Bintray Subject
  "bintrayRepo": "containers", // The Bintray Subject's repository
  "async": false // Optionally execute the push asynchronously. Default: false
}

Create Signed URL

Description:  Generates a signed url for the provided repository path, providing temporary access to download artifacts. User may provide expiry or valid_for_secs optional parameter. With a maximum timeframe of one year (365 days). Default expiry is 24 hours.
Note:  This feature is  available only for Artifactory Cloud Enterprise and Enterprise+ users.
Since:  Artifactory 7.5.0
Security:  Requires a privileged user (admin or manage permission type)
Usage:  POST /artifactory/api/signed/url
Produces: application/json (the string with the signed URL)
Sample Usage:

curl -X POST  "http://localhost:8080/artifactory/api/signed/url" -H  "Content-Type: application/json" -uadmin:<your_password> -d  '{ "repo_path": "/example-repo-local/1.txt", "valid_for_secs":10000 }'
   
201 (Success)

repo_path

Full path to the artifact.

valid_for_secs
Number of seconds since generation before the URL expires.
expiry
An expiry date for the URL after which the URL will be invalid, expiry value is in Unix epoch time in milliseconds.

Example Download resource using the signed URL:

curl "http://localhost:8080/artifactory/example-repo-local/1.java?sig=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJlbGlnIiwic3VtIjoiY2QwZjRiMGY4ODQ0Y2VjN2M2OWI2NWI4ZTA4NTVjNmE0ZDgzMDE1OTE0NDEwN2E5YTczOThlNWM5MDY3MTBiNyIsImV4cCI6MTU0NzM5MTgyNiwiaWF0IjoxNTQ3MzgxODI2fQ.PLCBySll85H9fOAtxabrMBbCZ2lBTcJmYORWxXS6Mmw"

Replace Signed URL Key

Description:  Replaces the key for signing and validating signed URLs. This will invalidate any signed URLs previously created.
Note:  This feature is  available only for Artifactory Cloud Enterprise and Enterprise+ users.
Since:
  Artifactory 7.5.0
Security:  Requires a privileged user (admin)
Usage:  POST /artifactory/api/signed/url/key
Sample Usage:

curl -X POST  "http://localhost:8080/artifactory/api/signed/url/key"
   
201 (Success)


Distribute Artifact

Description: Deploys artifacts from Artifactory to Bintray, and creates an entry in the corresponding Artifactory distribution repository specified
Notes: Requires Artifactory Pro
Since
: 4.8
Security: Requires an authenticated user.
Usage: POST /api/distribute
Consumes: application/json

{
	"publish" : "<true | false>" 				// Default: true. If true, artifacts are published when deployed to Bintray
	"overrideExistingFiles" : "<true | false>" 	// Default: false. If true, Artifactory overwrites files already existing in the target path in Bintray. 
												// Existing version attributes are also overridden if defined in the distribution repository Advanced Configuration
	"gpgPassphrase" : "<passphrase>" 			// If specified, Artifactory will GPG sign the version deployed to Bintray and apply the specified passphrase
	"async" : "<true | false>" 						// Default: false. If true, the artifact will be distributed asynchronously. Errors and warnings may be viewed in the log file
	"targetRepo" : "<targetDistributionRepo>",  // The Distribution Repository into which artifacts should be deployed
	"packagesRepoPaths" : ["<localRepo/path/to/distribute>", "<distRepo/path/to/distribute>"]  	// An array of local or distribution repositories and corresponding paths to artifacts that should be deployed to the specified target repository in Bintray
	"dryRun" : "<true | false>"					// Default: false. If true, distribution is only simulated. No files are actually moved.
}

Sample input:

POST /api/distribute
{
	"targetRepo" : "dist-repo-jfrog-artifactory",  
	"packagesRepoPaths" : ["yum-local/jfrog-artifactory-pro-4.7.6.rpm"]  
}

File Compliance Info (Deprecated)

Description: Get compliance info for a given artifact path. The result includes license and vulnerabilities, if any. Supported by local and local-cached repositories.
Notes: This API is deprecated from version 5.0.
Since
: 3.0.0
Security: Requires an authenticated user.
Usage: GET: /api/compliance/{repoKey}/{item-path}
Produces: application/json
Sample output:

GET: /api/compliance/libs-release-local/ch/qos/logback/logback-classic/0.9.9/logback-classic-0.9.9.jar
{
  "licenses" : [ {"name":"LGPL v3", "url": "http://"}, {"name":"APL v2", "url": "http://"}... ],
  "vulnerabilities" : [ {"name":"CVE-13427", "url": "http://"}, {"name":"CVE-1041", "url": "http://"}...  ]
}

Delete Item

Description: Deletes a file or a folder from the specified local repository or remote repository cache.
Security: Requires a user with 'delete' permission (can be anonymous)
Usage: DELETE /repo-key/path/to/file-or-folder
Sample Usage:

DELETE http://localhost:8081/artifactory/libs-release-local/ch/qos/logback/logback-classic/0.9.9

Copy Item

Description: Copy an artifact or a folder to the specified destination. Supported for local, remote and federated repositories only.
Optionally suppress cross-layout module path translation during copy.
You can test the copy using a dry run.
Copy item behaves similarly to a standard file system and supports renames. If the target path does not exist, the source item is copied and optionally renamed. Otherwise, if the target exists and it is a directory,
the source is copied and placed under the target directory.
Notes : Requires Artifactory Pro
Security : Requires a privileged user (can be anonymous)
Usage : POST /api/copy/{srcRepoKey}/{srcFilePath}?to=/{targetRepoKey}/{targetFilePath}[&dry=1][&suppressLayouts=0/1(default)][&failFast=0/1]
Produces : application/json (application/vnd.org.jfrog.artifactory.storage.CopyOrMoveResult+json)
Since : 2.2.2
Sample Output :

POST /api/copy/libs-release-local/org/acme?to=/ext-releases-local/org/acme-new&dry=1
{
"messages" : [
{
             "level": "error",
             "message": "The repository has denied...."
            },...
]
}

Move Item

Description: Moves an artifact or a folder to the specified destination. Supported by local repositories only.
Optionally suppress cross-layout module path translation during move.
You can test the move using dry run.
Move item behaves similarly to a standard file system and supports renames. If the target path does not exist, the source item is moved and optionally renamed. Otherwise, if the target exists and it is a directory,
the source is moved and placed under the target directory.
Notes: Requires Artifactory Pro
Security: Requires a privileged user (can be anonymous)
Usage: POST /api/move/{srcRepoKey}/{srcFilePath}?to=/{targetRepoKey}/{targetFilePath}[&dry=1][&suppressLayouts=0/1(default)][&failFast=0/1]
Produces: application/json (application/vnd.org.jfrog.artifactory.storage.CopyOrMoveResult+json)
Since: 2.2.2
Sample Output:

POST /api/move/libs-release-local/org/acme?to=/ext-releases-local/org/acme-new&dry=1
{
"messages" : [
{
             "level": "error",
             "message": "The repository has denied...."
            },...
]
}

Get Repository Replication Configuration

Description: Returns the replication configuration for the given repository key, if found. Supported by local and remote repositories. Note: The 'enableEventReplication' parameter refers to both push and pull replication.
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: GET /api/replications/{repoKey}
Produces: application/json (application/vnd.org.jfrog.artifactory.replications.ReplicationConfigRequest+json) 
Since: 3.1.1 (update to include / exclude pattern on replication added in Artifactory 7.24.4)
Sample Usage:

GET /api/replications/libs-release-local
{
  "url" : "http://localhost:8081/artifactory/remote-repo",
  "socketTimeoutMillis" : 15000,
  "username" : "admin",
  "password" : "password",
  "enableEventReplication" : false,
  "enabled" : true,
  "cronExp" : "0 0 12 * * ?",
  "syncDeletes" : true,
  "syncProperties" : true,
  "syncStatistics" : false,
  "repoKey" : "libs-release-local",   "replicationKey" : "generic-local_http__5d00703ade",
  "includePathPrefixPattern" : "/path/to/repo",
   "excludePathPrefixPattern" : "/path/to/repo",
   "checkBinaryExistenceInFilestore" : false
}

Set Repository Replication Configuration

Description: Add or replace replication configuration for given repository key. Supported by local and remote repositories. Accepts the JSON payload returned from Get Repository Replication Configuration for a single and an array of configurations. If the payload is an array of replication configurations, then values for cronExp and  enableEventReplication in the first element in the array will determine the corresponding values when setting the repository replication configuration.
Notes: Requires Artifactory Pro
Security: Requires an admin user 
Usage: PUT /api/replications/{repoKey}
Consumes: application/json (application/vnd.org.jfrog.artifactory.replications.ReplicationConfigRequest+json)
Since: 3.1.1 (update to include / exclude pattern on replication added in Artifactory 7.24.4)
Note: Enabling the checkBinaryExistenceInFilestore flag requires an Enterprise+ license. For more information, see Repository Replication. This flag will work for multi-push replication as well.
Sample Usage:

PUT /api/replications/libs-release-local
{
  "url" : "http://localhost:8081/artifactory/remote-repo",
  "socketTimeoutMillis" : 15000,
  "username" : "admin",
  "password" : "password",
  "enableEventReplication" : false,
  "enabled" : true,
  "cronExp" : "0 0 12 * * ?",
  "syncDeletes" : true,
  "syncProperties" : true,
  "syncStatistics" : false,
  "repoKey" : "libs-release-local",
  "includePathPrefixPattern" : "/path/to/repo",
  "excludePathPrefixPattern" : "/path/to/repo", 
   "proxy":"proxy_id",
  "checkBinaryExistenceInFilestore" : "<true | false>" // When true, enables distributed checksum storage. For more inforomation, see Optimizing Repository Replication with Checksum-Based Storage
}

Update Repository Replication Configuration

Description: Update existing replication configuration for given repository key, if found. Supported by local and remote repositories.
Notes: Requires Artifactory Pro

For multiple repository replication, refer to the Create or Replace Loca lMulti-push Replication REST API.

Security: Requires an admin user
Usage: POST /api/replications/{repoKey}
Consumes: full or partial application/json (application/vnd.org.jfrog.artifactory.replications.ReplicationConfigRequest+json) 
Since: 3.1.1 (update to include / exclude pattern on replication added in Artifactory 7.24.4)
Note: Enabling the checkBinaryExistenceInFilestore flag requires an Enterprise+ license. For more information, see Repository Replication.
Sample Usage:

POST /api/replications/libs-release-local

{
  "url" : "http://localhost:8081/artifactory/remote-repo",
  "socketTimeoutMillis" : 15000,
  "username" : "admin",
  "password" : "password",
  "enableEventReplication" : false,
  "enabled" : true,
  "cronExp" : "0 0 12 * * ?",
  "syncDeletes" : true,
  "syncProperties" : true,
  "syncStatistics" : false,
  "repoKey" : "libs-release-local",
  "includePathPrefixPattern" : "/path/to/repo,    
  "excludePathPrefixPattern" : "/path/to/repo", 
  "checkBinaryExistenceInFilestore" : "<true | false>" // When true, enables distributed checksum storage. For more information, see Optimizing Repository Replication with Checksum- Based Storage
}

Delete Repository Replication Configuration

Description: Delete existing replication configuration for given repository key. Supported by local and local-cached repositories.
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: DELETE /api/replications/{repoKey}
Since: 3.1.1
Sample Usage:

DELETE /api/replications/libs-release-local

Scheduled Replication Status

Description: Returns the status of scheduled  cron-based replication jobs define via the Artifactory UI on repositories. Supported by local, local-cached and remote repositories.
Notes: Requires Artifactory Pro
Security: Requires a user with 'read' permission (can be anonymous)
Usage: GET /api/replication/{repoKey}
Produces: application/json (application/vnd.org.jfrog.artifactory.replication.ReplicationStatus+json)

GET /api/replication/remote-libs
{
	"status": {status},
	"lastCompleted": {time}, 
	"targets":
	[
		{ "url" : targetUrl, "repoKey": {repoKy}, "status" : {status}, "lastCompleted" : {time} },
		... 
		{ "url" : targetUrl, "repoKey": {repoKy}, "status" : {status}, "lastCompleted" : {time}}
	],
	"repositories":
	{
		{repoKy} : { "status" : {status}, "lastCompleted" : {time} },
		... 
		{repoKy} : { "status" : {status}, "lastCompleted" : {time} }
	}
}

where:
{status}= never_run|incomplete(running or interrupted)|error|warn|ok|inconsistent
{time}= time in ISO8601 format (yyyy-MM-dd'T'HH:mm:ss.SSSZ), or null if never completed

Since: 2.4.2
Sample Usage:

GET /api/replication/remote-libs
{
	"status" : "ok",
	"lastCompleted" : 2015-12-27T15:08:49.050+02:00",
	"targets":
	[
		{ "url": "http://remote_host/remote-libs1", "repoKey": "remote-libs1", "status" : {status}, "lastCompleted" : "2015-12-27T15:07:49.050+02:00" },
		... 
		{ "url" : "http://remote_host/remote-libs2", "repoKey": "remote-libs2", "status" : {status}, "lastCompleted" : "2015-12-27T15:07:49.050+02:00" }
	],
	"repositories":
		{ 
			"remote-libs1" : { "status" : "ok", "lastCompleted" : "2015-12-27T15:07:49.050+02:00" },
			... 
			"remote-libs2" : { "status" : "ok", "lastCompleted" : "2015-12-27T15:07:49.050+02:00" }
		}
}

Pull/Push Replication

Description: Schedules immediate content replication between two Artifactory instances.

Replication can optionally include properties and delete items if they do not exist in the source repository.
This API completes the existing  cron-based replication exposed via the Artifactory UI and allows for pre-scheduled execution.
Pull Replication - pulls content from a remote Artifactory repository to a local cache of the remote repository.
Push Replication - pushes content from a local repository into a local repository of another Artifactory instance.
Multi-push Replication - pushes content from a local repository into a local repository of several Artifactory instances. This feature is only available with Artifactory Enterprise license.
The type of replication initiated depends on the type of repository specified in the repoPath parameter. 
If repoPath is a local repository, a push replication will be triggered. You may specify multiple target repositories in the payload for multi-push replication, but all must be local to their respective instances.
If repoPath is a remote repository cache, a pull replication will be triggered. Note that in this case you may only specify a single repository in the payload.
Important note - If no repositories are provided in the payload, Artifactory will trigger all existing replication configurations.
Note: Enabling the checkBinaryExistenceInFilestore flag requires an Enterprise+ license. For more information, see Repository Replication.
Security : Requires a privileged user (can be anonymous) For non-admin users, the maximum number of files that will be replicated is as defined by the  artifactory.search.userQueryLimit  system property.
Usage : POST /api/replication/execute/{repoPath}
Consumes : application/json

[
	{
+		"url" : "<URL of the repository at the remote Artifactory instance, Used only by push replication>",
+		"username" : "<username at the remote Artifactory instance, Used only by push replication>",
+		"password" : "<password at the remote Artifactory instance, Used only by push replication>",
-		"proxy" : "<name of the proxy (if used) at the remote Artifactory instance, Used only by push replication>"
-		"properties" : "<true | false>", 	// When true, properties of replicated artifacts will be synchronized also
-		"delete" : "<true | false>",			// When true, items that were deleted remotely will also be deleted locally (including properties metadata)
-       "checkBinaryExistenceInFilestore" : "<true | false>" // When true, enables distributed checksum storage. For more information, see Optimizing Repository Replication with Checksum-Based storage                 

	}
]

+=mandatory; -=optional
Since : 4.7.5
Sample Usage :

// Single push replication
POST /api/replication/execute/libs-release-local
[
	{
        "url":"http://localhost:8082/artifactory/libs-release-local",
        "username":"admin",
		"password":"password",
        "proxy":"localProxy"
	}
]

// Pull replication
POST /api/replication/execute/libs-remote
[
	{
		"properties" : "true", 	
		"delete" : "true"
	}
]
 
// Multi-push replication
POST /api/replication/execute/libs-release-local
[
	{
        "url":"http://localhost:8082/artifactory/libs-release-local",
        "username":"admin",
		"password":"password",
        "proxy":"localProxy",
		"properties" : "true", 	
		"delete" : "true"
	},
	{
        "url":"http://localhost:8082/artifactory/ext-release-local",
        "username":"admin",
		"password":"password"
		"properties" : "true", 	
		"delete" : "true"
	},
	{
        "url":"http://localhost:8082/artifactory/plugins-release-local",
        "username":"admin",
		"password":"password"
		"properties" : "true", 	
		"delete" : "true"
	}
]
 
// Trigger configured push replication
POST /api/replication/execute/libs-release-local


// Trigger configured pull replication
POST /api/replication/execute/libs-remote

Pull/Push Replication (Deprecated)

Description: Schedules immediate content replication between two Artifactory instances. Replication can include properties and can optionally delete local items if they do not exist in the source repository.
This API completes the existing  cron-based replication exposed via the Artifactory UI and allows for on-demand execution.
Pull Replication - pulls content from a remote Artifactory repository to a local cache of the remote repository.
Push Replication - pushes content from a local repository into a remote Artifactory local repository.
Supported by local, local-cached and remote repositories.
Notes : Requires Artifactory Pro
Security : Requires a privileged user (can be anonymous) For non-admin users will replicate at max the number of files as defined by the  artifactory.search.userQueryLimit  system property.
Usage : POST /api/replication/{srcRepoKey}/{srcPath}
Consumes : application/json (application/vnd.org.jfrog.artifactory.replication.ReplicationRequest+json)
Since : 2.4.0
Sample Usage :

POST /api/replication/libs-release-local/com/acme
{
  //The following is only applicable for push replication
  + "url" : "https://repo.nmiy.org/repo-key", // The remote repository URL
  + "username": "replicator", //The name of a user with deploy permissions on the remote repository
  + "password": "***", //The remote repository password
  - "properties": true, //Sync item properties (true by default)
  - "delete": true, //Sync deletions (false by default)
  - "proxy": "org-prox", //A name of an Artifactory-configured proxy to use for remote requests
}

+=mandatory; -=optional


Configure Checksum Replication

You can configure metadata replication in the target Artifactory so that metadata replication of artifacts occurs between a source Artifactory and the target Artifactory while artifact replication is done with storage level replication. The API can also set days to trust the replication, which allows the transfer for a limited number of days. Allows the usage of the checkBinaryExistenceinFilestore flag in the Pull/Push Replication API on the source Artifactory. For more information, see Optimizing Repository Replication Using Storage Level Synchronization Options .

Security: Requires an admin user.
Usage: PUT /api/config/storage/checksumReplication
Consumes: application/json

[
	{
+		"checkBinaryExistenceAllowed" : "<true | false>", 	// Allows the usage of the checkBinaryExistenceinFilestore flag in the Pull/Push Replication API on the source Artifactory.
-       "daysToTrust" : "<number of days to trust the replication>" // The number of days for which the full checksum from target Artifactory is trusted. Useful for migration process. The value cannot be more than 30 days. The default is 0. Artifactory UI displays the remaining number of days to trust when the admin logs in.                 

	}
]

+=mandatory; -=optional
Since: 7.55.2
Sample Usage:

PUT /api/config/storage/checksumReplication
[
	{
	 	"checkBinaryExistenceAllowed" : "true"
	}
]

Get Checksum Replication

Gets the checksum replication status on the target Artifactory. The API returns the replication status and the date until which the trust expires.

Security: Requires an admin user.
Usage: GET /api/config/storage/checksumReplication
Consumes: application/json

Since: 7.55.2

Sample Usage

GET /api/config/storage/checksumReplication

#returns

{

 "checkBinaryExistenceAllowed": true,

 "trustUntil": "2023-03-25 21:46:46 +0200"

}

Create or Replace Local Multi-push Replication 

Description:Creates or replaces a local multi-push replication configuration. Supported by local repositories.
Notes : Requires an enterprise license

For single repository replication, refer to the Update Repository Replication Configuration  REST API.

Security : Requires an admin user.
Usage : PUT /api/replications/multiple/{repo-key}
Consumes : application/json (application/vnd.org.jfrog.artifactory.replications.MultipleReplicationConfigRequest+json) 
Since : 3.7
Sample Usage :

PUT /api/replications/multiple/libs-release-local
{
 "cronExp":"0 0/9 14 * * ?", 
 "enableEventReplication":true, 
 "replications":[ 
	{
+		"url": "http://localhost:8081/artifactory/repo-k",
+		"socketTimeoutMillis": 15000,  
+		"username": "admin", 
+		"password": "password", 
-		"enableEventReplication": true,
-		"enabled": true, 
-		"syncDeletes": false, 
-		"syncProperties": true, 
-	 	"syncStatistics" : false,
-		"repoKey": "libs-release-local" 
	}
,
	{ 
+		"url": "http://localhost:8081/artifactory/repo-v", 
+		"socketTimeoutMillis": 15000, 
+		"username": "admin", 
+		"password": "password", 
-		"enableEventReplication": true, 
-		"enabled": true, 
-		"syncDeletes": false, 
-		"syncProperties": true, 
-	 	"syncStatistics" : false,
-		"repoKey": "libs-release-local" 
	}
,
    {
+       "url": "http://localhost:8081/artifactory/repo-k", 
+       "socketTimeoutMillis": 15000, 
+       "username": "admin", 
+       "password": "password", 
-       "enableEventReplication": true, 
-       "enabled": true, 
-       "syncDeletes": false, 
-       "syncProperties": true, 
-       "syncStatistics" : false, 
-       "repoKey": "libs-release-local", 
-       "checkBinaryExistenceInFilestore" : "<true | false>" // When true, enables distributed checksum storage. For more inforomation, see Optimizing      Repository Replication with Checksum-Based Storage 
    }
,
    {

+       "url": "http://localhost:8081/artifactory/repo-v", 
+       "socketTimeoutMillis": 15000,
+       "username": "admin",
+       "password": "password", 
-       "enableEventReplication": true, 
-       "enabled": true, 
-       "syncDeletes": false, 
-       "syncProperties": true, 
-       "syncStatistics" : false, 
-       "repoKey": "libs-release-local", 
-       "checkBinaryExistenceInFilestore" : "<true | false>" // When true, enables distributed checksum storage. For more inforomation, see Optimizing Repository Replication with Checksum-Based Storage 
    }
  ] 
}

+=mandatory; -=optional


Update Local Multi-push Replication 

Description:Updates a local multi-push replication configuration. Supported by local repositories.
Notes: Requires an enterprise license
Security: Requires an admin user.
Usage POST /api/replications/multiple/{repo-key}
Consumes: application/json (application/vnd.org.jfrog.artifactory.replications.MultipleReplicationConfigRequest+json)
Since: 3.7
Sample Usage:

POST /api/replications/multiple/libs-release-local
{
	"cronExp":"0 0/9 14 * * ?", 
	"enableEventReplication":true, 
	"replications":[ 
		{ 
+			"url": "http://localhost:8081/artifactory/repo-k", 
+			"socketTimeoutMillis": 15000, 
+			"username": "admin", 
+			"password": "password", 
-			"enableEventReplication": true, 
-			"enabled": true, 
-			"syncDeletes": false, 
-			"syncProperties": true, 
-	 		"syncStatistics" : false,
-			"repoKey": "libs-release-local" 
		}
,
		{ 
+			"url": "http://localhost:8081/artifactory/repo-v", 
+			"socketTimeoutMillis": 15000, 
+			"username": "admin", 
+			"password": "password", 
-			"enableEventReplication": true, 
-			"enabled": true, 
-			"syncDeletes": false, 
-			"syncProperties": true, 
-	 		"syncStatistics" : false,
-			"repoKey": "libs-release-local" 
		}
	]	 
}

+=mandatory; -=optional



Configure Checksum Replication

You can configure metadata replication in the target Artifactory so that metadata replication of artifacts occurs between a source Artifactory and the target Artifactory while artifact replication is done with storage level replication. The API can also set days to trust the replication, which allows the transfer for a limited number of days. Allows the usage of the checkBinaryExistenceinFilestore flag in the Pull/Push Replication API on the source Artifactory. For more information, see Optimizing Repository Replication Using Storage Level Synchronization Options .

Security: Requires an admin user.
Usage: PUT /api/config/storage/checksumReplication
Consumes: application/json

[
	{
+		"checkBinaryExistenceAllowed" : "<true | false>", 	// Allows the usage of the checkBinaryExistenceinFilestore flag in the Pull/Push Replication API on the source Artifactory.
-       "daysToTrust" : "<number of days to trust the replciation>" // The number of days for which the full checksum from target Artifactory is trusted. Useful for migration process. The value cannot be more than 30 days. The default is 0. Artifactory UI displays the remaining number of days to trust when the admin logs in.                 

	}
]

+=mandatory; -=optional
Since: 7.55.0
Sample Usage:

PUT /api/config/storage/checksumReplication
[
	{
	 	"checkBinaryExistenceAllowed" : "true"
	}
]



Get Checksum Replication

Gets the checksum replication status on the target Artifactory. The API returns the replication status and the date until which the days to trust expires.

Security: Requires an admin user.
Usage: GET /api/config/storage/checksumReplication
Consumes: application/json

Since: 7.55.0

Sample Usage

GET /api/config/storage/checksumReplication

#returns

{

 "checkBinaryExistenceAllowed": true,

 "trustUntil": "2023-03-25 21:46:46 +0200"

}

Delete Local Multi-push Replication 

Description:Deletes a local multi-push replication configuration. Supported by local repositories.
Notes: Requires an enterprise license
Security: Requires an admin user.
Usage DELETE /api/replications/{repoKey}?url={replicatedURL}
If the url parameter is omitted, all multi-push replication configurations for the source repository are deleted.
Producesapplication/json (application/vnd.org.jfrog.artifactory.replications.ReplicationConfigRequest+json),  application/json (application/vnd.org.jfrog.artifactory.replications.MultipleReplicationConfigRequest+json)
Since: 3.7
Sample Usage:

DELETE /api/replications/libs-release-local?url=http://10.0.0.1/artifactory/libs-release-local
 
//Delete all multi-push replication configurations for libs-release-local
DELETE /api/replications/libs-release-local

Enable or Disable Multiple Replications

Description: Enables/disables multiple replication tasks by repository or Artifactory server based in include and exclude patterns.
Notes: Requires Artifactory Pro
Security: Requires a privileged user
Usage: POST /api/replications/{enable | disable}
Consumes: application/json
Since: 4.4.3
Sample Usage:

//Enable/disable all push replications except those going out to http://artimaster:port/artifactory and https://somearti:port/artifactory/local-repo.
POST /api/replications/{enable | disable}
{
  "include" : [ "**" ],
  "exclude" : [ "http://artimaster:port/artifactory/**", "https://somearti:port/artifactory/local-repo" ]
}
 
//Enable/disable all push replications expect those going out to http://artidr:port/artifactory
POST /api/replications/{enable | disable}
{
  "include" : [ "**" ],
  "exclude" : [ "http://artidr:port/artifactory/**" ]
}

Get Global System Replication Configuration

Description: Returns the global system replication configuration status, i.e. if push and pull replications are blocked or unblocked.
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: GET /api/system/replications
Produces: application/json
Since: 4.7.2
Sample Usage:


GET /api/system/replications
{
 "blockPullReplications": false,
 "blockPushReplications": false
}

Get Remote Repositories Registered for Replication 

Description: Returns a list of all the instances subscribed for event-based pull replication for the specified repository.
NotesRequires Artifactory Pro
Security: Requires an admin user
Usage: GET api/replications/channels/{repo}
Produces: application/json
Since: 6.0.0
Sample Usage:


GET api/replications/channels/{repo}
["{ip}#{service id}", ...]
e.g.
["127.0.0.1#jfrt@fjhsdkjfhksjfdhkjdsfhk"]



Close all event based pull replication subscribed channels

Description: Close the connection of all the event based pull replication instances subscribed to this Artifactory, which force them to try to reopen connection. 
NotesRequires Artifactory Pro
Security: Requires an admin user
Usage: POST api/replications/channels/release
Produces: application/json
Since: 6.0.0
Sample Usage:


POST api/replications/channels/release

200 OK



Block System Replication

Description: Blocks replications globally. Push and pull are true by default. If false, replication for the corresponding type is not blocked.
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: POST api/system/replications/block?push=[true|false]&pull=[true|false]
Produces: text/plain
Since: 4.7.2
Sample Usage:


POST /api/system/replications/block
Successfully blocked all replications, no replication will be triggered.

Unblock System Replication

Description: Unblocks replications globally. Push and pull are true by default. If false, replication for the corresponding type is not unblocked.
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: POST api/system/replications/unblock?push=[true|false]&pull=[true|false]
Produces: text/plain
Since: 4.7.2
Sample Usage:


POST /api/system/replications/unblock
Successfully unblocked all replications



Artifact Sync Download

Description: Downloads an artifact with or without returning the actual content to the client. When tracking the progress marks are printed (by default every 1024 bytes). This is extremely useful if you want to trigger downloads on a remote Artifactory server,
for example to force eager cache population of large artifacts, but want to avoid the bandwidth consumption involved in transferring the artifacts to the triggering client. If no content parameter is specified the file content is downloaded to the client.
Notes: This API requires Artifactory Pro.
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/download/{repoKey}/{filePath}[?content=none/progress][&mark=numOfBytesToPrintANewProgressMark]
Produces: application/octet-stream, text/plain (depending on content type)
Since: 2.2.2
Sample Output:

GET /api/download/my-remote/org/acme/1.0/acme-1.0.jar?content=progress&mark=512
.....................................................
.....................................................
.....

Completed: 150/340 bytes

Folder Sync (Deprecated)

Description: Triggers a no-content download of artifacts from a remote Artifactory repository for all artifacts under the specified remote folder. Can optionally delete local files if they do not exist in the remote folder,
overwrite local files only if they are older than remote files or never overwrite local files.
The default is not to delete any local files and to overwrite older local files with remote ones. By default progress marks of the sync are displayed. The default timeout for the remote file list is 15000 milliseconds (15 seconds).
Notes: This API is deprecated. Requires Artifactory Pro
Security: Requires a privileged user (can be anonymous) For non-admin users will replicate at max the number of files as defined by the artifactory.search.userQueryLimit system property.
Usage: GET /api/sync/{remoteRepositoryKey}/{folderPath}[?progress=showProgress][&mark=numOfBytesToPrintANewProgressMark][&delete=deleteExistingFiles][&overwrite=never/force][&timeout=fileListTimeoutInMillis]
Produces: text/plain
Since: 2.2.4
Sample Output:

GET /api/sync/my-remote/org/acme/1.0?progress=1&delete=1
.....................................................
.....................................................
.....................................................
..........................................

Completed: 970/1702 bytes
.....................................................
..................
Completed: 1702/1702 bytes
Completed with 0 errors and 2 warnings (please check the server log for more details).

File List

Description: Get a flat (the default) or deep listing of the files and folders (not included by default) within a folder.
For deep listing you can specify an optional depth to limit the results.
Optionally include a map of metadata timestamp values as part of the result (only properties are displayed in since 3.0.0).
folder inclusion since 2.3.2; checksum inclusion since: 2.3.3; include folder root path since: 2.5.2. Supported by all types of repositories.
Since: 2.2.4
Notes: Requires Artifactory Pro
Security: Requires a non-anonymous privileged user.
Usage: GET /api/storage/{repoKey}/{folder-path}?list[&deep=0/1][&depth=n][&listFolders=0/1][&mdTimestamps=0/1][&includeRootPath=0/1]
Produces: application/json (application/vnd.org.jfrog.artifactory.storage.FileList+json)
Sample Output:

GET /api/storage/libs-release-local/org/acme?list&deep=1&listFolders=1&mdTimestamps=1
{
"uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme",
"created": ISO8601,
"files" : [
  {
  "uri": "/archived",
  "size": "-1",
  "lastModified": ISO8601,
  "folder": "true"
  },
  {
  "uri": "/doc.txt",
  "size": "253207", //bytes
  "lastModified": ISO8601,
  "folder": "false",
  "sha1": sha1Checksum,
  "mdTimestamps": { "properties" : lastModified (ISO8601) }
  },
  {
  "uri": "/archived/doc1.txt",
  "size": "253100", //bytes
  "lastModified": ISO8601,
  "folder": "false",
  "sha1": sha1Checksum,
  "mdTimestamps": { "properties" : lastModified (ISO8601) }
  },...
]
}

Get Background Tasks

Description: Returns list of background tasks currently scheduled or running in Artifactory. In HA, the nodeId is added to each task. Task can be in one of few states: scheduled, running, stopped, cancelled. Running task also shows the task start time.
Since: 4.4.0
Security: Requires a valid admin user
Usage: GET /api/tasks
Produces: application/json
Sample Output:

 {
 "tasks" : [ {
 "id" : "artifactory.UpdateIndicesJob#d7321feb-6fd9-4e27-8f0e-954137be855b",
 "type" : "org.artifactory.addon.gems.index.GemsVirtualIndexHandler$UpdateIndicesJob",
 "state" : "scheduled",
 "description" : "Gems Virtual Repositories Index Calculator",
 "nodeId" : "artifactory-primary"
 }, {
 "id" : "artifactory.VirtualCacheCleanupJob#82bb1514-ea34-4a71-940d-78a61887981e",
 "type" : "org.artifactory.repo.cleanup.VirtualCacheCleanupJob",
 "state" : "scheduled",
 "description" : "",
 "nodeId" : "artifactory-primary"
 }, {
 "id" : "artifactory.BinaryStoreGarbageCollectorJob#039664ac-990d-4a32-85e1-decd0b508142",
 "type" : "org.artifactory.storage.binstore.service.BinaryStoreGarbageCollectorJob",
 "state" : "running",
 "started" : "2015-05-15T15:39:37.566+02:00"
 "description" : "Binaries Garbage Collector",
 "nodeId" : "artifactory-primary"
 } ]
}

Get RubyGem Version List

Description: Returns the list of versions and other metadata associated with a specific Ruby gem. 
Since: 7.49.3
Security: Requires an authenticated user.
Usage: GET /artifactory/api/gems/{repoName}/api/v1/versions/{gemName}.<json|yaml>
Produces: application/json or application/yaml
Sample Output:

[
    {
        "authors": "Jason Frey, Mo Morsi, Joe Rafaniello, Ken Dreyer, Achilleas Pipinellis, Josef Stribny, Dominic Cleal",
        "built_at": "2015-08-03T00:00:00.000Z",
        "created_at": "2015-08-03T16:44:53.922Z",
        "description": "General API and utility scripts to manipulate and query ruby gems and projects after being published",
        "downloads_count": 3134,
        "metadata": {},
        "number": "0.11.1",
        "summary": "Ruby Project Post-Publishing Processor",
        "platform": "ruby",
        "ruby_version": ">= 0",
        "prerelease": false,
        "licenses": [
            "MIT"
        ],
        "requirements": [
            "json (RubyGem)",
            "curb (RubyGem)",
            "i18n (RubyGem)",
            "pkgwat (RubyGem)",
            "awesome_spawn (RubyGem)",
            "gem2rpm (RubyGem)",
            "versionomy (RubyGem)",
            "vcr (RubyGem)",
            "webmock (RubyGem)",
            "git",
            "diff",
            "fedpkg",
            "md5sum",
            "koji",
            "yum",
            "rpmdev-packager (from rpmdevtools)"
        ],
        "sha": "7a89428951ecd4a19797efbfc4e52f93d1c76f3e97f168615de435b16e150a8c"
    }
]



Get the Open Metrics for Artifactory

Description: Returns the open metrics collected for Artifactory.
Security: Requires an admin user
Usage: GET /api/v1/metrics
Produces: text/plain (in Open Metrics format Link: <https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format>)

Sample Usage:

GET /api/v1/metrics

If metrics is not enabled - empty text.
If enabled : 
# HELP sys_cpu_totaltime_seconds Total cpu time from the threads in seconds
# UPDATED sys_cpu_totaltime_seconds 1595837402515
# TYPE sys_cpu_totaltime_seconds gauge
sys_cpu_totaltime_seconds 129.909 1595837402516
# HELP app_disk_total_bytes Used bytes for app home directory disk device
# UPDATED app_disk_total_bytes 1595837402515
# TYPE app_disk_total_bytes gauge
app_disk_total_bytes 1.038806e+11 1595837402516
# HELP app_disk_free_bytes Free bytes for app home directory disk device
# UPDATED app_disk_free_bytes 1595837402515
# TYPE app_disk_free_bytes gauge
app_disk_free_bytes 1.009052e+11 1595837402516
# HELP jfrt_artifacts_gc_duration_seconds Time taken for garbage collection
# UPDATED jfrt_artifacts_gc_duration_seconds 1595837402515
# TYPE jfrt_artifacts_gc_duration_seconds gauge
jfrt_artifacts_gc_duration_seconds{end="1595837400008",start="1595837400001",status="COMPLETED",type="TRASH_AND_BINARIES"} 0.007 1595837402516
# UPDATED jfrt_http_connections_available_total 1602763596303
jfrt_http_connections_available_total{max="50",pool="insight-remote-1602763529314"} 46 1602763596305
# UPDATED jfrt_http_connections_leased_total 1602763596303
jfrt_http_connections_leased_total{max="50",pool="insight-remote-1602763529314"} 0 1602763596305
# UPDATED jfrt_http_connections_pending_total 1602763596303
jfrt_http_connections_pending_total{max="50",pool="insight-remote-1602763529314"} 0 1602763596305
# UPDATED jfrt_http_connections_max_total 1602763596303
jfrt_http_connections_max_total{max="50",pool="insight-remote-1602763529314"} 50 1602763596305
# UPDATED jfrt_runtime_heap_freememory_bytes 1602763596303
jfrt_runtime_heap_freememory_bytes 9.229538e+08 1602763596305
# UPDATED jfrt_runtime_heap_maxmemory_bytes 1602763596303
jfrt_runtime_heap_maxmemory_bytes 2.147484e+09 1602763596305
# UPDATED jfrt_runtime_heap_totalmemory_bytes 1602763596303
jfrt_runtime_heap_totalmemory_bytes 2.147484e+09 1602763596305
# UPDATED jfrt_runtime_heap_processors_total 1602763596303
jfrt_runtime_heap_processors_total 4 1602763596305
# UPDATED sys_cpu_totaltime_seconds 1602763596305
sys_cpu_totaltime_seconds 1576.388 1602763596305
# UPDATED app_disk_total_bytes 1602763596301
app_disk_total_bytes 1.038806e+11 1602763596305
# UPDATED app_disk_free_bytes 1602763596301
app_disk_free_bytes 9.599553e+10 1602763596305

Empty Trash Can

Description: Empties the trash can permanently deleting all its current contents.
Notes: Requires Artifactory Pro
Security: Requires a valid admin user
Usage: POST /api/trash/empty
Since: 4.4.3


Delete Item From Trash Can

Description: Permanently deletes an item from the trash can.
Notes: Requires Artifactory Pro
Security: Requires a valid admin user
Usage: DELETE /api/trash/clean/{repoName/path}
Since: 4.4.3
Sample usage:

DELETE /api/trash/clean/npm-local

Restore Item from Trash Can

Description: Restore an item from the trash can.
Notes: Requires Artifactory Pro
Security: Requires a valid admin user
Usage: POST /api/trash/restore/{from path}?to={to path}
Since: 4.4.3
Sample usage:

POST /api/trash/restore/npm-local?to=npm-local2
 
Successfully restored trash items

Run Garbage Collection

Description: Run Garbage Collection
Since: 2.0.0
Security: Requires an admin user.
Usage: POST /api/system/storage/gc
Produces:  text/plain
Sample Usage:

POST /api/system/storage/gc

200 OK

Optimize System Storage

Description: Raises a flag to invoke balancing between redundant storage units of a sharded filestore following the next garbage collection.
Since: 4.6.0
Notes: This is an advanced feature intended for administrators. 
Security: Requires a valid admin user.
Usage: POST /api/system/storage/optimize
Produces:  text/plain
Sample Usage:

POST /api/system/storage/optimize

200 OK

Get Puppet Modules

Description: Returns a list of all Puppet modules hosted by the specified repository. Results are paginated and all of the parameters in the pagination section are optional. 
Notes:  Requires Artifactory Pro. This endpoint will work only on local and remote repositories. 
Usage:  GET /api/puppet/{repoKey}/v3/modules
Security:  Requires a privileged user (can be anonymous)
Produces:  application/json

{
  "total": 0,
  "limit": 0,
  "offset": 0,
  "current": "uri",
  "next": "uri",
  "previous": "uri",
  "results": [
    {
      "uri": "uri",
      "name": "",
      "downloads": 0,
      "created_at": "date-time",
      "updated_at": "date-time",
      "supported": false,
      "owner": {
        "uri": "",
        "username": ""
      },
      "current_release": {
        "uri": "",
        "version": "",
        "module": "object",
        "metadata": "object",
        "tags": [
          ""
        ],
        "supported": false,
        "file_size": 0,
        "file_md5": "",
        "downloads": 0,
        "readme": "",
        "changelog": "",
        "license": "",
        "created_at": "date-time",
        "updated_at": "date-time",
        "deleted_at": "date-time"
      },
      "releases": [
        {
          "uri": "uri",
          "version": ""
        }
      ],
      "homepage_url": "uri",
      "issues_url": "uri"
    }
  ]
}


Sample Usage:

GET /api/puppet/puppet-local/v3/modules/
Response:
{
  "pagination" : {
    "limit" : 20,
    "offset" : 0,
    "first" : "/v3/modules?limit=20&offset=0",
    "previous" : null,
    "current" : "/v3/modules?limit=20&offset=0",
    "next" : null,
    "total" : 1
  },
  "results" : [ {
    "uri" : "/v3/modules/maestrodev-wget",
    "slug" : "maestrodev-wget",
    "name" : "wget",
    "downloads" : 0,
    "created_at" : "2017-07-16 12:07:715 +0300",
    "updated_at" : "2017-07-16 12:07:00 +0300",
    "supported" : false,
    "endorsement" : null,
    "module_group" : "base",
    "owner" : {
      "uri" : "/v3/users/maestrodev",
      "slug" : "maestrodev",
      "username" : "maestrodev",
      "gravatar_id" : null
    },
    "current_release" : {
      "uri"
...
  } ]
}



Get Puppet Module

Description: Returns information about a specific Puppet module.
Notes:  Requires Artifactory Pro. This endpoint will work only on local and remote repositories.  
Usage:  GET /api/puppet/{repoKey}/v3/modules/{user}-{module}
Security:  Requires a privileged user (can be anonymous)
Produces:  application/json

{
  "uri": "uri",
  "name": "",
  "downloads": 0,
  "created_at": "date-time",
  "updated_at": "date-time",
  "supported": false,
  "owner": {
    "uri": "",
    "username": ""
  },
  "current_release": {
    "uri": "",
    "version": "",
    "module": "object",
    "metadata": "object",
    "tags": [
      ""
    ],
    "supported": false,
    "file_size": 0,
    "file_md5": "",
    "downloads": 0,
    "readme": "",
    "changelog": "",
    "license": "",
    "created_at": "date-time",
    "updated_at": "date-time",
    "deleted_at": "date-time"
  },
  "releases": [
    {
      "uri": "uri",
      "version": ""
    }
  ],
  "homepage_url": "uri",
  "issues_url": "uri"
}



Get Puppet Releases

Description: Returns a list of all Puppet releases hosted by the specified repository. Results are paginated and all of the parameters in the pagination section are optional.

Notes: Requires Artifactory Pro. This endpoint will work only on local and remote repositories.  
Usage: GET /api/puppet/{repoKey}/v3/releases
Security: Requires a privileged user (can be anonymous)
Produces: application/json

{
  "total": 0,
  "limit": 0,
  "offset": 0,
  "current": "uri",
  "next": "uri",
  "previous": "uri",
  "results": [
    {
      "uri": "uri",
      "version": "",
      "module": {
        "uri": "",
        "name": ""
      },
      "metadata": "object",
      "tags": [
        ""
      ],
      "supported": false,
      "file_size": 0,
      "file_md5": "",
      "downloads": 0,
      "readme": "",
      "changelog": "",
      "license": "",
      "created_at": "date-time",
      "updated_at": "date-time",
      "deleted_at": "date-time"
    }
  ]
}

Get Puppet Release

Description: Returns information about the specific Puppet module's release.
Notes: Requires Artifactory Pro. This endpoint will work only on local and remote repositories.  
Usage: GET /api/puppet/{repoKey}/v3/releases/{user}-{module}-{version}
Security: Requires a privileged user (can be anonymous)
Produces: application/json

{
  "uri": "uri",
  "version": "",
  "module": {
    "uri": "",
    "name": ""
  },
  "metadata": "object",
  "tags": [
    ""
  ],
  "supported": false,
  "file_size": 0,
  "file_md5": "",
  "downloads": 0,
  "readme": "",
  "changelog": "",
  "license": "",
  "created_at": "date-time",
  "updated_at": "date-time",
  "deleted_at": "date-time"
}

COLD ARTIFACT STORAGE

The sections below provide a comprehensive listing of the REST resources exposed by Cold Artifact Storage. These API calls must be performed on the Live Artifactory instance.

Authentication

To use your API key for Basic Authentication, it must be generated using Artifactory 7.27.3 or later. If generated using a previous version, you must regenerate your API key and use the new key as a password for basic authentication.

Base URL

The Platform REST URL is constructed of: 

<Live_Artifactory_URL>/<Service Context>/api/

For example

# Using your JFrog URL 
http://myjfrog.acme.org/artifactory/api/retention

# Using your Live Artifactory server hostname and the Artifactory router port
http://LIVE_ARTIFACTORY_SERVER_HOSTNAME:8081/artifactory/api/retention

Example - Running an Archive Policy

The example below demonstrates how to invoke the Run Archive Policy REST API with the following assumptions:

  • You are using cURL from the Unix command line, and are presently working from the home (~) directory of the admin user 'myUser'

  • You have the Live Artifactory instance running on your local system on  port 8082
  • You wish to run an archive policy called myPolicy

  • You have configured an admin user named 'myUser', with the password 'myP455w0rd!'

  • Your API Key is ' ABcdEF '

To execute a call using basic authentication, you would use the following command:

curl -u myUser:myP455w0rd! -X POST http://SERVER_HOSTNAME:8082/artifactory/api/retention/archive/policies/mPolicy/trigger

To execute a call using your  API Key  for basic authentication, you would use the following command:

curl -u myUser:ABcdEF -X POST http://SERVER_HOSTNAME:8082/artifactory/api/retention/archive/policies/mPolicy/trigger

To execute a call using your  API Key  in a header, you would use the following command:

curl -H "X-JFrog-Art-Api:ABcdEF" -X POST http://SERVER_HOSTNAME:8082/artifactory/api/retention/archive/policies/mPolicy/trigger

To execute a call using an  access token   for basic authentication, you would use the following command:

curl -u myUser:<Token> -X POST http://SERVER_HOSTNAME:8082/artifactory/api/retention/archive/policies/mPolicy/trigger

To execute a call   access token   in a header, you would use the following command:

curl -H "Authorization: Bearer <Token>" -X POST http://SERVER_HOSTNAME:8082/artifactory/api/retention/archive/policies/mPolicy/trigger

Create an Archive Policy

Description: Creates a new archive policy in Artifactory using the provided policy configuration.
Note:  This Cold Artifact Storage feature is  available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
Security Requires an admin user
Usage : POST  /api/retention/archive/policies/{key}
Produces : application/json
Consumes : application/json
Request Parameters :

ParametersTypeDescriptionRequired/Optional
keystringUnique policy key that identifies the policy.Required

enabled

boolean

Enable/disable policy. If disabled, policy execution is blocked.

Required

cronExpstring

The Cron expression for scheduling the policy.

Required
aqlQuerystring

Search for artifacts to be archived using Artifactory Query Language (AQL) . This can be used instead of searchCriteriaForm  to include/exclude artifacts in the retention policy.

The AQL query can be to:

    • Include or exclude a repository, inner path, or artifact name (one or many)
    • Include or exclude associated properties (one or many)
    • Include an age 
      • Last downloaded before configurable X (weeks, months, years)
      • Deployed before configurable X (weeks, months, years)

You may run AQL queries only on the Item domain. Other primary domains, such as   Build,   Entry,   Promotion,  and   Release are not supported.

Required if searchCriteriaForm is not provided

searchCriteriaForm

string

Search Criteria Form for retention policy. This can be used instead of aqlQuery to include/exclude artifacts in the retention policy.

Required i f aqlQuery is not provided

descriptionstringDescription for the policy.Optional

durationInMinutes

long

The maximum duration (in minutes) for policy execution. If policy execution exceeds this period, it is stopped.

Optional

expirationTimeInMonthslong

The expiration period (in months) that it takes for archived artifacts to be cleaned up from the Cold instance.

Optional

skipTrashcan

boolean

Prevent the transfer of the artifacts to the trash can repository, and allow the artifacts to be deleted by a full GC cleanup.

Default value is false.

Optional

Search Criteria Form 

Field

Type

Description

properties

string

Include/Exclude all properties with the specified propertyKey and a single propertyValue

Supports and/or operator.

    "properties": {
      "include": {
        "operator": "or",
        "values": [
          {
            "propertyKey": "example-prop-key-1",
            "propertyValue": "prop-val-1"
          },
          {
            "propertyKey": "example-prop-key-1",
            "propertyValue": "prop-val-2"
          }
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          {
            "propertyKey": "example-prop-key-2",
            "propertyValue": "prop-val-1"
          }
        ]
      }
    }

repositories

string

Include/Exclude all repository keys.

Supports and/or operator.

Example
    "repositories": {
      "include": {
        "operator": "or",
        "values": [
          "repo-1",
          "repo-2"
        ]
      },
      "exclude": {
        "operator": "and",
        "values": [
          "repo-*",
          "*-3"
        ]
      }
    }

path

string

Include/Exclude all items with specified paths

Supports and/or operator.

Example
    "paths": {
      "include": {
        "operator": "or",
        "values": [
          "path-1",
          "path-2"
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          "path-3"
        ]
      }
    }

name

string

Include/Exclude all items with the specified names.

Supports and/or operator.

Example
    "names": {
      "include": {
        "operator": "or",
        "values": [
          "name-1",
          "name-2"
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          "name-3"
        ]
      }
    }

createdBefore

long

Include all items that were created before the time provided (in months)

downloaded Before

long

Include all items that were last downloaded before the time provided (in months)

Sample Request: Using aqlQuery parameter

POST /api/retention/archive/policies/example-policy-key
{
   "key": "example-policy-key",
   "enabled": true,
   "description": "policy description",
   "aqlQuery": "items.find({\"type\":{\"$eq\":\"file\"}})",
   "cronExp": "0 15 10 L * ?",
   "durationInMinutes": 0,
   "expirationTimeInMonths": 0,
   "skipTrashcan": true
}

Sample Response : For aqlQuery parameter

{
   "key": "example-policy-key",
   "enabled": true,
   "description": "policy description",
   "aqlQuery": "items.find({\"type\":{\"$eq\":\"file\"}})",
   "cronExp": "0 15 10 L * ?",
   "durationInMinutes": 0,
   "expirationTimeInMonths": 0,
   "skipTrashcan": true
}

Sample Request: Using  searchCriteriaForm  parameter

POST /api/retention/archive/policies/example-policy-key
{
  "key": "myPolicy",
  "description": "Demo policy - archive using search criteria form",
  "enabled": true,
  "searchCriteriaForm": {
    "properties": {
      "include": {
        "values": [{
            "propertyKey":"sd",
            "propertyValue":"sd"
        }]
      },
      "exclude": {
        "values": [
        ]
      }
    },
    "repositories": {
      "include": {
        "values": [
          "include-*",
          "*-repo"
        ]
      },
      "exclude": {
        "values": []
      }
    },
    "paths": {
      "include": {
        "values": []
      },
      "exclude": {
        "values": [
          "exclude-*",
          "*-path"
        ]
      }
    },
    "createdBefore":2,
    "downloadedBefore":3
}
}

Sample Response: Using searchCriteriaForm parameter

{
    "key": "myPolicy",
    "enabled": true,
    "description": "Demo policy - archive using search criteria form",
    "durationInMinutes": 0,
    "expirationTimeInMonths": 0,
    "skipTrashcan": false,
    "searchCriteriaForm": {
        "properties": {
            "include": {
                "operator": "or",
                "values": [
                    {
                        "propertyKey": "sd",
                        "propertyValue": "sd"
                    }
                ]
            },
            "exclude": {
                "operator": "or",
                "values": []
            }
        },
        "repositories": {
            "include": {
                "operator": "or",
                "values": [
                    "include-*",
                    "*-repo"
                ]
            },
            "exclude": {
                "operator": "or",
                "values": []
            }
        },
        "paths": {
            "include": {
                "operator": "or",
                "values": []
            },
            "exclude": {
                "operator": "or",
                "values": [
                    "exclude-*",
                    "*-path"
                ]
            }
        },
        "createdBefore": 2,
        "downloadedBefore": 3
    }
}

Status

201: Success

409: If a policy with the specified policyKey already exists, the call fails with a 409 response.


Convert Search Criteria Form to AQL

DescriptionGenerates an AQL query according to the given search criteria form. The generated AQL query can then be used to perform a search.

Note:  This Cold Artifact Storage feature is  available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3

SecurityRequires an admin user
UsagePOST /api/retention/archive/policies/convertToAql
Produces: application/json

Consumes text/plain

Query Parameters:

Field

Type

Description

properties

string

Include/Exclude all properties with the specified “propertyKey” and a single “propertyValue”. 

Supports and/or operator.

    "properties": {
      "include": {
        "operator": "or",
        "values": [
          {
            "propertyKey": "example-prop-key-1",
            "propertyValue": "prop-val-1"
          },
          {
            "propertyKey": "example-prop-key-1",
            "propertyValue": "prop-val-2"
          }
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          {
            "propertyKey": "example-prop-key-2",
            "propertyValue": "prop-val-1"
          }
        ]
      }
    }

repositories

string

Include/Exclude all repository keys.

Supports and/or operator.

Example
    "repositories": {
      "include": {
        "operator": "or",
        "values": [
          "repo-1",
          "repo-2"
        ]
      },
      "exclude": {
        "operator": "and",
        "values": [
          "repo-*",
          "*-3"
        ]
      }
    }

path

string

Include/Exclude all items with specified paths

Supports and/or operator.

Example
    "paths": {
      "include": {
        "operator": "or",
        "values": [
          "path-1",
          "path-2"
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          "path-3"
        ]
      }
    }

name

string

Include/Exclude all items with the specified names.

Supports and/or operator.

Example
    "names": {
      "include": {
        "operator": "or",
        "values": [
          "name-1",
          "name-2"
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          "name-3"
        ]
      }
    }

createdBefore

long

Include all items that were created before the time provided (in months)

downloaded Before

long

Include all items that were last downloaded before the time provided (in months)

Sample Request :

POST /api/retention/archive/policies/convertToAql
{
    "properties": {
      "include": {
        "operator": "or",
        "values": [
          {
            "propertyKey": "example-prop-key-1",
            "propertyValue": "prop-val-1"
          },
          {
            "propertyKey": "example-prop-key-1",
            "propertyValue": "prop-val-2"
          }
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          {
            "propertyKey": "example-prop-key-2",
            "propertyValue": "prop-val-1"
          }
        ]
      }
    },
    "repositories": {
      "include": {
        "operator": "or",
        "values": [
          "repo-1",
          "repo-2"
        ]
      },
      "exclude": {
        "operator": "and",
        "values": [
          "repo-*",
          "*-3"
        ]
      }
    },
    "paths": {
      "include": {
        "operator": "or",
        "values": [
          "path-1",
          "path-2"
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          "path-3"
        ]
      }
    },
    "names": {
      "include": {
        "operator": "or",
        "values": [
          "name-1",
          "name-2"
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          "name-3"
        ]
      }
    },
    "createdBefore": 1628668945,
    "downloadedBefore": 1628668945
    }

Sample Response :

items.find(
  {
    "$and": [
        {
            "$or": [
                {
                    "@example-prop-key-1": {
                        "$match": "prop-val-1"
                    }
                },
                {
                    "@example-prop-key-1": {
                        "$match": "prop-val-2"
                    }
                }
            ]
        },
        {
            "$or": [
                {
                    "@example-prop-key-2": {
                        "$nmatch": "prop-val-1"
                    }
                }
            ]
        },
        {
            "$or": [
                {
                    "repo": {
                        "$match": "repo-1"
                    }
                },
                {
                    "repo": {
                        "$match": "repo-2"
                    }
                }
            ]
        },
        {
            "$and": [
                {
                    "repo": {
                        "$nmatch": "repo-*"
                    }
                },
                {
                    "repo": {
                        "$nmatch": "*-3"
                    }
                }
            ]
        },
        {
            "$or": [
                {
                    "path": {
                        "$match": "path-1"
                    }
                },
                {
                    "path": {
                        "$match": "path-2"
                    }
                }
            ]
        },
        {
            "$or": [
                {
                    "path": {
                        "$nmatch": "path-3"
                    }
                }
            ]
        },
        {
            "$or": [
                {
                    "name": {
                        "$match": "name-1"
                    }
                },
                {
                    "name": {
                        "$match": "name-2"
                    }
                }
            ]
        },
        {
            "$or": [
                {
                    "name": {
                        "$nmatch": "name-3"
                    }
                }
            ]
        },
        {
            "created": {
                "$lt": "1628668945"
            }
        },
        {
            "stat.downloaded": {
                "$lt": "1628668945"
            }
        }
    ]
}
)

Status

200: Success


Run an Archive Policy

Description: Runs an archive policy based on the provided policy key.
Note: This Cold Artifact Storage feature is available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
SecurityRequires an admin user
Usage: POST /api/retention/archive/policies/{key}/trigger
URL Parameters :

ParametersTypeDescriptionRequired/Optional
keystringKey of the policy that needs to be run.Required

Sample Request:

POST /api/retention/archive/policies/example-policy-key/trigger

Sample Response :

Retention policy ‘example-policy-key’ execution request has been accepted for processing.

Status

200: Success


Update an Archive Policy

Description: Updates an existing archive policy based on the policy key.
Note: This Cold Artifact Storage feature is available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
SecurityRequires an admin user
Usage: PUT  /api/retention/archive/policies/{key}
Produces: application/json
Consumes : application/json
Request Parameters :

ParametersTypeDescriptionRequired/Optional
keystringUnique policy key that identifies the policy.Required

enabled

boolean

Enable/disable policy. If disabled, policy execution is blocked.

Required

cronExpstring

The Cron expression for scheduling the policy.

Required
aqlQuerystring

Search for artifacts to be archived using Artifactory Query Language (AQL) . This can be used instead of searchCriteriaForm  to include/exclude artifacts in the retention policy.

The AQL query can be based on these properties:

    • Include or exclude repository and an inner path (one or many)
    • Include or exclude associated properties (one or many)
    • Include an age 
      • Last downloaded before configurable X (weeks, months, years)
      • Deployed before configurable X (weeks, months, years)
Required if searchCriteriaForm is not provided

searchCriteriaForm

string

Search Criteria Form for retention policy. This can be used instead of aqlQuery to include/exclude artifacts in the retention policy.

Required i f aqlQuery is not provided

descriptionstringDescription for the policy.Optional

durationInMinutes

long

The maximum duration (in minutes) for policy execution. If policy execution exceeds this period, it is stopped.

Default value is 0.

Optional


expirationTimeInMonthslong

The expiration period (in months) that it takes for archived artifacts to be cleaned up from the Cold instance.

Default value is 0.

Optional

skipTrashcan

boolean

Prevent the transfer of the artifacts to the trash can repository, and allow the artifacts to be deleted by a full GC cleanup.

Default value is false.

Optional

Search Criteria Form 

Field

Type

Description

properties

string

Include/Exclude all properties with the specified "propertyKey" and a single "propertyValue". 

Supports and/or operator.

    "properties": {
      "include": {
        "operator": "or",
        "values": [
          {
            "propertyKey": "example-prop-key-1",
            "propertyValue": "prop-val-1"
          },
          {
            "propertyKey": "example-prop-key-1",
            "propertyValue": "prop-val-2"
          }
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          {
            "propertyKey": "example-prop-key-2",
            "propertyValue": "prop-val-1"
          }
        ]
      }
    }

repositories

string

Include/Exclude all repository keys.

Supports and/or operator.

Example
    "repositories": {
      "include": {
        "operator": "or",
        "values": [
          "repo-1",
          "repo-2"
        ]
      },
      "exclude": {
        "operator": "and",
        "values": [
          "repo-*",
          "*-3"
        ]
      }
    }

path

string

Include/Exclude all items with specified paths

Supports and/or operator.

Example
    "paths": {
      "include": {
        "operator": "or",
        "values": [
          "path-1",
          "path-2"
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          "path-3"
        ]
      }
    }

name

string

Include/Exclude all items with the specified names.

Supports and/or operator.

Example
    "names": {
      "include": {
        "operator": "or",
        "values": [
          "name-1",
          "name-2"
        ]
      },
      "exclude": {
        "operator": "or",
        "values": [
          "name-3"
        ]
      }
    }

createdBefore

long

Include all items that were created before the relative time provided (such as, 2 years ago, 3 months ago)

downloaded Before

long

Include all items that were last downloaded before the relative time provided (such as, 2 years ago, 3 months ago)

Sample Request Using aqlQuery parameter

PUT /api/retention/archive/policies/example-policy-key
{
   "key": "example-policy-key",
   "enabled": true,
   "description": "policy description",
   "aqlQuery": "items.find({\"type\":{\"$eq\":\"file\"}})",
   "cronExp": "0 15 10 L * ?",
   "durationInMinutes": 0,
   "expirationTimeInMonths": 0,
   "skipTrashcan": true
}

Sample Response: For aqlQuery parameter

{
   "key": "example-policy-key",
   "enabled": true,
   "description": "policy description",
   "aqlQuery": "items.find({\"type\":{\"$eq\":\"file\"}})",
   "cronExp": "0 15 10 L * ?",
   "durationInMinutes": 0,
   "expirationTimeInMonths": 0,
   "skipTrashcan": true
}

Sample Request: Using  searchCriteriaForm  parameter

{
  "key": "myPolicy",
  "description": "Demo policy - archive using search criteria form",
  "enabled": false,
  "searchCriteriaForm": {
    "properties": {
      "include": {
        "values": [{
            "propertyKey":"updated",
            "propertyValue":"updated"
        }]
      },
      "exclude": {
        "values": [
        ]
      }
    },
    "repositories": {
      "include": {
        "values": [
          "include-*",
          "*-repo"
        ]
      },
      "exclude": {
        "values": []
      }
    },
    "paths": {
      "include": {
        "values": []
      },
      "exclude": {
        "values": [
          "exclude-*",
          "*-path"
        ]
      }
    },
    "createdBefore":2,
    "downloadedBefore":3
}
}

Sample Response: : Using searchCriteriaForm parameter

{
    "key": "myPolicy",
    "enabled": false,
    "description": "Demo policy - archive using search criteria form",
    "durationInMinutes": 0,
    "expirationTimeInMonths": 0,
    "skipTrashcan": false,
    "searchCriteriaForm": {
        "properties": {
            "include": {
                "operator": "or",
                "values": [
                    {
                        "propertyKey": "updated",
                        "propertyValue": "updated"
                    }
                ]
            },
            "exclude": {
                "operator": "or",
                "values": []
            }
        },
        "repositories": {
            "include": {
                "operator": "or",
                "values": [
                    "include-*",
                    "*-repo"
                ]
            },
            "exclude": {
                "operator": "or",
                "values": []
            }
        },
        "paths": {
            "include": {
                "operator": "or",
                "values": []
            },
            "exclude": {
                "operator": "or",
                "values": [
                    "exclude-*",
                    "*-path"
                ]
            }
        },
        "createdBefore": 2,
        "downloadedBefore": 3
    }
}

Status

201: Success


Stop Policy Execution

Description: Stops the execution of an archive policy based on the policy key.
Note: This Cold Artifact Storage feature is available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
SecurityRequires an admin user
UsagePOST /api/retention/archive/policies/{key}/stop
Produces: application/json
Consumes : application/json
Query Parameters :

ParametersTypeDescriptionRequired/Optional
keystringUnique policy key that identifies the policy to be stopped.Required

Sample Request :

POST /api/retention/archive/policies/{key}/stop
POST /api/retention/archive/policies/{key}/stop

Status

202


Delete an Archive Policy

Description: Deletes an existing archive policy based on policy key.
Note: This Cold Artifact Storage feature is available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
SecurityRequires an admin user
Usage: DELETE  /api/retention/archive/policies/{key}
URL Parameters :

ParametersTypeDescriptionRequired/Optional
keystringKey of the policy that needs to be deleted.Required

Sample Request:

DELETE /api/retention/archive/policies/example-policy-key

Sample Response :

Retention policy example-policy-key was deleted successfully.

Status

201: Success


Get all Archive Policies

Description: Returns a list of all available archive policies.

The response displays the following information: 

PropertyDescription
keyUnique policy key that identifies the policy.
enabledIf the policy is enabled/disabled for execution.
descriptionDescription for the policy.
aqlQuery

The Artifactory Query Language (AQL) query used to s earch for the artifacts to be archived.

cronExpThe Cron expression used for scheduling the archive policy.
nextExecutionTimeTime when the policy is scheduled to run next. This depends on the cronExp and the previous execution time.
durationInMinutes

The maximum duration (in minutes) for policy execution. 

lastRunStatus

Shows the status of the last policy run. It can be one of the following:

  • PENDING: The policy has never been executed.
  • IN_PROGRESS: The policy execution is in progress.
  • IN_PROGRESS_WITH_ERORS: The policy execution is in progress but encountered one or more errors.
  • COMPLETE: The policy executed successfully without any errors.
  • COMPLETE_WITH_ERRORS: The policy executed, but encountered one or more errors.
  • FAILED: The policy execution failed.
totalNumberOfArtifactsTotal number of artifacts to be archived.
completedNumberOfArtifactsTotal number of artifacts that were successfully archived.
failedNumberOfArtifactsTotal number of artifacts that could not be archived.
progressPercentageThe progress of the archive policy (in percentage).
startTimeTime when the policy started executing. Value is in Unix epoch time in milliseconds.
finishTimeTime when the policy finished executing. Value is in Unix epoch time in milliseconds.
totalByteSizeThe total size of the artifacts included in the policy.
successByteSizeThe size of the artifacts that were archived.
failureByteSizeThe size of the artifacts that couldn't be archived.
expirationTimeInMonthsThe expiration period (in months) that it takes for archived artifacts to be cleaned up from the Cold instance.
skipTrashcan If the transfer of the artifacts to the trash can repository is enabled or disabled.

Note:  This Cold Artifact Storage feature is  available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
SecurityRequires an admin user
Usage: GET /api/retention/archive/policies
Produces: application/json
Sample Request :

GET /api/retention/archive/policies

Sample Response (myPolicy without cronExp, myPolicy2 with cronExp)

[
    {
        "key": "myPolicy",
        "enabled": false,
        "description": "Demo policy - archive using search criteria form",
        "durationInMinutes": 0,
        "expirationTimeInMonths": 0,
        "skipTrashcan": false,
        "searchCriteriaForm": {
            "properties": {
                "include": {
                    "operator": "or",
                    "values": [
                        {
                            "propertyKey": "updated",
                            "propertyValue": "updated"
                        }
                    ]
                },
                "exclude": {
                    "operator": "or",
                    "values": []
                }
            },
            "repositories": {
                "include": {
                    "operator": "or",
                    "values": [
                        "include-*",
                        "*-repo"
                    ]
                },
                "exclude": {
                    "operator": "or",
                    "values": []
                }
            },
            "paths": {
                "include": {
                    "operator": "or",
                    "values": []
                },
                "exclude": {
                    "operator": "or",
                    "values": [
                        "exclude-*",
                        "*-path"
                    ]
                }
            },
            "createdBefore": 2,
            "downloadedBefore": 3
        },
        "lastRunStatus": {
            "migrationIdentifier": "retention_archive_myPolicy2_OUYEVKCIO3",
            "state": "COMPLETE",
            "completedNumberOfArtifacts": 0,
            "failedNumberOfArtifacts": 0,
            "totalNumberOfArtifacts": 0,
            "progressPercentage": 0,
            "startTime": 1632915823313,
            "finishTime": 1632915823355,
            "totalByteSize": 0,
            "successByteSize": 0,
            "failureByteSize": 0,
            "triggeredBy": "admin",
            "policyName": "myPolicy"
        }
    },
    {
        "key": "myPolicy2",
        "enabled": true,
        "description": "Demo policy - archive using search criteria form",
        "cronExp": "0 0 0/1 ? * * *",
        "durationInMinutes": 0,
        "expirationTimeInMonths": 0,
        "skipTrashcan": false,
        "searchCriteriaForm": {
            "properties": {
                "include": {
                    "operator": "or",
                    "values": [
                        {
                            "propertyKey": "updated",
                            "propertyValue": "updated"
                        }
                    ]
                },
                "exclude": {
                    "operator": "or",
                    "values": []
                }
            },
            "repositories": {
                "include": {
                    "operator": "or",
                    "values": [
                        "include-*",
                        "*-repo"
                    ]
                },
                "exclude": {
                    "operator": "or",
                    "values": []
                }
            },
            "paths": {
                "include": {
                    "operator": "or",
                    "values": []
                },
                "exclude": {
                    "operator": "or",
                    "values": [
                        "exclude-*",
                        "*-path"
                    ]
                }
            },
            "createdBefore": 2,
            "downloadedBefore": 3
        },
        "lastRunStatus": {
            "migrationIdentifier": "retention_archive_myPolicy2_OUYEVKCIO3",
            "state": "COMPLETE",
            "completedNumberOfArtifacts": 0,
            "failedNumberOfArtifacts": 0,
            "totalNumberOfArtifacts": 0,
            "progressPercentage": 0,
            "startTime": 1632915823313,
            "finishTime": 1632915823355,
            "totalByteSize": 0,
            "successByteSize": 0,
            "failureByteSize": 0,
            "triggeredBy": "admin",
            "policyName": "myPolicy2"
        },
        "nextExecutionTime": 1632916800000
    }
]

Status

200: Success


Get an Archive Policy

Description: Returns an archive policy based on the policy key.

The response displays the following information:

PropertyDescription
keyUnique policy key that identifies the policy.
enabledIf the policy is enabled/disabled for execution.
descriptionDescription for the policy.
aqlQuery

The Artifactory Query Language (AQL) query used to s earch for the artifacts to be archived.

cronExpThe Cron expression used for scheduling the archive policy.
nextExecutionTimeTime when the policy is scheduled to run next. This depends on the cronExp and the previous execution time.
durationInMinutes

The maximum duration (in minutes) for policy execution. 

lastRunStatus

Shows the status of the last policy run. It can be one of the following:

  • PENDING: The policy has never been executed.
  • IN_PROGRESS: The policy execution is in progress.
  • IN_PROGRESS_WITH_ERORS: The policy execution is in progress but encountered one or more errors.
  • COMPLETE: The policy executed successfully without any errors.
  • COMPLETE_WITH_ERRORS: The policy executed, but encountered one or more errors.
  • FAILED: The policy execution failed.
totalNumberOfArtifactsTotal number of artifacts to be archived.
completedNumberOfArtifactsTotal number of artifacts that were successfully archived.
failedNumberOfArtifactsTotal number of artifacts that could not be archived.
progressPercentageThe progress of the archive policy (in percentage).
startTimeTime when the policy started executing. Value is in Unix epoch time in milliseconds.
finishTimeTime when the policy finished executing. Value is in Unix epoch time in milliseconds.
totalByteSizeThe total size of the artifacts included in the policy.
successByteSizeThe size of the artifacts that were archived.
failureByteSizeThe size of the artifacts that couldn't be archived.
expirationTimeInMonthsThe expiration period (in months) that it takes for archived artifacts to be cleaned up from the Cold instance.
skipTrashcan If the transfer of the artifacts to the trash can repository is enabled or disabled.

Note:  This Cold Artifact Storage feature is  available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
SecurityRequires an admin user
Usage: GET /api/retention/archive/policies/{policyKey}
Produces: application/json
URL Parameter :

ParametersTypeDescriptionRequired/Optional
policyKeystringThe policy key for which the archive policy details need to be retrieved.Required

Sample Request:

GET /api/retention/archive/policies/myPolicy2

Sample Response :

[ 
   {
        "key": "myPolicy2",
        "enabled": true,
        "description": "Demo policy - archive using search criteria form",
        "cronExp": "0 0 0/1 ? * * *",
        "durationInMinutes": 0,
        "expirationTimeInMonths": 0,
        "skipTrashcan": false,
        "searchCriteriaForm": {
            "properties": {
                "include": {
                    "operator": "or",
                    "values": [
                        {
                            "propertyKey": "updated",
                            "propertyValue": "updated"
                        }
                    ]
                },
                "exclude": {
                    "operator": "or",
                    "values": []
                }
            },
            "repositories": {
                "include": {
                    "operator": "or",
                    "values": [
                        "include-*",
                        "*-repo"
                    ]
                },
                "exclude": {
                    "operator": "or",
                    "values": []
                }
            },
            "paths": {
                "include": {
                    "operator": "or",
                    "values": []
                },
                "exclude": {
                    "operator": "or",
                    "values": [
                        "exclude-*",
                        "*-path"
                    ]
                }
            },
            "createdBefore": 2,
            "downloadedBefore": 3
        },
        "lastRunStatus": {
            "migrationIdentifier": "retention_archive_myPolicy2_OUYEVKCIO3",
            "state": "COMPLETE",
            "completedNumberOfArtifacts": 0,
            "failedNumberOfArtifacts": 0,
            "totalNumberOfArtifacts": 0,
            "progressPercentage": 0,
            "startTime": 1632915823313,
            "finishTime": 1632915823355,
            "totalByteSize": 0,
            "successByteSize": 0,
            "failureByteSize": 0,
            "triggeredBy": "admin",
            "policyName": "myPolicy2"
        },
        "nextExecutionTime": 1632916800000
    }
]

Status

200: Success


Preview Retention Policy by Policy Key

Description: Provides an estimated count and total size of archive candidates based on the provided retention policy key.
Note: This Cold Artifact Storage feature is available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
Security Requires an admin user
Usage POST /api/retention/archive/policies/{key}/preview
Produces : application/json
Consumes text/plain
URL Parameters :

ParametersTypeDescriptionRequired/Optional
keystringThe policy key for which you want to get a preview.Required

Sample Request:

POST /api/retention/archive/policies/example-policy-key/preview

Sample Response :

{  "count": 100000, //archive candidates count     "totalSize": 800000 //total size in bytes }

Status

200: Success


Preview Retention Policy by Policy Model

Description: Provides an estimated count and total of archive candidates based on the provided retention policy model.
Note:  This Cold Artifact Storage feature is  available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
Security Requires an admin user
Usage : POST /api/retention/archive/policies/preview
Produces : application/json
Consumes text/plain
Sample Request :

POST /api/retention/archive/policies/preview

Sample Response :

{  "count": 100000, //archive candidates count     "totalSize": 800000 //total size in bytes }

Status

200: Success


Search for Archives

Description: Search for archived artifacts based on AQL query.
Note:  This Cold Artifact Storage feature is  available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
SecurityRequires an admin user
UsagePOST /api/retention/search
Produces: application/json
Consumes text/plain
Query Parameters :

ParametersTypeDescriptionRequired/Optional
aqlQuerystring

Search for archived artifacts using Artifactory Query Language (AQL) .

The AQL query can be based on these properties:

  • Artifact name
  • Artifact checksum
  • Artifact properties
  • Repository and path
  • Archiving period

When searching for repository, ensure that the AQL query is for the original repository name only. Do not include the namespace that was generated during the archive process.

Required

Sample Request:

POST /api/retention/search
items.find({"repo": "myRepo"}).include("property")

Sample Response :

{
	"results" : [ {
		"repo" : "myRepo",
		"path" : ".",
		"name" : "artifactory.20210507233800.td",
		"type" : "file",
		"size" : 145149,
		"created" : "2021-06-30T10:27:01.866Z",
		"created_by" : "admin",
		"modified" : "2021-06-30T10:27:00.414Z",
		"modified_by" : "admin",
		"updated" : "2021-06-30T10:29:06.139Z",
		"properties" : [ {
			"key" : "artifact.lifecycle.archive.time",
			"value" : "1625048946037"
		} ]
	} ],
	"range" : {
	"start_pos" : 0,
	"end_pos" : 1,
	"total" : 1
	}
}

Status

200: Success


Get Namespace

Description: Get the namespace that was generated for all the repositories during the archive process. This namespace is required when sending a request for restoring artifacts.
Note: This Cold Artifact Storage feature is available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
Security Requires an admin user
Usage : GET /api/retention/namespace
Produces : application/json
Sample Request :

GET /api/retention/namespace

Sample Response :

{
    "jfrogColdStorageNamespaceId": "gbbxmcuj"
}

Status

200: Success


Restore from Archive

DescriptionTriggers restoration of multiple items from the Archive. An admin can choose one of the following options: 

  • Restore items to the original location and provide fallback repository in case the original location was deprecated. 
  • Restore to a dedicated central repository.

Restore operation only moves the items back to the Warm instance location and does not delete them from the Cold instance.

NoteThis Cold Artifact Storage feature is  available only for Artifactory Enterprise and Enterprise+ users.
Since:  Artifactory 7.27.3
Security Requires an admin user
Usage POST /api/retention/restore
Consumes : application/json
Query Parameter :

ParametersTypeDescriptionRequired/Optional
restoreToOriginalboolean

Set whether or not to restore to the original artifact location (saved on the Cold instance).

Required if centralDestinationPath is not set
fallbackDestinationPathstring

If restoreToOriginal is set as true and the original location does not exist anymore, restore to this fallback location. fallbackDestinationPath must contain at least the repository key.

Before providing the fallbackDestinationPath, ensure that the path already exists.

Required if restoreToOriginal is set
centralDestinationPathstring

The repository key where the files need to be restored. The files will be restored to this repository according to its original path hierarchy. For example, if the repository key is test_repo and the original path is pypi-local/jfrogapp/0.1, the files will be restored to test_repo/pypi-local/jfrogapp/0.1.

centralDestinationPath and restoreToOriginal are mutually exclusive.

Before providing the centralDestinationPath, ensure that the path already exists.

Required if restoreToOriginal is not set

addNamespace

boolean

This is set as true by default and you do not have to include the namespace when adding items for itemsToRestore.

When set as false, you must include the namespace when adding items for itemsToRestore.

Optional

itemsToRestorestring

Comma-separated list of the items or paths to be restored.

Format “itemsToRestore”: [“<repository_name>/path/to/file”, “<repository_name>/path/to/folder/” …,]

Folder paths must end with a  /  while file paths must not.

Since addNamespace is set as true by default, you do not have to include the namespace with the path for itemsToRestore. However, if addNamespace is set as false, ensure that the repository name includes the namespace that was generated during the archive process and the full repository path.
Examplegbbxmcuj_pypi-local/jfrogapp/0.1/jfrogapp-0.1.tar.gz
Where:

  • gbbxmcuj is the namespace
  • pypi-local is the name of the repository
  • jfrogapp/0.1/jfrogapp-0.1.tar.gz is the full path for the item to be restored

For information about getting the namespace, see Get Namespace.

Required

Sample Request:

POST /api/retention/restore
{
    "restoreToOriginal" : true,
    "fallbackDestinationPath" : "urs-generic-dev-local",
    "itemsToRestore": [
        "urs-generic-dev-local/webapp_python.tar.gz",
        "urs-generic-dev-local/webapp_python_azure.tar.gz"
    ]
}

Sample Response : Successful

{
    "response": "Restore requestprocess haswas been accepted for processing.initialized successfully.",
    "failed_to_restore_items": {}
}

Sample Response : Failed

{
    "response": "Restoration operation failed, some of the requested files could not be restored",
    "failed_to_restore_items": {
        "ifuwxrbf_urs-generic-dev-local/webapp_python.tar.gz": "File does not exist in path",
        "ifuwxrbf_urs-generic-dev-local/webapp_python_azure.tar.gz": "File does not exist in path"
    }
}



Status

200: Success


Get Archive Policy Status

Description: Returns the status of an archive policy based on the specified duration and policy key.

The response displays the following information: 

PropertyDescription
policyKeyUnique policy key that identifies the policy.
lastRunStatus

Shows the status of the last policy run. It can be one of the following:

  • PENDING: The policy has never been executed.
  • IN_PROGRESS: The policy execution is in progress.
  • IN_PROGRESS_WITH_ERORS: The policy execution is in progress but encountered one or more errors.
  • COMPLETE: The policy executed successfully without any errors.
  • COMPLETE_WITH_ERRORS: The policy executed, but encountered one or more errors.
  • FAILED: The policy execution failed.
totalNumberOfArtifacts

Total number of artifacts to be archived.

This number is not calculated at the beginning of the archive process. However, based on the number of artifacts being archived, this number increments as the archive process progresses.

completedNumberOfArtifactsTotal number of artifacts that were archived.
failedNumberOfArtifactsTotal number of artifacts that could not be archived.
progressPercentageThe progress of the policy (in percentage).
startTimeTime when the policy started executing. Value is in Unix epoch time in milliseconds.
finishTimeTime when the policy finished executing. Value is in Unix epoch time in milliseconds.
totalByteSizeThe total size of the artifacts included in the policy.
successByteSizeThe size of the artifacts that were archived.
failureByteSizeThe size of the artifacts that couldn't be archived.

Note:  This Cold Artifact Storage feature is  available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
SecurityRequires an admin user
Usage: GET /api/retention/archive/executions?from=<number>&to=<number>&searchStr=<searchByPolicyKey>
Produces: application/json
URL Parameters :

ParametersTypeDescriptionRequired/Optional
fromstringThe date range (in epoch format) for the archive status.

Optional

tostring
searchStrstringGet the status for a specific policy.Optional

Sample Request:

GET /api/retention/archive/executions

Sample Response :

In the API response, the last execution is displayed on top.
[{
	"state”: "COMPLETE",
	"completedNumberOfArtifacts": 1,
	"failedNumberOfArtifacts": 0,
	"totalNumberOfArtifacts": 1,
	"progressPercentaqe": 100,
	"startTime": 16Z3Ï80000018,
	"finishTime": 16Z37800004Z5,
	"totalByteSize": 9811,
	"successByteSize": 9811,
	"failureByteSize": 0,
},
{
	"state": "COMPLETE",
	"completedNumberOfArtifacts": 10,
	"failedNumberOfArtifacts": 0,
	"totalNumberOfArtifacts": 10,
	"progressPercentage": 100,
	"startTime": 16Z37672381Z9,
	"finishTime": 1623767Z38985,
	"totalByteSize": 884964,
	"successByteSize": 884964,
	"failureByteSize": 0,
},…]

Status

200: Success

Get Restore Process Status

Description: Returns the status of restore process based on the specified duration and policy key.

The response displays the following information:

PropertyDescription
destinationConfiguration

The destination from the which the artifacts were restored. It can be one of the following:

  • Original/Central
  • Fallback Location
lastRunStatus

Shows the status of the last policy run. It can be one of the following:

  • PENDING: The policy has never been executed.
  • IN_PROGRESS: The policy execution is in progress.
  • IN_PROGRESS_WITH_ERORS: The policy execution is in progress but encountered one or more errors.
  • COMPLETE: The policy executed successfully without any errors.
  • COMPLETE_WITH_ERRORS: The policy executed, but encountered one or more errors.
  • FAILED: The policy execution failed.
totalNumberOfArtifactsTotal number of artifacts to be archived.
completedNumberOfArtifactsTotal number of artifacts that were archived.
failedNumberOfArtifactsTotal number of artifacts that could not be archived.
progressPercentageThe progress of the policy (in percentage).
startTimeTime when the policy started executing. Value is in Unix epoch time in milliseconds.
finishTimeTime when the policy finished executing. Value is in Unix epoch time in milliseconds.
totalByteSizeThe total size of the artifacts included in the policy.
successByteSizeThe size of the artifacts that were archived.
failureByteSizeThe size of the artifacts that couldn't be archived.

Note:  This Cold Artifact Storage feature is  available only for Artifactory Enterprise and Enterprise+ users.
Since:   Artifactory 7.27.3
SecurityRequires an admin user
Usage: GET /api/retention/restore/executions?from=<number>&to=<number>
Produces: application/json
URL Parameters :

ParametersTypeDescriptionRequired/Optional
fromstringThe date range (in epoch format) for the restore status.

Optional
tostring

Sample Request:

GET /api/retention/restore/executions

Sample Response :

In the API response, the last execution is displayed on top.
{
	"state": "COMPLETE",
	"completedNumberOfArtifacts": 1,
	"failedNumberOfArtifacts“: 0,
	"totalNumberOfArtxfacts": 1,
	"progressPercentage": 100,
	"startTime": 1623768273379,
	"finishTime": 1623768327866,
	"totalByteSize": 9811,
	"successByteSize": 9811,
	"failureByteSize": 0,
	"destination": "gen-2"
}

Status

200: Success


SEARCHES

All searches return limited results for internal and anonymous users (same limits as in the user interface).

To modify the default limit results, edit the artifactory.system.properties file with artifactory.search.limitAnonymousUsersOnly=false (default is true) and add a new limit with artifactory.search.userQueryLimit  (default is 1000).

Applicable to the following REST API calls:
Artifact Search, Archive Entries Search, GAVC Search, Property Search, Checksum Search (limited by UI max results), Artifacts Not Downloaded SinceArtifacts With Date in Date Range, Artifacts Created in Date Range.

Artifactory Query Language (AQL)

Description: Flexible and high performance search using Artifactory Query Language (AQL).
Since: 3.5.0
Security: Requires an authenticated user. Certain domains/queries may require Admin access.
Usage: POST /api/search/aql
Consumes:  text/plain
Sample Usage:


POST /api/search/aql  
items.find(
	{
		"repo":{"$eq":"libs-release-local"}
	}
)

Produces: application/json
Sample Output:

{
	"results" : [
  	{
 		"repo" : "libs-release-local",
 		"path" : "org/jfrog/artifactory",
		"name" : "artifactory.war",
 		"type" : "item type",
 		"size" : "75500000",
 		"created" : "2015-01-01T10:10;10",
 		"created_by" : "Jfrog",
 		"modified" : "2015-01-01T10:10;10",
 		"modified_by" : "Jfrog",
 		"updated" : "2015-01-01T10:10;10"
	}
	],
	"range" : {
 	"start_pos" : 0,
 	"end_pos" : 1,
 	"total" : 1
	}
}


Artifact Search (Quick Search)

Description: Artifact search by part of file name.
Searches return file info URIs. Can limit search to specific repositories (local or caches).
Since: 2.2.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/search/artifact?name=name[&repos=x[,y]]
Headers (Optionally): X-Result-Detail: info (To add all extra information of the found artifact), X-Result-Detail: properties (to get the properties of the found artifact), X-Result-Detail: info, properties (for both).
Produces: application/json (application/vnd.org.jfrog.artifactory.search.ArtifactSearchResult+json)
Sample Output:

GET /api/search/artifact?name=lib&repos=libs-release-local
{
"results": [
{
            "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver/lib-ver.pom"
        },{
            "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver2/lib-ver2.pom"
        }
]
}

Archive Entries Search (Class Search)

Description: Search archive for classes or any other resources within an archive.
Can limit search to specific repositories (local or caches).
Since: 2.2.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/search/archive?name=[archiveEntryName][&repos=x[,y]]
Produces: application/json (application/vnd.org.jfrog.artifactory.search.ArchiveEntrySearchResult+json)
Sample Output:

GET /api/search/archive?name=*Logger.class&repos=third-party-releases-local,repo1-cache
{
"results" :[
    {
        "entry": "org/apache/jackrabbit/core/query/lucene/AbstractIndex.LoggingPrintStream.class",
        "archiveUris": [
            "http://localhost:8081/artifactory/api/storage/third-party-releases-local/org/apache/jackrabbit/
                    jackrabbit-core/1.2.3/jackrabbit-core-1.2.3.jar",
            "http://localhost:8081/artifactory/api/storage/third-party-releases-local/org/apache/jackrabbit/
                    jackrabbit-core/1.3.1/jackrabbit-core-1.3.1.jar"
        ]
        },{
            "entry": "org/codehaus/plexus/logging/AbstractLogger.class",
            "archiveUris": [
                 "http://localhost:8081/artifactory/api/storage/repo1-cache/org/codehaus/plexus/plexus-container-default/
                        1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar"
            ]
        }
    ]
}

GAVC Search

Description: Search by Maven coordinates: GroupId, ArtifactId, Version & Classifier.
Search must contain at least one argument. Can limit search to specific repositories (local and remote-cache).
Since: 2.2.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/search/gavc?[g=groupId][&a=artifactId][&v=version][&c=classifier][&repos=x[,y]][&specific=true(default false)]
Headers (Optionally): X-Result-Detail: info (To add all extra information of the found artifact), X-Result-Detail: properties (to get the properties of the found artifact), X-Result-Detail: info, properties (for both).
Produces: application/json (application/vnd.org.jfrog.artifactory.search.GavcSearchResult+json)
Sample Output:

GET /api/search/gavc?g=org.acme&a=artifact&v=1.0&c=sources&repos=libs-release-local
{
"results": [
    {
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/artifact/1.0/artifact-1.0-sources.jar"
    },{
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/artifactB/1.0/artifactB-1.0-sources.jar"
    }
]
}
Usage for Remote and Virtual repositories
GET /api/search/gavc?[g=groupId][&a=artifactId][&v=version][&c=classifier][&repos=x[,y]][&specific=true(default false)]

From Artifactory version 7.37.9, the following &specific=true(default false) attribute was added to support virtual and remote repositories.

Note the following:

  • The exact group id and artifact id must be provided to search remote repositories.
  • Once &specific=true(default false) is set to true, the output will be minimized to only include download Url, ext, version, and classifier.

Sample Output:

{ "results":[ { "downloadUri":"http://localhost:8081/artifactory/maven-virtual/abbot/abbot/0.12.3/abbot-0.12.3.jar", "ext":"jar", "version":"0.12.3" }, { "downloadUri":"http://localhost:8081/artifactory/maven-virtual/abbot/abbot/0.12.3/abbot-0.12.3.pom", "ext":"pom", "version":"0.12.3" }, { "downloadUri":"http://localhost:8081/artifactory/maven-virtual/abbot/abbot/0.13.0/abbot-0.13.0.jar", "ext":"jar", "version":"0.13.0" }, { "downloadUri":"http://localhost:8081/artifactory/maven-virtual/abbot/abbot/0.13.0/abbot-0.13.0.pom", "ext":"pom", "version":"0.13.0" }, { "downloadUri":"http://localhost:8081/artifactory/maven-virtual/abbot/abbot/1.4.0/abbot-1.4.0-javadoc.jar", "ext":"jar", "version":"1.4.0", "classifier":"javadoc" }, { "downloadUri":"http://localhost:8081/artifactory/maven-virtual/abbot/abbot/1.4.0/abbot-1.4.0-sources.jar", "ext":"jar", "version":"1.4.0", "classifier":"sources" }, { "downloadUri":"http://localhost:8081/artifactory/maven-virtual/abbot/abbot/1.4.0/abbot-1.4.0.jar", "ext":"jar", "version":"1.4.0" }, { "downloadUri":"http://localhost:8081/artifactory/maven-virtual/abbot/abbot/1.4.0/abbot-1.4.0.pom", "ext":"pom", "version":"1.4.0" } ] }

Property Search

Description: Search by properties.
If no value is specified for a property - assume '*'. Can limit search to specific repositories (local, remote-cache or virtual).
Since: 2.2.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/search/prop?[p1=v1,v2][&p2=v3][&repos=x[,y]]
Headers (Optionally): X-Result-Detail: info (To add all extra information of the found artifact), X-Result-Detail: properties (to get the properties of the found artifact), X-Result-Detail: info, properties (for both).
Produces: application/json (application/vnd.org.jfrog.artifactory.search.MetadataSearchResult+json)
Sample Output:

GET /api/search/prop?p1=v1,v2&p2=v3&repos=libs-release-local
{
"results" : [
    {
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver/lib-ver.pom"
    },{
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver2/lib-ver2.pom"
    }
]
}

Checksum Search

Description: Artifact search by checksum (md5, sha1, or sha256)
Searches return file info URIs. Can limit search to specific repositories (local, remote-cache or virtual).
Notes: Requires Artifactory Pro
Since: 2.3.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/search/checksum?md5=md5sum?sha1=sha1sum?sha256=sha256sum[&repos=x[,y]]
Headers (Optionally): X-Result-Detail: info (To add all extra information of the found artifact), X-Result-Detail: properties (to get the properties of the found artifact), X-Result-Detail: info, properties (for both).
Produces: application/json (application/vnd.org.jfrog.artifactory.search.ChecksumSearchResult+json)
Sample Output:

GET /api/search/checksum?sha256=9a7fb65f15e00aa2a22c1917d0dafd4374fee8daf0966a4d94cd37a0b9acafb9&repos=libs-release-local
{
"results": [
{
            "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/jfrog/build-info-api/1.3.1/build-info-api-1.3.1.jar"
        }
]
}

Bad Checksum Search

Description: Find all artifacts that have a bad or missing client checksum values (md5 or sha1)
Searches return file info uris. Can limit search to specific repositories (local, remote-cache or virtual).
Notes: Requires Artifactory Pro
Since: 2.3.4
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/search/badChecksum?type=md5|sha1[&repos=x[,y]]
Produces: application/json (application/vnd.org.jfrog.artifactory.search.BadChecksumSearchResult+json)
Sample Output:

GET /api/search/badChecksum?type=md5&repos=libs-release-local
{
"results": [
{
            "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/jfrog/build-info-api/1.3.1/build-info-api-1.3.1.jar"
            "serverMd5": "4040c7c184620af0a0a8a3682a75eb7"
            "clientMd5": "4040c7c184620af0a0a8a3682a75e44" //On missing checksum this element will be an empty string
        }
]
}

Artifacts Not Downloaded Since

Description: Returns all artifacts not downloaded since the specified Java epoch in milliseconds.
Optionally include only artifacts created before the specified createdBefore date, otherwise only artifacts created before notUsedSince are returned.
Can limit search to specific repositories (local or caches).
Since: 2.2.4
Security: Requires a privileged non-anonymous user.
Usage: GET /api/search/usage?notUsedSince=javaEpochMillis[&createdBefore=javaEpochMillis][&repos=x[,y]]
Produces: application/json (application/vnd.org.jfrog.artifactory.search.ArtifactUsageResult+json)
Sample Output:

GET /api/search/usage?notUsedSince=long&createdBefore=long&repos=libs-release-local
{
"results" : [
    {
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver/lib-ver.jar",
        "lastDownloaded": ISO8601
    },{
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver2/lib-ver2.jar",
        lastDownloaded: ISO8601
    }
]
}

Artifacts With Date in Date Range

Description: Get all artifacts with specified dates within the given range. Search can be limited to specific repositories (local or caches).
Since: 3.2.1
Security : Requires a privileged non-anonymous user.
Usage : GET /api/search/dates?[from=fromVal][&to=toVal][&repos=x[,y]][&dateFields=c[,d]]
Parameters : The from and to  parameters can be either a long value for the java epoch (milliseconds since the epoch), or an ISO8601 string value. from is mandatory. If to is not provided, now() will be used instead, and if either are omitted, 400 bad request is returned.
The dateFields parameter is a comma separated list of date fields that specify which fields the from and to values should be applied to . The date fields supported are: created , lastModified , lastDownloaded .
It is a mandatory field and it also dictates which fields will be added to the JSON returned.
If ANY of the specified date fields of an artifact is within the specified range, the artifact will be returned.

Produces : application/json (application/vnd.org.jfrog.artifactory.search.ArtifactResult+json)

Sample Output:

GET /api/search/dates?dateFields=created,lastModified,lastDownloaded&from=long&to=long&repos=libs-release-local
{
"results" : [
    {
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver/lib-ver.jar",
        "created": ISO8601,
        "lastModified": ISO8601,
        "lastDownloaded": ISO8601
    },{
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver2/lib-ver2.jar",
        "created": ISO8601.
        "lastModified": ISO8601,
        "lastDownloaded": ISO8601
    }
]
}

Artifacts Created in Date Range

Description: Get All Artifacts Created in Date Range
If 'to' is not specified use now(). Can limit search to specific repositories (local or remote-cache).
Since: 2.2.0
Security: Requires a privileged non-anonymous user.
Usage: GET /api/search/creation?from=javaEpochMillis[&to=javaEpochMillis][&repos=x[,y]]
Produces: application/json (application/vnd.org.jfrog.artifactory.search.ArtifactCreationResult+json)
Sample Output:

GET /api/search/creation?from=long&to=long&repos=libs-release-local
{
"results" : [
    {
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver/lib-ver.jar",
        "created": ISO8601
    },{
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver2/lib-ver2.jar",
        "created": ISO8601
    }
]
}

Pattern Search

Description: Get all artifacts matching the given Ant path pattern
Since: 2.2.4
Notes: Requires Artifactory Pro. Pattern "**" is not supported to avoid overloading search results.
Security: Requires a privileged non-anonymous user.
Usage: GET /api/search/pattern?pattern=repo-key:this/is/a/ *pattern*.war
Produces: application/json (application/vnd.org.jfrog.artifactory.search.PatternResultFileSet+json)
Sample Output:

GET /api/search/pattern?pattern=libs-release-local:killer/*/ninja/*/*.jar
{
    "repositoryUri" : "http://localhost:8081/artifactory/libs-release-local",
    "sourcePattern" : "libs-release-local:killer/*/ninja/*/*.jar",
    files : [
        "killer/coding/ninja/1.0/monkey-1.0.jar",
        "killer/salty/ninja/1.5-SNAPSHOT/pickle-1.5-SNAPSHOT.jar"
    ]
}

Builds for Dependency

Description: Find all the builds an artifact is a dependency of (where the artifact is included in the build-info dependencies)
Notes: Requires Artifactory Pro
Since: 2.3.4
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/search/dependency?sha1=sha1Checksum
Produces: application/json (application/vnd.org.jfrog.artifactory.search.DependencyBuilds+json)
Sample Output:

GET /api/search/dependency?sha1=451a3c5f8cfa44c5d805379e760b5c512c7d250b
{
"results" : [
    {
        "uri": "http://localhost:8081/artifactory/api/build/my-build/50"
    },{
        "uri": "http://localhost:8081/artifactory/api/build/my-build/51"
    }
]
}

License Search

Description: Search for artifacts that were already tagged with license information and their respective licenses.
To search by specific license values use Property Search with the 'artifactory.licenses' property.

When the autofind parameter is specified Artifactory will try to automatically find new license information and return it as part of the result in the found field.
Please note that this can affect the speed of the search quite dramatically, and will still search only on already-tagged artifacts.

Default parameter values when unspecified: unapproved=1, unknown=1, notfound=0, neutral=0, approved=0, autofind=0.
Can limit search to specific repositories (local, remote-cache or virtual).

Since: 2.3.0
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: GET /api/search/license[?unapproved=1][&unknown=1][&notfound=0][&neutral=0][&approved=0][&autofind=0][&repos=x[,y]]
Produces: application/json (application/vnd.org.jfrog.artifactory.search.LicenseResult+json)
Sample Output:

GET /api/search/license?approved=1&unknown=1&autofind=1&repos=libs-release-local,staging
{
"results" : [
    {
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver/lib-ver.jar",
        "license": "lgplv2",
        "found": "lgplv2",
        "status": "approved"
    },{
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver/lib-ver.jar",
        "license": "cddlv1",
        "found": "gplv3",
        "status": "neutral"
    },{
        "uri": "http://localhost:8081/artifactory/api/storage/staging/org/acme/lib/ver2/lib-ver2.jar",
        "license": "gplv3",
        "found": "gplv3",
        "status": "unapproved"
    }
]
}

Artifact Version Search

Description: Search for all available artifact versions by GroupId and ArtifactId in local, remote or virtual repositories.
Search can be limited to specific repositories (local, remote and virtual) by settings the repos parameter.
Release/integration versions: Unless the version parameter is specified, both release and integration versions are returned. When version is specified, e.g. 1.0-SNAPSHOT, result includes only integration versions.

Integration versions are determined by the repository layout of the repositories searched. For integration search to work the repository layout requires an 'Artifact Path Pattern' that contains the baseRev token and then the fileItegRev token with only literals between them.
Remote searches: By default only local and cache repositories are used. When specifying remote=1, Artifactory searches for versions on remote repositories.  NOTE!  that this can dramatically slow down the search.
For Maven repositories the remote maven-metadata.xml is consulted. For non-maven layouts, remote file listing runs for all remote repositories that have the 'List Remote Folder Items' checkbox enabled.
Filtering results (Artifactory 3.0.2+): The version parameter can accept the * and/or ? wildcards which will then filter the final result to match only those who match the given version pattern.
Since: 2.6.0
Notes: Requires Artifactory Pro
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/search/versions?[g=groupId][&a=artifactId][&v=version][&remote=0/1][&repos=x[,y]]
Produces: application/json (application/vnd.org.jfrog.artifactory.search.ArtifactVersionsResult+json)

Sample Output:

GET /api/search/versions?g=org.acme&a=artifact&repos=libs-release-local
{
"results": [
    {
	"version": "1.2",
	"integration": false
    },{
        "version": "1.0-SNAPSHOT",
	"integration": true
    },{
        "version": "1.0",
	"integration": false
    }
]
}

Artifact Latest Version Search Based on Layout

Description: Search for the latest artifact version by groupId and artifactId, based on the layout defined in the repository 
Search can be limited to specific repositories (local, remote-cache or virtual) by settings the repos parameter. When searching in a virtual repository, each child-repository layout will be consulted accordingly.
Latest release vs. latest integration: Unless the version parameter is specified, the search returns the latest artifact release version. When version is specified, e.g. 1.0-SNAPSHOT, the result is the latest integration version. Integration versions are determined by the repository layout of the repositories searched. For integration search to work the repository layout requires an "Artifact Path Pattern" that contains the baseRev token and then the fileItegRev token with only literals between them.
Remote searches: By default only local and cache repositories will be used. When specifying remote=1, Artifactory searches for versions on remote repositories.  NOTE!  that this can dramatically slow down the search.
For Maven repositories the remote maven-metadata.xml will be consulted. For non-Maven layouts, remote file listing runs for all remote repositories that have the 'List Remote Folder Items' checkbox enabled.
Filtering results (Artifactory 3.0.2+): The version parameter can accept the * and/or ? wildcards which will then filter the final result to match only those who match the given version pattern.
Artifact path pattern: The [org] and [module] fields must be specified in the artifact path pattern of the repository layout for this call to work.
Since: 2.6.0
Notes: Requires Artifactory Pro
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/search/latestVersion?[g=groupId][&a=artifactId][&v=version][&remote=1][&repos=x[,y]]
Produces: text/plain
Sample Output:

GET /api/search/latestVersion?g=org.acme&a=artifact&v=1.0-SNAPSHOT&repos=libs-snapshot-local
 
1.0-201203131455-2

Artifact Latest Version Search Based on Properties

Description: Search for artifacts with the latest value in the version property. Only artifacts with the version property expressly defined in lower case will be returned.
Note that this API is based on a Maven-specific algorithm for sorting versions. For more information on sorting rules, see  Version Rules.
Notes:  Requires Artifactory Pro
Results can be filtered by specifying additional properties.

  • {repo}: Specify a repository to search through or replace with "_any" to search through all repositories
  • {path}: Specify a path to search through or replace with "_any" to search through all paths
  • listFiles=0 (default): Artifactory will only retrieve the latest version
  • listFiles=1: Artifactory will retrieve the latest version and the corresponding files

You may specify filters to restrict the set of artifacts that are searched by adding any properties to your search URL.

Since:  3.1.1
Security:  Requires an authenticated user (not anonymous) to use the api and read permission to the repository of each artifact.
Usage:  GET /api/versions/{repo}/{path}?[listFiles=0/1]&[<property key>=<property value>]&[<property key>=<property value>]
Consumes:  json
Examples

Return the latest version and corresponding artifacts by searching for through all repositories whose path starts with a/b and are annotated with the properties os=win and license=GPL. 
GET /api/versions/_any/a/b?os=win&license=GPL&listFiles=1
{
   "version" : "1.1.2",
   "artifacts" : [ {
        "uri" : "http://...."
   }]
}
 
Return the latest version (without the corresponding artifacts) by searching through all repositories whose path starts with a/b and are annotated with the properties os=win and license=GPL. 
Return only the version.
GET /api/versions/_any/a/b?os=win&license=GPL
{
   "version" : "1.1.2",
   "artifacts" : []
}

Build Artifacts Search

Description: Find all the artifacts related to a specific build.
Notes: Requires Artifactory Pro
Since: 2.6.5
Security: Requires a privileged user (can be anonymous)
Usage: POST /api/search/buildArtifacts
Consumes: application/json (application/vnd.org.jfrog.artifactory.search.BuildArtifactsRequest+json)
Sample Usage:

POST /api/search/buildArtifacts
{
 +"buildName": "build-name" // The build name for search by
 +"buildNumber": "15" // The build number to search by, can be LATEST to search for the latest build number
 -"buildStatus": "Released" // Optionally search by latest build status (e.g: "Released") 
 -"repos": ["libs-release-local,ext-release-local"] // Optionally refine search for specific repos, omit to search within all repositories
 -"mappings": [ // Optionally refine the search by providing a list of regexp patterns to search by
 	{
		"input": "(.+)-sources.jar"
	},
	{
		"input": "(.+)-javadoc.jar"
	}
 ]
}

Produces: application/json (application/vnd.org.jfrog.artifactory.search.BuildArtifactsSearchResult+json)
Sample Output
:

POST /api/search/buildArtifacts
{
"results" : [
    {
        "downloadUri": "http://localhost:8081/artifactory/libs-release-local/org/acme/lib/ver/lib-sources.jar"
    },{
        "downloadUri": "http://localhost:8081/artifactory/ext-release-local/org/acme/lib/ver/lib-ver-javadoc.jar"
    }
]
}

List Docker Repositories

Description: Lists all Docker repositories (the registry's _catalog) hosted in an Artifactory Docker repository.
Since: 4.4.3. The n and last pagination parameters are supported from version 5.4.6. Both parameters refer to an integer.

Notes on List Docker Repositories

  • Requires JFrog Container Registry or Artifactory Pro
  • To enable fetching from the cache using the ListDockerRepositories and the ListDockerTags rest APIs, you will need to set the following system properties in the artifactory.system.properties file:
    • Set artifactory.docker.catalogs.tags.fallback.fetch.remote.cache to true (the default is false) 
    • Set artifactory.docker.cache.remote.repo.tags.and.catalog=https://registry-1.docker.io/
      This property should reference the URL to which the remote docker repositories point.

Security: Requires a privileged user
Usage: GET /api/docker/{repo-key}/v2/_catalog?n=<n from the request>&last=<last tag value from previous response>
Produces: application/json

{
  "repositories": [
    <name>,
    ...
  ]
}

Sample Usage:

GET /api/docker/docker-local/v2/_catalog
{
  "repositories": [
    "busybox",
    "centos",
    "hello-world"
  ]
}

List Docker Tags

Description: Lists all tags of the specified Artifactory Docker repository.
Since: 4.4.3. The n and last pagination parameters are supported from version 5.4.6.

Notes on List Docker Tags

  • Requires JFrog Container Registry or Artifactory Pro
  • To enable fetch from cache using the ListDockerRepositories and the ListDockerTags rest APIs, set the artifactory.docker.catalogs.tags.fallback.fetch.remote.cache system property to true (default false) in the artifactory.system.properties file.

Security: Requires a privileged user
Usage: GET /api/docker/{repo-key}/v2/{image name}/tags/list?n=<Number of consecutive tags>&last=<Tag for the specified Docker Image>
Produces: application/json

{
  "name": "<image name>",
  "tags" : ["<tag>"]
}

Sample Usage:

GET /api/docker/{repo-key}/v2/{image name}/tags/list?n=<number of consecutive tags>&last=<last tag position (numeric) from previous response>
{
  "name" : "postgres",
  "tags" : [ "9.5.2" ]
}



ARTIFACTORY SECURITY

Updates to the Security APIs

From Artifactory release 7.49.3, the security APIs are being decoupled from Artifactory and moving to JFrog Platform Access. This means that the security APIs below are planned to be deprecated at a later stage. We recommend using the available new APIs for all your security and access needs moving forward.

JFrog is currently exposing the new Security REST APIs that are already available; these APIs are being modified and in the coming periods will be added to and will replace the previous APIs, but will remain backward-compatible. 


Get User Details

Description: Get the details of an Artifactory user
Since: 2.4.0
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: GET /api/security/users/{userName}
Producesapplication/json (application/vnd.org.jfrog.artifactory.security.Users+json)

Sample Output:

GET /api/security/users/davids
{
user.json
}

Get User Encrypted Password

Description: Get the encrypted password of the authenticated requestor. 
Since: 3.3.0
Notes: The request needs to be authenticated using a clear-text password. i.e. when submitting the request to Artifactory, the password provided for authentication needs to be in clear-text. If you authenticate with an API key, the encrypted API key will be returned in the response.
Security: Requires a privileged user
Usage: GET /api/security/encryptedPassword
Produces: plain/text
Sample Output:

GET /api/security/encryptedPassword

AP5v2zs9ga7CJNZb74u3arAKE5B


Expire Password for Multiple Users

Description: Expires password for a list of users
Since: 4.4.2
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: POST /api/security/users/authorization/expirePassword -H "Content-type: application/json" -d '[{userA}, {userB}]'
Sample Usage:

POST /api/security/users/authorization/expirePassword -H "Content-type: application/json" -d '[{davids}, {johnb}]'

Expire Password for All Users

Description: Expires password for all users
Since: 4.4.2
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: POST /api/security/users/authorization/expirePasswordForAllUsers
Sample Usage:

POST /api/security/users/authorization/expirePasswordForAllUsers 

Unexpire Password for a Single User

Description: Unexpires a user's password.

Artifactory REST API Future Breaking Change

In an upcoming release of Artifactory, JFrog will expire the "Unexpire Password for a Single User" endpoint from the Artifactory REST APIs and the UI that goes with it (once API v1 is fully deprecated). This means this API will not available in Artifactory REST API V2.

Since: 4.4.2
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: POST /api/security/users/authorization/unexpirePassword/{userName}
Produces: application/text
Sample Usage:

POST /api/security/users/authorization/unexpirePassword/davids

Get Password Expiration Policy

Description: Returns the password expiration policy
Since: 4.4.2
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: GET /api/security/configuration/passwordExpirationPolicy
Produces: application/json
Sample Usage:

GET /api/security/configuration/passwordExpirationPolicy
{
	"enabled":"true"
	"passwordMaxAge":"60"
	"notifyByEmail":"true"
}

Set Password Expiration Policy

Description: Sets the password expiration policy
Since: 4.4.2
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: PUT /api/security/configuration/passwordExpirationPolicy -H "Content-type: application/json" -d ' { "enabled" : "true|false", "passwordMaxAge" : "1-999", "notifyByEmail": "true|false" }
Produces: application/json
Sample Usage:

PUT /api/security/configuration/passwordExpirationPolicy -H "Content-type: application/json" -d ' { "enabled" : "true", "passwordMaxAge" : "60", "notifyByEmail": "true" }



Configure User Lock Policy

Description: Configures the user lock policy that locks users out of their account if the number of repeated incorrect login attempts exceeds the configured maximum allowed.
Security: Requires a valid admin user
Usage: PUT /api/security/userLockPolicy
Produces: application/text
Since: 4.4 
Sample usage:

PUT http://{host}:{port}/artifactory/api/security/userLockPolicy -H 'Content-Type: application/json'-d '
{ 
   "enabled" : true|false, 
   "loginAttempts" : {value} 
}'

Retrieve User Lock Policy

Description: Returns the currently configured user lock policy.
Security: Requires a valid admin user 
Usage: GET /api/security/userLockPolicy 
Produces: application/json 
Since: 4.4
Sample usage:

GET http://{host}:{port}/artifactory/api/security/userLockPolicy
'{ 
   "enabled" : true|false, 
   "loginAttempts" : {value} 
}'

Get Locked Out Users

Description: If locking out users is enabled, lists all users that were locked out due to recurrent incorrect login attempts.
Security: Requires a valid admin user
Usage: GET /api/security/lockedUsers
Produces: application/json
Since: 4.4
Sample Usage:

GET /api/security/lockedUsers
 
[ "usera", "userb",  ... ]
 

Unlock Locked Out Users

Description: Unlocks a list of users that were locked out due to recurrent incorrect login attempts.
Security:  Requires a valid admin user
Usage: POST /api/security/unlockUsers
Produces:  application/text
Since: 4.4
Sample Usage:


POST /api/security/unlockUsers -H 'Content-Type: application/json' -d '[ {userA}, {userB} ]'

Unlock All Locked Out Users 

Description: Unlocks all users that were locked out due to recurrent incorrect login attempts.
Security:  Requires a valid admin user
Usage: POST /api/security/unlockAllUsers
Produces:  application/text
Since: 4.4
Sample Usage:

POST /api/security/unlockAllUsers



Create API Key

Description: Create an API key for the current user. Returns an error if API key already exists - use regenerate API key instead.
Since: 4.3.0
Usage: POST /api/security/apiKey
Produces: application/json
Sample input:

POST /api/security/apiKey

Sample output:

{
    "apiKey": "3OloposOtVFyCMrT+cXmCAScmVMPrSYXkWIjiyDCXsY="
}

Regenerate API Key

Description: Regenerate an API key for the current user
Since: 4.3.0
Usage: PUT /api/security/apiKey
Produces: application/json
Sample input:

PUT /api/security/apiKey

Sample output:

{
    "apiKey": "3OloposOtVFyCMrT+cXmCAScmVMPrSYXkWIjiyDCXsY="
}

Get API Key

Description: Get the current user's own API key
Since: 4.3.0
Usage: GET /api/security/apiKey
Produces: application/json

Sample usage:

GET /api/security/apiKey

Sample output:

{
    "apiKey": "3OloposOtVFyCMrT+cXmCAScmVMPrSYXkWIjiyDCXsY="
}

Revoke API Key

Description: Revokes the current user's API key
Since: 4.3.0
Usage: DELETE /api/security/apiKey
Produces: application/json


Revoke User API Key

Description: Revokes the API key of another user
Since: 4.3.0
Security: Requires a privileged user (Admin only)
Usage
: DELETE /api/security/apiKey/{username} 
Produces: application/json


Revoke All API Keys

Description: Revokes all API keys currently defined in the system
Since: 4.3.0
Security: Requires a privileged user (Admin only)
Usage
: DELETE /api/security/apiKey?deleteAll={0/1} 
Produces: application/json



Get Permission Targets

Description: Get the permission targets list
Since: 2.4.0
Notes: Requires Artifactory Pro. This REST API is also available for Artifactory versions 6.6 and above.
To support spaces in the User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .
Security: Requires an admin user
Usage: GET /api/security/permissions
Producesapplication/json (application/vnd.org.jfrog.artifactory.security.Users+json), application/json (application/vnd.org.jfrog.artifactory.security.Groups+json), application/json (application/vnd.org.jfrog.artifactory.security.PermissionTargets+json)
Sample Output:

GET /api/security/permissions
[
  {
    "name": "readSourceArtifacts"
    "uri" : "http://localhost:8081/artifactory/api/security/permissions/readSourceArtifacts"
  }, {
    "name": "populateCaches"
    "uri" : "http://localhost:8081/artifactory/api/security/permissions/populateCaches"
  }
]

Get Permission Target Details

Description: Returns the details of an Artifactory Permission Target
Since: 2.4.0
Notes: Requires Artifactory Pro. This REST API is also available for Artifactory versions 6.6 and above
Security: Requires an admin user
Usage: GET /api/security/permissions/{permissionTargetName}
Producesapplication/json (application/vnd.org.jfrog.artifactory.security.PermissionTarget+json)
Sample Output:

GET /api/security/permissions/populateCaches
{
permission-target.json
}

Create or Replace Permission Target

Description: Creates a new permission target in the JFrog Unified Platform or replaces an existing permission target
Notes: Requires Artifactory Pro
- Missing values will be set to the default values as defined by the consumed type. 
- Please note when adding Release Bundles permission targets
- Requires an Edge/Enterprise+ license
   On Edge nodes, the repositories section in the request body can be left empty or contain the ‘release-bundles’ default repository. No other repositories are allowed. An Enterprise+ license allows you to add
   any repository
   The default repository in the repository section is “release-bundles” for both Edge/EntPlus licenses. (if user create permission target with empty repositories section the repository that we put is “release         bundles”)
To support spaces in the User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .

Security: Requires an admin user
Usage: PUT /api/security/permissions/{permissionTargetName}
Consumesapplication/vnd (application/vnd.org.jfrog.artifactory.security.PermissionTarget+json)
Sample Usage:

PUT /api/security/permissions/populateCaches
{
permission-target.json
}

Delete Permission Target

Description: Deletes an Artifactory permission target.
Since: 2.4.0
Notes: Requires Artifactory Pro
To support spaces in the User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .
Security: Requires an admin user
Usage: DELETE /api/security/permissions/{permissionTargetName}
Produces: application/text
Sample usage:

DELETE /api/security/permissions/populateCaches

Permission Target 'remoteCachePopulation' has been removed successfully.

Effective Item Permissions

Description: Returns a list of effective permissions for the specified item (file or folder).
Only users and groups with some permissions on the item are returned. Supported by local and local-cached repositories.
Permissions are returned according to the following conventions:
m=admin; d=delete; w=deploy; n=annotate; r=read
Notes: Requires Artifactory Pro
Since: 2.3.4
Security: Requires a valid admin or local admin user.
Usage: GET /api/storage/{repoKey}/{itemPath}?permissions
Produces: application/json (application/vnd.org.jfrog.artifactory.storage.ItemPermissions+json)
Sample Output:

GET /api/storage/libs-release-local/org/acme?permissions
{
"uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme"
"principals": {
        "users" : {
          "bob": ["r","w","m"],
          "alice" : ["d","w","n", "r"]
        },
        "groups" : {
          "dev-leads" : ["m","r","n"],
          "readers" : ["r"]
        }
    }
}

Security Configuration (Deprecated)

Description: Returns the security configuration (security.xml).
Since: From Artifactory 2.2.0 - 6.x.
Deprecated from Artifactory 7.x and above, it is recommend to replace this REST with Export Access Configuration REST API which uses the access.bootstrap.json.
Notes: This is an advanced feature - make sure the new configuration is really what you wanted before saving.
Security: Requires a valid admin user
Usage: GET /api/system/security
Produces: application/xml
Sample Output:

GET /api/system/security

<security.xml/>

Activate Artifactory Key Encryption

Description: Creates a new Artifactory encryption key and activates Artifactory key encryption.
Since: 3.2.2
Notes: This is an advanced feature intended for administrators
Security: Requires a valid admin user
Usage: POST /api/system/encrypt
Produces: text/plain
Sample Usage:

POST /api/system/encrypt

DONE

Deactivate Artifactory Key Encryption

Description : Removes the current Artifactory encryption key and deactivates Artifactory key encryption.

Since: 3.2.2
Notes: This is an advanced feature intended for administrators
The decrypted state is temporary and will be reactivated following config descriptor updates.
Security: Requires a valid admin user
Usage: POST /api/system/decrypt
Produces: text/plain
Sample Usage:

POST /api/system/decrypt

DONE

Set the Vault Configuration

Description:  Connects the vault to the JFrog Platform to use signing keys stored in the vault.
Note: Requires TLS enabled.
Since:  7.17.4
Security:  Requires an admin user
Usage:  PUT /access/api/v1/vault/configs/hashicorp
Consumes:  application/json

Sample Usage- Authentication Type Certificate
{
  "type": "HashicorpVault",
  "config": {
    "url": "https://my-value.acme.org",
    "auth": {
      "type": "Certificate",
      "certificate": "<PEM FORMAT>",
      "certificateKey": "<PEM FORMAT>"
    },
    "mounts":[
      {
        "path": "my-secrets",
        "type": "kv-v1"
      }
    ]
  }
}

Sample Usage- Authentication Type AppRole
{
  "type": "HashiCorpVault",
  "config": {
    "url": "https://my-value.acme.org",
    "auth": {
      "type": "AppRole",
      "roleId": "....",
      "secretId": "..."
    },
    "mounts":[
      {
        "path": "my-secrets",
        "type": "KV1"
      }
    ]
  }
}
Sample Usage- Authentication Type Agent (Self-Hosted only)
{
  "type": "HashiCorpVault",
  "config": {
    "url": "https://my-value.acme.org",
    "auth": {
      "type": "Agent"
    },
    "mounts":[
      {
        "path": "my-secrets",
        "type": "KV1"
      }
    ]
  }
}


Response Codes:

  • 400: Invalid input, e.g. unsupported secret manager type, auth type, missing auth, etc.
  • 401 / 403: Unauthenticated or unauthorized
  • 409:  Conflict, e.g. TLS is disabled

Delete the Secret Manager Configuration

Description:  Deletes the connection between the vault and JFrog Platform. 
Since:  7.17.4
Security:  Requires an admin user
Usage:  DELETE /access/api/v1/vault/configs/hashicorp
Consumes:  application/json

Sample Usage
DELETE /access/api/v1/vault/configs/hashicorp

Get the Secret Manager Configurations

Description:  Get a list of all configured secret managers. 
Since:  7.17.4
Security:  Requires an admin user
Usage:  GET /access/api/v1/vault/configs
Consumes:  application/json

Sample Usage
[
  {
    "key": "hashicorp",
    "type": "HashicorpVault",
    "config": {
      "auth": {
        "type": "AppRole"
      },
      "url": "http://vault.com",
      "mounts": [
        {
          "type": "KV1",
          "path": "secrets"
        }
      ]
    }
  }
]

Tests the Vault Configuration

Description:  Try to connect to the Vault server.
Note: Requires TLS enabled.
Since:  7.19
Security:  Requires an admin user
Usage:  POST /access/api/v1/vault/configs/test
Consumes:  application/json
Sample usage: see Set the Vault Configuration

Response Codes:

  • 400: if the test fails
  • 204: If the test succeeds

Set GPG Public Key

Description: Sets the public key that Artifactory provides to Debian and Opkg clients to verify packages
Security: Requires a valid admin user
Usage: PUT /api/gpg/key/public
Note that when the GPG key is provided as part of the JSON payload and not in the request header, you need to add the --data-binary flag to the call.
Produces: text/plain
Since: 3.3
Sample Usage :

PUT /api/gpg/key/public

Set Distribution Public GPG Key

Description: Sets the public preconfigured GPG key of a JFrog Distribution service that needs to upload Release Bundles to a source Artifactory and Edge node. The GPG public key will be uploaded under Trusted Keys in the source Artifactory and Edge node. 
Security: Requires a valid admin user
Usage: POST /api/security/keys/trusted
Note that when the public GPG key is provided as part of the JSON payload and not in the request header, you need to add the --data-binary flag to the call.
Consumes: application/json
Since: 6.0
Sample Usage:

API URL: http://<Node>:<Port>/artifactory/api/security/keys/trusted
 Method : POST
 Content-Type: application/json
 Authorization : Basic XXXXXXXXX
 Body : {
 "alias" : "distribution key 1.0.0",
 "public_key" : "-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: BCPG C# v1.6.1.0
 
mQENBFpDamEBCACrrAoudjlwnrRqqjdrCgPwEPyHqYddXPLDHViOVZfiREp9ENkq
2PIThlj79Cj+60ePaE4Kxaze+uH1ckTxhCNIblHWiGUluKxH8Cpy7huCBdwqkD/y


...


x4w+26u0BNxE+4xlWaJ3NUb4CWtXLERfr8aKdkf1RXdMF3c96EXCBtGzLJbhrw==
=D24P
-----END PGP PUBLIC KEY BLOCK-----"
} 
  
Expected Response:{
 "kid": "46635b",
 "fingerprint": "f5:80:6a:1b:08:35:e7:8c:fa:a8:a0:fc:b4:fd:30:87:93:7d:19:22",
 "key": "-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: BCPG C# 1.6.1.0\n\nmQENBFpDamEBCACrrAoudjlwnrRqqjdrCgPwEPyHqYddXPLDHViOVZfiREp9ENkq
2PIThlj79Cj+60ePaE4Kxaze+uH1ckTxhCNIblHWiGUluKxH8Cpy7huCBdwqkD/y
 
... 
 
x4w+26u0BNxE+4xlWaJ3NUb4CWtXLERfr8aKdkf1RXdMF3c96EXCBtGzLJbhrw==
=D24P
-----END PGP PUBLIC KEY BLOCK-----",
 "issued_on": "2017-12-27T09:39:45.000Z",
 "issued_by": "alen@alen.com",
 "valid_until": "1970-01-01T00:00:00.000Z"
} 

Get GPG Public Key

Description: Returns the public key that Artifactory provides to Debian and Opkg clients to verify packages
Security: Requires an authenticated user, or anonymous (if "Anonymous Access" is globally enabled) 
Usage : GET /api/gpg/key/public
Produces : text/plain
Since:  3.3
Sample Usage :

GET /api/gpg/key/public

Set GPG Private Key

Description: Sets the private key that Artifactory will use to sign Debian and ipk packages
Security: Requires a valid admin user
Usage : PUT  /api/gpg/key/private  
Note that when the GPG key is provided as part of the JSON payload and not in the request header, you need to add the --data-binary flag to the call.
Produces : text/plain
Since:  3.3
Sample Usage :

PUT /api/gpg/key/private

Set GPG Pass Phrase

Description: Sets the pass phrase required signing Debian and ipk packages using the private key
Security: Requires a valid admin user
Usage: PUT /api/gpg/passphrase
Headers:  -H X-GPG-PASSPHRASE:passphrase 
Produces : text/plain
Since:  3.3
Sample Usage :

PUT /api/gpg/passphrase

Create Key Pair

DescriptionCreates a new key pair in Artifactory or replaces an existing pair.
Notes: You need to add the --data-binary flag to the call when
 the keys are provided as part of the JSON payload.
Since: 7.6.0
Security:Requires a valid admin user
Usage
POST /api/security/keypair
Sample Usage

POST /api/security/keypair

{
  "pairName": "alpine-local-key" (mandatory),
  "pairType": "RSA" (mandatory),
  "alias": "artifactory-alpine-local" (mandatory),
  "": "-----BEGIN PRIVATE KEY-----
   MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgVcB/UNPxalR9zDYAjQIf
   jojUDiQuGnSJrFEEzZPT/92hRANCAASc7UJtgnF/abqWM60T3XNJEzBv5ez9TdwK
   H0M6xpM2q+53wmsN/eYLdgtjgBd3DBmHtPilCkiFICXyaA8z9LkJ
   -----END PRIVATE KEY-----" (mandatory),
  "publicKey": "-----BEGIN PUBLIC KEY-----
   MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1yHJxQgsHQREclQu4Ohe
   qxTxd1tHcNnvnQTu/UrTky8wWvgXT+jpveroeWWnzmsYlDI93eLI2ORakxb3gA2O
   Q0Ry4ws8vhaxLQGC74uQR5+/yYrLuTKydFzuPaS1dK19qJPXB8GMdmFOijnXX4SA
   jixuHLe1WW7kZVtjL7nufvpXkWBGjsfrvskdNA/5MfxAeBbqPgaq0QMEfxMAn6/R
   L5kNepi/Vr4S39Xvf2DzWkTLEK8pcnjNkt9/aafhWqFVW7m3HCAII6h/qlQNQKSo
   GuH34Q8GsFG30izUENV9avY7hSLq7nggsvknlNBZtFUcmGoQrtx3FmyYsIC8/R+B
   ywIDAQAB
   -----END PUBLIC KEY-----" (mandatory),
   "passphrase": "YouShallNotPass"
}
Vault Sample Usage
{
  "pairName": "alpine-local-key" (mandatory),
  "pairType": "RSA" (mandatory),
  "alias": "artifactory-alpine-local" (mandatory),
  "vaultKey": "hashicorp",
  "vaultPublicKey":  {"path": "secret/default-gpg-key", "key": "gpg.key.pub"},
}

Response codes: 201 Successful with an empty response.


Get Key Pair

DescriptionReturns the details of a key pair. 
Since: 7.6.0
Security: Requires an authenticated user, or anonymous (if "Anonymous Access" is globally enabled).
Usage: GET /api/security/keypair/{keyPairName}
Produces: application/json
Sample Usage:

{
  "pairName": "alpine-local-key",
  "pairType": "RSA",
  "alias": "artifactory-alpine-local",
  "publicKey": "-----BEGIN PUBLIC KEY-----",
}

Delete Key Pair

Description:  Deletes a key pair.
Returns 200 code with an 'OK' text in case of success with an empty response.
Since: 7.6.0
Security: Requires a valid admin user.
Usage: DELETE /api/security/keypair/{keyPairName}


Get Key Pair Public Key Per Repository

Description: Returns the public key assigned to a repository.
Note: To retrieve the key with its appropriate filename, run cURL request with flags
-O -J.
Since: 7.6.0
Security: Requires an authenticated user, or anonymous (if "Anonymous Access" is globally enabled).
Usage: GET /api/security/keypair/public/repositories/{repoKey}
Produces: text/plain as an attachment with the filename being the KeyPair  alias field via a content-disposition header.
Sample Output:

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1yHJxQgsHQREclQu4Ohe
qxTxd1tHcNnvnQTu/UrTky8wWvgXT+jpveroeWWnzmsYlDI93eLI2ORakxb3gA2O
Q0Ry4ws8vhaxLQGC74uQR5+/yYrLuTKydFzuPaS1dK19qJPXB8GMdmFOijnXX4SA
jixuHLe1WW7kZVtjL7nufvpXkWBGjsfrvskdNA/5MfxAeBbqPgaq0QMEfxMAn6/R
L5kNepi/Vr4S39Xvf2DzWkTLEK8pcnjNkt9/aafhWqFVW7m3HCAII6h/qlQNQKSo
GuH34Q8GsFG30izUENV9avY7hSLq7nggsvknlNBZtFUcmGoQrtx3FmyYsIC8/R+B
ywIDAQAB
-----END PUBLIC KEY-----

Multiple GPG Signing Keys APIs

The JFrog Platform supports managing multiple pairs of GPG signing keys to sign packages for authentication of several package types such as Debian, Opkg, and RPM using a set of REST APIs. This feature enables you to assign a signing key pair per repository, providing you with the granularity to choose which keys to use to sign the artifacts in repositories instead of using the same key pair to sign all artifacts.

The following repository REST APIs support working with Multiple GPG Signing Keys.  The Create RSA Key Pair, Get Key Pair , and Delete Key Pair APIs are also supported. 


Set Key

Description : Sets the GPG keys for the repository. 
Since : 7.19 
Security : Requires a valid admin user
Usage : POST /api/v2/repositories/<repo-name>/keyPairs
Sample Usage :

curl -X POST -uadmin:password "http://localhost:8080/artifactory/api/v2/repositories/debian-local/keyPairs" --data-binary 'key-name' --header 'Content-Type: text/plain'

Delete Key

Description : Removes the key pair from the repository.
Since : 7.19
Security : Requires a valid admin user
Usage : DELETE /api/v2/repositories/<repo-name>/keyPairs
Sample Usage :

curl -X DELETE -uadmin:password "http://localhost:8082/artifactory/api/v2/repositories/debian-local/keyPairs/foo"



Download Primary Key

Description : Downloads the primary key.
Since : 7.19
Security : Requires a valid admin user
Usage : GET /api/v2/repositories/<repo-name>/keyPairs/primary/public
Sample Usage :

curl -X GET -uadmin:password "http://localhost:8080/artifactory/api/v2/repositories/debian-local/keyPairs/primary/public"

Sample Response :

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Keybase OpenPGP v1.0.0
Comment: https://keybase.io/crypto
xo0EYFtBJQEEAL5J3YCUKGvdmZm4Pz4Lv+1sQGV7DXKg9FBN16iBPtkkb8OQOpm0
WKM4wxtaHVexY85b1fukPcQbwXruJsC7N561eErDbGI+e4oSKLuwuh36p61SXlb0
vEcJ1BQ9RvURNrOr9FZ/kmz6ZXF2BfZcNhKCvtb9FrCFHbdg1gz070J3ABEBAAHN
Gk9tcmkgWml2IDxvbXJpekBqZnJvZy5jb20+wq0EEwEKABcFAmBbQSUCGy8DCwkH
AxUKCAIeAQIXgAAKCRDiyYShXcZUR4DcBACmvtHnrMrvpIK+k0gomTG4yxuvyw+D
Pu1pQfBvcPx1ZgO9LAFOkZufsvIggcZFoT83Al5K+UM0ScE9B/mhRkAlWFCU/kI5
iHkmwVgquZY1gDngnNPDpGU6IFz7m+JY2dCh8h2Pv/L9RXGFz9Y4ap3TwMdESHyz
dctf4Xs+Vl2Ot86NBGBbQSUBBACra/j7LOgJ+cXnn8/H61y203/Kfvv94M8Ql1pl
bI8J+I1PrMGaUJV7skxFMKuAR6arwRhGQD1aXaum7lGHEMgXjQcH8XWYRRB2nHB6
OCb9WcBBU08TNeVL/33yIGvqUEhyBa+rg8LACzB1NLijnbMrAgOEjSFPtwoz/oWN
k4ElKQARAQABwsCCBBgBCgAPBQJgW0ElBQkPCZwAAhsuAKcJEOLJhKFdxlRHnCAE
GQEKAAYFAmBbQSUACgkQlcfAo4P7X+FsYwP3SjYhtFo6m+bPpNmWmb252R2EJbgG
2WqemuNWfd+TdUnS3m5/14AgDNeLWk6Wq2DXxyromY7xRMS3XqfVOrxEUx6pz06c
E+l7L244mOaTBwxw75aFcvS4KlPdt/ltx9yUjXZwUAcg27B+06YYzbFk6eOVnHvW
x6drBMfQG2SAKVPeA/4u2kyNX5fJ0L019MQ9ThrAldlQ+yxrPpQLLm5w6eFYO5F1
dXtJpZBpA8vQWqpabMwYsY7678P64HZuK0Gg+VnKp+b/WnQ575xgOKUwxZaX8awH
ZS5vYfVDiOgBdPAMS4uzDX4hVyDH+RiEspN1lvHO1wtb2VwFr//rLhOE+9c5C86N
BGBbQSUBBACt2ljFYEKk1GMEcqau6rnMXSf17o6sTbXp/s8cxecz0EQAA7khyVuZ
wM/pjO4kNp32Qm+qGCl/S4+3iHAp5WJOEuxtLG3ajninpuZjG9BjSMzXdbQDVIeK
Z4N2lSnJ0oPvA1o+hkc8iRxVbJsDjCk55qUw3Op64pIjcCa6Dro0PQARAQABwsCD
BBgBCgAPBQJgW0ElBQkPCZwAAhsuAKgJEOLJhKFdxlRHnSAEGQEKAAYFAmBbQSUA
CgkQXWwRccpztEU92gP8C8Y/3Fr1G2vK716FZOP5q9NErJZTHFQuFGmpDgyAveEo
3C24aBf6ouIDbRPFb1S2SiM3SfalozAtzpmOWW7aNOMtOF+Xs083UML7GaJk81Ge
YqdWHv4znr2QBRgt8r0+DBV66eAI61Q+byyNewezrrr+8TRy0U6r1Xw9AE9oMS4O
6QP9F0tSdHaklWrIU9QtwSTt6B/MEp3v/O8TBb8ouz0sh7WcCGBu2nP1Avw7nRJw
js4ULXME1EW6vk/WD+m+8UcF8Okho6aQArJJoKETyVmSQYRw/1BJXP1FXtds16R0
sGZgi5TKHxI9dVjLEnjuuxor+vKkpxeLoxDkYVJN1QUNS0U=
=kJ6g
-----END PGP PUBLIC KEY BLOCK-----



Download Secondary Public Key

Description : Downloads the secondary key.
Since : 7.19
Security : Requires a valid admin user
Usage : GET /api/v2/repositories/<repo-name>/keyPairs/secondary/public
Sample Usage :

curl -X GET -uadmin:password "http://localhost:8080/artifactory/api/v2/repositories/debian-local/keyPairs/secondary/public"

Sample Response :

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Keybase OpenPGP v1.0.0
Comment: https://keybase.io/crypto
xo0EYFtBJQEEAL5J3YCUKGvdmZm4Pz4Lv+1sQGV7DXKg9FBN16iBPtkkb8OQOpm0
WKM4wxtaHVexY85b1fukPcQbwXruJsC7N561eErDbGI+e4oSKLuwuh36p61SXlb0
vEcJ1BQ9RvURNrOr9FZ/kmz6ZXF2BfZcNhKCvtb9FrCFHbdg1gz070J3ABEBAAHN
Gk9tcmkgWml2IDxvbXJpekBqZnJvZy5jb20+wq0EEwEKABcFAmBbQSUCGy8DCwkH
AxUKCAIeAQIXgAAKCRDiyYShXcZUR4DcBACmvtHnrMrvpIK+k0gomTG4yxuvyw+D
Pu1pQfBvcPx1ZgO9LAFOkZufsvIggcZFoT83Al5K+UM0ScE9B/mhRkAlWFCU/kI5
iHkmwVgquZY1gDngnNPDpGU6IFz7m+JY2dCh8h2Pv/L9RXGFz9Y4ap3TwMdESHyz
dctf4Xs+Vl2Ot86NBGBbQSUBBACra/j7LOgJ+cXnn8/H61y203/Kfvv94M8Ql1pl
bI8J+I1PrMGaUJV7skxFMKuAR6arwRhGQD1aXaum7lGHEMgXjQcH8XWYRRB2nHB6
OCb9WcBBU08TNeVL/33yIGvqUEhyBa+rg8LACzB1NLijnbMrAgOEjSFPtwoz/oWN
k4ElKQARAQABwsCCBBgBCgAPBQJgW0ElBQkPCZwAAhsuAKcJEOLJhKFdxlRHnCAE
GQEKAAYFAmBbQSUACgkQlcfAo4P7X+FsYwP3SjYhtFo6m+bPpNmWmb252R2EJbgG
2WqemuNWfd+TdUnS3m5/14AgDNeLWk6Wq2DXxyromY7xRMS3XqfVOrxEUx6pz06c
E+l7L244mOaTBwxw75aFcvS4KlPdt/ltx9yUjXZwUAcg27B+06YYzbFk6eOVnHvW
x6drBMfQG2SAKVPeA/4u2kyNX5fJ0L019MQ9ThrAldlQ+yxrPpQLLm5w6eFYO5F1
dXtJpZBpA8vQWqpabMwYsY7678P64HZuK0Gg+VnKp+b/WnQ575xgOKUwxZaX8awH
ZS5vYfVDiOgBdPAMS4uzDX4hVyDH+RiEspN1lvHO1wtb2VwFr//rLhOE+9c5C86N
BGBbQSUBBACt2ljFYEKk1GMEcqau6rnMXSf17o6sTbXp/s8cxecz0EQAA7khyVuZ
wM/pjO4kNp32Qm+qGCl/S4+3iHAp5WJOEuxtLG3ajninpuZjG9BjSMzXdbQDVIeK
Z4N2lSnJ0oPvA1o+hkc8iRxVbJsDjCk55qUw3Op64pIjcCa6Dro0PQARAQABwsCD
BBgBCgAPBQJgW0ElBQkPCZwAAhsuAKgJEOLJhKFdxlRHnSAEGQEKAAYFAmBbQSUA
CgkQXWwRccpztEU92gP8C8Y/3Fr1G2vK716FZOP5q9NErJZTHFQuFGmpDgyAveEo
3C24aBf6ouIDbRPFb1S2SiM3SfalozAtzpmOWW7aNOMtOF+Xs083UML7GaJk81Ge
YqdWHv4znr2QBRgt8r0+DBV66eAI61Q+byyNewezrrr+8TRy0U6r1Xw9AE9oMS4O
6QP9F0tSdHaklWrIU9QtwSTt6B/MEp3v/O8TBb8ouz0sh7WcCGBu2nP1Avw7nRJw
js4ULXME1EW6vk/WD+m+8UcF8Okho6aQArJJoKETyVmSQYRw/1BJXP1FXtds16R0
sGZgi5TKHxI9dVjLEnjuuxor+vKkpxeLoxDkYVJN1QUNS0U=
=kJ6g
-----END PGP PUBLIC KEY BLOCK-----

Set Primary Key

Description : Sets the Primary Key for the repository.
Since : 7.19
Security : Requires a valid admin user
Usage : POST /api/v2/repositories/<repo-name>/keyPairs/primary
Sample Usage :

curl -X POST -uadmin:password "http://localhost:8080/artifactory/api/v2/repositories/debian-local/keyPairs/primary" --data-binary 'key-name' --header 'Content-Type: text/plain'

Set Secondary Key

Description : Sets the secondary key for the repository that will be used as a backup key, in case the primary key has been removed.
Since : 7.19
Security : Requires a valid admin user
Usage : POST /api/v2/repositories/<repo-name>/keyPairs/primary
Sample Usage :

curl -X POST -uadmin:password "http://localhost:8080/artifactory/api/v2/repositories/debian-local/keyPairs/secondary" --data-binary 'key-name' --header 'Content-Type: text/plain'

Delete Primary Key

Description : Deletes the primary key from the repository.
Since : 7.19
Security : Requires a valid admin user
Usage : DELETE /api/v2/repositories/<repo-name>/keyPairs/primary
Sample Usage :

curl -X DELETE -uadmin:password "http://localhost:8080/artifactory/api/v2/repositories/debian-local/keyPairs/primary" --header 'Content-Type: text/plain'

Delete Secondary Key

Description : Deletes the secondary key from the repository. 
Since : 7.19
Security : Requires a valid admin user
Usage : DELETE /api/v2/repositories/<repo-name>/keyPairs/secondary
Sample Usage :

curl -X DELETE -uadmin:password "http://localhost:8080/artifactory/api/v2/repositories/debian-local/keyPairs/secondary" --header 'Content-Type: text/plain'

Promote 

Description : Promotes the secondary key to be the primary key for the repository.
Since : 7.19
Security : Requires a valid admin user
Usage : POST /api/v2/repositories/<repo-name>/keyPairs/promote
Sample Usage :

curl -X POST -uadmin:password "http://localhost:8080/artifactory/api/v2/repositories/debian-local/keyPairs/promote"



Update Key Pair

Description : Updates a key pair with new key pairs.
Since : 7.19 
Security : Requires a valid admin user
Usage : PUT /api/security/keypair
Sample Usage :

curl -X PUT -uadmin:password "http://localhost:8080/artifactory/api/security/keypair" --header 'Content-Type: application/json' --data '@json-input'

Sample Response :

{
   "alias":"alias1",
   "pairName":"name1",
  
   "publicKey":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq……..0QIDAQAB\n-----END PUBLIC KEY-----",
   "pairType":"GPG"
}



Verify Key Pair

Description : Verifies the validity of the key pair.
Since : 7.19
Security : Requires a valid admin user
Usage : POST /api/security/keypair/verify
Sample Usage :

curl -X POST -uadmin:password "http://localhost:8080/artifactory/api/security/keypair/verify" --header 'Content-Type: application/json' --data '@json-input'

Sample Response :

{

   "alias":"alias1",

   "pairName":"name1",



   "publicKey":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq……..0QIDAQAB\n-----END PUBLIC KEY-----",

   "pairType":"GPG"

}

Get All Key Pairs

Description : Returns details of all the key pairs.
Since : 7.19
Security : Requires a valid admin user
Usage : GET /api/security/keypair
Sample Usage :

curl -X GET -uadmin:password "http://localhost:8080/artifactory/api/security/keypair"

Sample Response:

[{
   "alias":"alias1",
   "pairName":"name1",
  
   "publicKey":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq……..0QIDAQAB\n-----END PUBLIC KEY-----",
   "pairType":"GPG"
}, {
   "alias":"alias2",
   "pairName":"name2",
   "publicKey":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq……..0QIDAQAB\n-----END PUBLIC KEY-----",
   "pairType":"GPG"
}]

Get Service ID

Description: Provides the service ID of an Artifactory instance or cluster. Up to version 5.5.1, the Artiafctory service ID is formatted jf-artifactory@<id>. From version 5.5.2 the service ID is formatted jfrt@<id>.
Since: 5.0.0
Security: Requires an admin user
Usage:  GET /api/system/service_id
Produces: text/plain
Sample Usage:

curl -uadmin:password -XGET "http://localhost:8081/artifactory/api/system/service_id"
 
200
jfrt@ee27b1d1-534d-4723-80b5-5bd893d19c43



Get Certificates

Description: Returns a list of installed SSL certificates.
Since:5.4.0
Security: Requires an admin user 
UsageGET /api/system/security/certificates
Produces: application/json

[
 {
      "certificateAlias" : "<The Certificate Alias>", 
      "issuedTo" : "<The entity to whom the certificate was issued>",
      "issuedBy" : "<The issuing entity>", 
      "issuedOn" : "<ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ)>",
      "validUntil" : "<ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ)>",
      "fingerPrint" : "<The certificate's SHA256 fingerprint>"
 }
]

Sample Usage:

GET /api/system/security/certificates
 
[
  {
      "certificateAlias" : "example1", 
      "issuedTo" : "JFrog",
      "issuedBy" : "Some_CA", 
      "issuedOn" : "Sun May 01 2017 10:00:00 GMT +02:00 (UTC)",
      "validUntil" : "Sun May 01 2019 10:00:00 GMT +02:00 (UTC)",
      "fingerPrint" : "ab:cd:ef:gh"
  }, 
  {
      "certificateAlias" : "example2", 
      "issuedTo" : "Cool-Company",
      "issuedBy" : "Some_Other_CA", 
      "issuedOn" : "Sun May 01 2017 10:00:00 GMT +02:00 (UTC)",
      "validUntil" : "Sun May 01 2019 10:00:00 GMT +02:00 (UTC)",
      "fingerPrint" : "ab:cd:ef:gh"
  }
]

 


Add Certificate

Description: Adds an SSL certificate.
Since:5.4.0
Security: Requires an admin user 
UsagePOST /api/system/security/certificates/{Certificate_alias} -T {Certificate PEM file}
Consumesapplication/text

Produces:  application/json

{  "status" : 200,
   "message" : ["The certificates were successfully installed"]
}

Delete Certificate

Description: Deletes an SSL certificate.
Since:5.4.0
Security: Requires an admin user 
UsageDELETE /api/system/security/certificates/{Certificate_alias}
Producesapplication/json
Sample Usage:

DELETE /api/security/certificates/cert1
  
Response:
{
  "status" : 200,
  "message" : "The certificates were successfully deleted"
}



Deprecated Security APIs

In the list of APIs below, only the APIs that have already been replaced by new Security APIs will be marked as deprecated.

Get Users

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Get the users list
Since: 2.4.0
Notes: Requires Artifactory Pro
To support spaces in the User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .
Security: Requires an admin user
Usage: GET /api/security/users
Producesapplication/json (application/vnd.org.jfrog.artifactory.security.Users+json)
Sample Output:

GET /api/security/users
[
  {
    "name": "davids"
    "uri" : "http://localhost:8081/artifactory/api/security/users/davids"
    "realm" : "internal"
  }, {
    "name": "danl"
    "uri" : "http://localhost:8081/artifactory/api/security/users/danl"
    "realm" : "ldap"
  }
]

Create or Replace User

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Creates a new user in Artifactory or replaces an existing user
Since: 2.4.0
Notes: Requires Artifactory Pro
Missing values will be set to the default values as defined by the consumed type.
Security: Requires an admin user
Usage: PUT /api/security/users/{userName}
Consumesapplication/json (application/vnd.org.jfrog.artifactory.security.User+json)
Sample Usage:

PUT /api/security/users/davids
{
user.json
}

Update User

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Updates an existing user in Artifactory with the provided user details.
Since: 2.4.0
Notes: Requires Artifactory Pro
- Missing values will be set to the default values as defined by the consumed type
To support spaces in the User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .
Security: Requires an admin user
Usage: POST /api/security/users/{userName}
Consumesapplication/json (application/vnd.org.jfrog.artifactory.security.User+json)
Sample Usage:

POST /api/security/users/davids
{
user.json
}

Delete User

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Removes an Artifactory user.
Since: 2.4.0
Notes: Requires Artifactory Pro
To support spaces in User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .
Security: Requires an admin user
Usage: DELETE /api/security/users/{userName}
Produces: application/text
Sample Usage:

DELETE /api/security/users/davids

User 'davids' has been removed successfully.

Expire Password for a Single User

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Expires a user's password
Since: 4.4.2
Notes: Requires Artifactory Pro
Security: Requires an admin user
Usage: POST /api/security/users/authorization/expirePassword/{userName}
Sample Usage:

POST /api/security/users/authorization/expirePassword/davids

Change Password

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Changes a user's password
Since: 4.4.2
Notes: Requires Artifactory Pro
Security: Admin can apply this method to all users, and each (non-anonymous) user can use this method to change their own password.
Usage: POST /api/security/users/authorization/changePassword  -H "Content-type: application/json" -d ' { "userName" : "{user}", "oldPassword" : "{old password}", "newPassword1" : "{new password}", "newPassword2" : "{verify new password}" }
Produces: application/text
Sample Usage:

POST /api/security/users/authorization/changePassword -H "Content-type: application/json" -d '{ "userName" : "davids", "oldPassword" : "op", "newPassword1" : "np", "newPassword2" : "np" }'

Unlock Locked Out User

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Unlocks a single user that was locked out due to recurrent incorrect login attempts.

Security:  Requires a valid admin user
Usage: POST /api/security/unlockUsers/{userName}
Produces:  application/text
Since: 4.4
Sample Usage:

POST /api/security/unlockUsers/{userName}
 

Get Groups

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Get the groups list
Since: 2.4.0
Notes: Requires Artifactory Pro
Security: Requires an admin user
To support spaces in the User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .
Usage: GET /api/security/groups
Produces: application/json (application/vnd.org .jfrog.artifactory.security.Users+json) , application/json (application/vnd.org.jfrog.artifactory.security.Groups+json), application/json (application/vnd.org.jfrog.artifactory.security.PermissionTargets+json)
Sample Output:

GET /api/security/groups
[
  {
    "name": "readers"
    "uri" : "http://localhost:8081/artifactory/api/security/groups/readers"
  }, {
    "name": "tech-leads"
    "uri" : "http://localhost:8081/artifactory/api/security/groups/tech-leads"
  }
]

Get Group Details

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Get the details of an Artifactory Group
Since: 2.4.0
Notes: Requires Artifactory Pro
From version 6.13, you can use the includeUsers parameter (includeUsers=true) to get the users details.
Security: Requires an admin user
Usage: GET /api/security/groups/{groupName}
Producesapplication/json (application/vnd.org .jfrog.artifactory.security.Group+json)

Sample Output:

GET /api/security/groups/dev-leads
{
group.json
}

Create or Replace Group

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Creates a new group in Artifactory or replaces an existing group
Since: 2.4.0
Notes: Requires Artifactory Pro
- Missing values will be set to the default values as defined by the consumed type.
To support spaces in the User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .
Security: Requires an admin user
Usage: PUT /api/security/groups/{groupName}
Consumesapplication/json (application/vnd.org.jfrog.artifactory.security.Group+json)
Sample Usage:

PUT /api/security/groups
{
group.json
}

Update Group

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Updates an existing group in Artifactory with the provided group details.
Since: 2.4.0
Notes: Requires Artifactory Pro
- To support spaces in the User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .

- From Artifactory 7.15.3, you can enforce using lower case characters in user names when associating users to groups by setting the validate.lowercase.username.on.group to true . The default is set to false. When set to true, an error will be generated if an upper case character is used in a user name.

Security : Requires an admin user
Usage : POST /api/security/groups/{groupName}
Consumes application/json (application/vnd.org.jfrog.artifactory.security.Group+json)

Sample Usage :

POST /api/security/groups/dev-leads
{
group.json
}

Delete Group

From Artifactory release 7.49.3, these APIs are being replaced by the new SECURITY APIs available in the JFrog Platform.

Description: Removes an Artifactory group.
Since: 2.4.0
Notes: Requires Artifactory Pro
To support spaces in the User or Group or Permission names, a Plus symbol ('+') is automatically placed when there is a space. This is set by default as the artifactory. security.api.plus.insteadof.space property  is set to  true . If you want to use the + (plus) symbol, set the artifactory. security.api.plus.insteadof.space  to  false .
Security: Requires an admin user
Usage: DELETE /api/security/groups/{groupName}
Produces: application/text
Sample Usage:

DELETE /api/security/groups/dev-leads

Group 'dev-leads' has been removed successfully.

Create Token (Deprecated)

This API is being deprecated and replaced by the Access Tokens.

Description: Creates an access token
Since: 5.0.0
Security: Requires a valid user
Usage
: POST /api/security/token
Content-Type:  application/x-www-form-urlencoded 

Produces: application/json

{
   "access_token":   "<the access token>",
   "expires_in":    <Validity period in seconds>,
   "scope":         "<access scope>",
   "token_type":    "Bearer",
   "refresh_token": "<the refresh token if access_token is refreshable>"
}

Sample Usage:

curl -uadmin:password -XPOST "http://localhost:8081/artifactory/api/security/token" -d "username=johnq" -d "scope=member-of-groups:readers"
 
200
{
   "access_token":   "adsdgbtybbeeyh...",
   "expires_in":    3600,
   "scope":         "api:* member-of-groups:readers",
   "token_type":    "Bearer",
   "refresh_token": "fgsfgsdugh8dgu9s8gy9hsg..."
}

This endpoint takes the following parameters:

grant_type

[Optional, default: "client_credentials"]

The grant type used to authenticate the request. In this case, the only value supported is "client_credentials" which is also the default value if this parameter is not specified.

username

The user name for which this token is created. If the user does not exist, a transient user is created. Non-admin users can only create tokens for themselves so they must specify their own username.

If the user does not exist, the member-of-groups scope token must be provided (e.g. member-of-groups: g1, g2, g3...)

scope

The scope to assign to the token provided as a space-separated list of scope tokens. Currently there are three possible scope tokens:

  • "api:*" - indicates that the token grants access to REST API calls. This is always granted by default whether specified in the call or not.
  • member-of-groups:[<group-name>] - indicates the groups that the token is associated with (e.g. member-of-groups: g1, g2, g3... ). The token grants access according to the permission targets specified for the groups listed.

    Space in a group name

     If any of the group names includes a space character, the whole value should be enclosed in escaped quotation marks. For example:

    scope=member-of-groups:\"readers,test group\"

    Specify "*" for group-name to indicate that this is a "user-scoped token", i.e., the token provides the same access privileges that the current subject, as specified in the username parameter, has, and is therefore evaluated dynamically.
    A non-admin user can only provide a scope that is a subset of the groups to which the user belongs.

  • "jfrt@<instance-id>:admin" - provides admin privileges on the specified Artifactory instance. This is only available for administrators.


expires_in

[Optional, default: 3600]

The time in seconds for which the token will be valid. To specify a token that never expires, set to zero. Non-admin can only set a value that is equal to or less than the default 3600.

refreshable

[Optional, default: false]

If true, this token is refreshable and the refresh token can be used to replace it with a new token once it expires.

audience

[Optional, default: Only the service ID of the Artifactory instance that created the token]

A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs as obtained from the Get Service ID endpoint.

In case you want the token to be accepted by all Artifactory instances you may use the following audience parameter "audience=jfrt@*".


Refresh Token (Deprecated)

This API is being deprecated and replaced by the Access Tokens.

Description: Refresh an access token to extend its validity. If only the access token and the refresh token are provided (and no other parameters), this pair is used for authentication. If username or any other parameter is provided, then the request must be authenticated by a token that grants admin permissions.
Since: 5.0.0
Security: Requires a valid user (unless both access token and refresh token are provided)
Usage:  POST /api/security/token

Content-Type:  application/x-www-form-urlencoded

Produces : application/json (refer to  Create Token )

Sample Usage: 

curl -XPOST "http://localhost:8081/artifactory/api/security/token" -d "grant_type=refresh_token" -d "refresh_token=fgsg53t3g…" -d "access_token=gsfdgw35gt..."
 
200 (Success) As in Create Token
 
400 (Error) If the token was created by a different Artifactory instance (and hence cannot be refreshed)

This endpoint takes the following parameters:

grant_type

Should be set to refresh_token.

refresh_token
The refresh token of the access token that needs to be refreshed.
access_token

The access token to refresh.

username

Refer to Create Token.

Note: access_token and username are mutually exclusive, so only one of these parameters should be specified.

If access_token is provided, the new token is created with the same settings as that token.


scope
expires_in
refreshable
audience

Get Tokens (Deprecated)

This API is being deprecated and replaced by the Access Tokens .

Description: Get a list of all tokens created by an Artifactory instance
Since: 5.0.0
Security: Requires an admin user
Usage:  GET /api/security/token
Content-Type: application/x-www-form-urlencoded

Produces: application/json 

{
  "tokens":[
    {
      "token_id":"<the token id>",
      "issuer":"<the service ID of the issuing Artifactory instance>",
      "subject":"<subject>",
      "expiry": <time when token expires as seconds since 00:00:00 1/1/1970>,
      "refreshable":<true | false>,
      "issued_at":<time issued as seconds since 00:00:00 1/1/1970>,
    }, ...
  ]
}


Sample Usage:

curl -uadmin:password -XGET "http://localhost:8081/artifactory/api/security/token

 
200 OK
{
  "tokens":[
    {
      "token_id":"123",
      "issuer":"jf-artifactory@123123",
      "subject":"jf-artifactory@123123/users/theusername",
      "expiry":145154545,
      "refreshable":true,
      "issued_at":144152345
    }, ...
  ]
}

Revoke Token (Deprecated)

This API is being deprecated and replaced by the Access Tokens .

Description: Revoke an access token by specifying the token or the token_id
Since: 5.0.0
Security: Requires an admin user
Usage:  POST /api/security/token/revoke
Content-Type:  application/x-www-form-urlencoded

Produces: application/json 
Sample Usage:

curl -uadmin:password -XPOST "http://localhost:8081/artifactory/api/security/token/revoke" -d "token=fasdt3..."
or
curl -uadmin:password -XPOST "http://localhost:8081/artifactory/api/security/token/revoke" -d "token_id=7e0eec..."
 
200 OK (Also returned if the token was already revoked or non-existent)
 
400 (Error) If the token was created by a different Artifactory instance (and hence cannot be revoked)

This endpoint can take either of the following parameters:

token

The token to be revoked

token_id
The ID of the token to be revoked

Save Security Configuration (Deprecated)

Description: Save the security configuration (security.xml). Requires the security.xml file from the same version.
Since: From Artifactory 2.2.0 - 6.x.
Deprecated from Artifactory 7.x and above, it is recommend to replace this REST with Export Access Configuration REST API which uses the access.bootstrap.json.
Security: Requires a valid admin user
Usage: POST /api/system/security
Consumes: application/xml
Sample Usage:

POST /api/system/security

<security.xml/>


REPOSITORIES

Get Repositories

Description: Returns a list of minimal repository details for all repositories of the specified type.
Note:
Federated Repositories are supported from Artifactory 7.18.3 and require an Enterprise or Enterprise+ subscription.
Since
: 2.2.0 (packageType option was introduced in version 6.2.0)
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/repositories[?type=repositoryType (local|remote|virtual|federated|distribution)]|[&packageType=alpine|bower | cargo| chef|cocoapods |composer| conan|conda|cran|debian|docker| gems|gitlfs|go|gradle|helm|ivy|maven|npm|nuget|opkg|pub|puppet|pypi|p2|rpm|sbt|swift|terraform|vagr ant|vcs|yum| generic]
Produces : application/json (application/ vnd.org .jfrog.artifactory.repositories.RepositoryDetailsList+json)
Sample Output :

GET /api/repositories
[
  {
    "key" : "libs-releases-local",
    "type" : "LOCAL",
    "description" : "Local repository for in-house libraries",
    "url" : "http://localhost:8081/artifactory/libs-releases-local",
    "packageType": "Generic"
  }, {
    "key" : "libs-snapshots-local",
    "type" : "LOCAL",
    "description" : "Local repository for in-house snapshots",
    "url" : "http://localhost:8081/artifactory/libs-snapshots-local",
    "packageType": "Maven"
  }
]

Repository Configuration

Description: Returns the current configuration of a repository. Supported by local, remote, virtual and federated repositories.
Since: 2.3.0
Notes:
Supported JFrog Subscriptions:
- Local, remote, and virtual repositories require a Pro subscription.
- Federated repositories are supported from Artifactory 7.18.3 and require an Enterprise or Enterprise+ subscription.
Security: Requires an admin user for complete repository configuration. Non-admin users will receive only partial configuration data.
Usage: GET /api/repositories/{repoKey}
Producesapplication/json (application/vnd.org.jfrog.artifactory.repositories.LocalRepositoryConfiguration+json), application/json (application/vnd.org.jfrog.artifactory.repositories.RemoteRepositoryConfiguration+json),
application/json (application/vnd.org.jfrog.artifactory.repositories.VirtualRepositoryConfiguration+json)application/vnd.org.jfrog.artifactory.repositories.FederatedRepositoryConfiguration+json

Sample Output:

GET /api/repositories/libs-release-local
{
repository-config.json
}

Create Repository

Description: Creates a new repository in Artifactory with the provided configuration. Supported by local, remote, virtual and federated repositories. 
Since: 2.3.0
Notes

  • Supported JFrog Subscriptions:
    - Local, remote, and virtual repositories require a Pro subscription.
    - Federated repositories are supported from Artifactory 718.3 and require an Enterprise or Enterprise+ subscription.
  • If a repository with the specified repoKey already exists, the call fails with a 400 response.
  • Missing values are set to the default values as defined by the consumed type spec.
  • For a repository to be identified as Smart Remote Repository, you need to set the “enabled” flag to true under “contentSynchronisation” (under Repository Configuration JSON).
  • To enable CDN Distribution on the repository, set the cdnRedirect flag on the repository. Applies to Artifactory Cloud and requires an Enterprise or Enterprise+ license.
  • In an Artifactory environment with more than several thousands of repositories, and a low-to-moderate level of concurrency in repository CRUD operations, there can be a data contention that the system will attempt to solve by retrying the operation. The number of retries is configurable using the artifactory.central.config.save.number.of.retries system property. The default value is 5.
  • In such environments, it is also possible that changes made by a CUD operation may take up to tens of seconds or several minutes to propagate down and become fully visible in the application (for example, when trying to read a newly created repository via the REST API).

These are known issues that will be fixed in one of the future versions of Artifactory.

Security: Requires an admin user. 
Usage: PUT /api/repositories/{repoKey}
Consumesapplication/json (application/vnd.org.jfrog.artifactory.repositories.LocalRepositoryConfiguration+json)application/json (application/vnd.org.jfrog.artifactory.repositories.RemoteRepositoryConfiguration+json)
application/json (application/vnd.org.jfrog.artifactory.repositories.VirtualRepositoryConfiguration+json)application/vnd.org.jfrog.artifactory.repositories.FederatedRepositoryConfiguration+json
Sample Usage:

PUT /api/repositories/libs-release-local
{
repository-config.json
}

Update Repository Configuration

Description: Updates an existing repository configuration in Artifactory with the provided configuration elements. Supported by local, remote, virtual, and federated repositories.
Since: 2.3.0
Notes

  • Supported JFrog Subscriptions:
    - Local, remote, and virtual repositories require a Pro subscription.
    - Federated repositories are supported from Artifactory 7.18.3 and require an Enterprise or Enterprise+ subscription.
  • To enable CDN Distribution on the repository, set the cdnRedirect flag on the repository. Applies to Artifactory Cloud and requires an Enterprise or Enterprise+ license.
  • The class of a repository the rclass  attribute cannot be updated.

Security: Requires an admin user
Usage: POST /api/repositories/{repoKey} -H "Content-Type: application/json"
Consumesapplication/json (application/vnd.org.jfrog.artifactory.repositories.LocalRepositoryConfiguration+json)application/json (application/vnd.org.jfrog.artifactory.repositories.RemoteRepositoryConfiguration+json)
application/json (application/vnd.org.jfrog.artifactory.repositories.VirtualRepositoryConfiguration+json)application/vnd.org.jfrog.artifactory.repositories.FederatedRepositoryConfiguration+json
Sample Usage:

POST /api/repositories/libs-release-local -H "Content-Type: application/json"
{
repository-config.json
}

Delete Repository

Description: Removes a repository configuration together with the whole repository content. Supported by local, remote, virtual and federated repositories.
Since: 2.3.0
Notes
Supported JFrog Subscriptions:
- Local, remote, and virtual repositories require a Pro subscription.
- Federated repositories are supported from Artifactory 718.3 and require an Enterprise or Enterprise+ subscription.
Security: Requires an admin user
Usage : DELETE /api/repositories/{repoKey}
Produces : application/text
Sample Usage :

DELETE /api/repositories/libs-release-local

Repository 'libs-release-local' and all its content have been removed successfully.

Remote Repository Configuration (Deprecated)

Description: Repository Configuration (Deprecated)
Returns the shared configuration of a remote repository.
Since: 2.2.0
Notes: This API is deprecated. Use the Get Repository Configuration API instead.
Security: Requires a valid user for a shared remote repository and admin user for anything else. Shared remote repository data will be sanitized for security when non-admin user is used.
Usage: GET /api/repositories/{remoteRepoName}/configuration
Produces: application/json (application/vnd.org.jfrog.artifactory.repositories.SharedRemoteRepositoryConfiguration+json)
Sample Output:

GET /api/repositories/remote-repo/configuration
{
repository-config.json
}

Calculate Alpine Repository Metadata 

Description: Calculates/recalculates the metadata index for this repository, based on the Alpine packages in it.
Calculation is asynchronous. Please refer to Alpine Linux Repositories for more details. Supported by local repositories only.
Notes: Requires Artifactory Pro. 
Security: Requires a valid admin user or a user with Manage permissions. 
Usage: POST api/alpine/{repoKey}/reindex 
Produces: application/text
Since: 7.6
Sample Output:

POST /api/alpine/alpine-local/reindex
 
Reindexing of  Alpine repository alpine-local was scheduled to run.


Calculate YUM Repository Metadata

Description: For Local repositories: calculates/recalculates the YUM metadata for this repository, based on the RPM package currently hosted in the repository. Supported by local and virtual repositories only.
Calculation can be synchronous (the default) or asynchronous.
For Virtual repositories, calculates the merged metadata from all aggregated repositories on the specified path. The path parameter must be passed for virtual calculation.
Please see the YUM integration documentation for more details.

Notes: Requires Artifactory Pro. Immediate calculation requests cannot be called on repositories with automatic asynchronous calculations enabled (applies to local repositories only). The path parameter applies to virtual repositories only. 
Security: Up to version 4.8 , requires a valid admin user. From version 4.8 only requires the set of permissions assumed by Manage (Manage + Delete/Overwrite + Deploy/Cache + Annotate + Read).
Usage: POST /api/yum/{repoKey}[?path={path to repodata dir][&async=0/1]
Headers (Optional): X-GPG-PASSPHRASE: passphrase 
Produces
: application/text
Since: 2.3.5
Sample Output:

POST /api/yum/yum-local?async=1
POST /api/yum/yum-virtual?path=7/os/x86_64&async=1

YUM metadata calculation for repository 'yum-local' accepted.

Calculate NuGet Repository Metadata

Description: Recalculates all the NuGet packages for this repository (local/cache/virtual), and re-annotate the NuGet properties for each NuGet package according to it's internal nuspec file.
Please see the NuGet integration documentation for more details.
Supported by local, local-cache, remote and virtual repositories.
Notes: Requires Artifactory Pro.
Security: Up to version 4.8 , requires a valid admin user. From version 4.8 only requires the set of permissions assumed by Manage (Manage + Delete/Overwrite + Deploy/Cache + Annotate + Read).
Usage: POST /api/nuget/{repoKey}/reindex
Produces: application/text
Since: 3.0.3
Sample Output:

POST /api/nuget/nuget-local/reindex

NuGet reindex calculation for repository 'nuget-local' accepted.

Calculate Npm Repository Metadata

Description: Recalculates the npm search index for this repository (local/virtual). Please see the npm integration documentation for more details. Supported by local and virtual repositories.
Notes: Requires Artifactory Pro.
Security: Up to version 4.8 , requires a valid admin user. From version 4.8 only requires the set of permissions assumed by Manage (Manage + Delete/Overwrite + Deploy/Cache + Annotate + Read).
Usage: POST /api/npm/{repoKey}/reindex
Produces: application/text
Since: 3.2.0
Sample Output:

POST /api/npm/npm-local/reindex

Recalculating index for npm repository npm-local scheduled to run

Calculate Maven Index

Description: Calculates/caches a Maven index for the specified repositories.
For a virtual repository specify all underlying repositories that you want the aggregated index to include.
Calculation can be forced, which for remote repositories will cause downloading of a remote index even if a locally cached index has not yet expired; and index recalculation based on the cache on any failure to download the remote index, including communication errors (the default behavior is to only use the cache when a remote index cannot be found and returns a 404). Forcing has no effect on local repositories index calculation.
Please see the Maven Indexer documentation for more details.
Notes: Requires Artifactory Pro.
Security: Requires a valid admin user. 
Usage: POST /api/maven[?repos=x[,y]][&force=0/1]
Produces: application/text
Since: 2.5.0
Sample Output:

POST /api/maven?repos=libs-release-local,ext-release-local&force=1

Maven index refresh for repositories '[libs-release-local, ext-release-local]' has been accepted.

Calculate Maven Metadata

Description: Calculates Maven metadata on the specified path (local repositories only).
Security: Up to version 4.8 , requires a valid admin user. From version 4.8 only requires the set of permissions assumed by Manage (Manage + Delete/Overwrite + Deploy/Cache + Annotate + Read).
Usage: POST /api/maven/calculateMetadata/{repoKey}/{folder-path}?{nonRecursive=true | false}
Produces: application/text
Since: 3.0.2
Sample Output:

POST /api/maven/calculateMetadata/libs-release-local/org/acme
OK

Generate Maven POM File 

Description : Generates a Maven POM file from an internal Jar or a default POM file.
Security : Requires authenticated users. Users must have Delete/Overwrite/Deploy permissions. 
Usage : POST /api/maven/generatePom/{repoKey}/{jar-file-path}
Produces : N/A
Since : 7.5.0
Sample Usage

curl -X POST http: //admin:password1@localhost:8080/artifactory/api/maven/generatePom/libs-local/org/apache/commons/commons-lang3/


Calculate Debian Repository Metadata

Description: Calculates/recalculates the Packages and Release metadata for this repository, based on the Debian packages in it.
Calculation can be synchronous (the default) or asynchronous. Please refer to Debian Repositories for more details. Supported by local repositories only.
From version 4.4, by default, the recalculation process also writes several entries from the Debian package's metadata as properties on all of the artifacts (based on the control file's content). 
This operation may not always be required (for example, if the Debian files are intact and were not modified, only the index needs to be recalculated. The operation is resource intensive and can be disabled by passing the ?writeProps=0 query param.
From version 5.7, the target repository can be a virtual repository. 
Notes: Requires Artifactory Pro. 
Security: Up to version 4.8 , requires a valid admin user. From version 4.8 only requires the set of permissions assumed by Manage (Manage + Delete/Overwrite + Deploy/Cache + Annotate + Read).
Usage: POST api/deb/reindex/{repoKey} [?async=0/1][?writeProps=0/1]
Headers (Optionally):  -H X-GPG-PASSPHRASE:passphrase 
Produces
: application/text
Since: 3.3
Sample Output:

POST /api/deb/reindex/debian-local

Recalculating index for Debian repository debian-local scheduled to run.

Calculate Cached Remote Debian Repository Coordinates

Description: Calculates/recalculates the Debian packages coordinates
Supported by remote-cache repositories only.
From version 6.6.0, The coordinates calculation/recalculation process adds Debian packages the missing coordinates (Architecture, Distribution and Component) as properties, so they could be index if they would be copied/moved to a Debian local repository. Local repository indexing/reindexing requires those properties in order to work.
Notes: Requires Artifactory Pro. 
Security: Manager permissions
Usage: POST api/deb/indexCached/{repoKey} 
Produces: application/text
Since: 6.6.0
Sample Output:

POST /api/deb/indexCached/debian-remote-cache

Recalculating coordinates for Debian cached repository debian-remote-cache is scheduled to run.

Create Debian Snapshot

Description: Creates Debian Snapshots in the Debian repository in Artifactory.
Since: 7.41.x
Notes : The following process takes place when running this command:

  • The root of the newly created snapshotsub-repository is /artifactory/api/deb/$repoKey/snapshots/$tag.
  • All the metadata files of the $srcRepo/dists/$distribution, including the release and packages file, will be copied to the snapshot folder.
  • In the folder, a property called deb.snapshot.source is created pointing to the source repository.

Security: Requires an authenticated user.
Usage: POST /artifactory/api/deb/$repoKey/snapshot(?async=1) 
Consumes: application/json

{
  “tag” : string,
   “targetRepo” : string,
   “distribution” :string
}

Sample Usage :
The following input will create a Debian snapshot named 202203141800 saved under deb-snapshot local repository, containing focal distribution metadata.

POST /artifactory/api/deb/$repoKey/snapshot(?async=1)

{
    "targetRepo": "deb-snapshots",
    "distribution": "focal",
    "tag": "202203141800"
}

Sample Output:

POST /artifactory/api/deb/$repoKey/snapshot
200 OK
Successfully saved snapshot to ${targetRepo}/snapshots/${tag}

The following response is returned when saving snapshots as async.

POST /artifactory/api/deb/$repoKey/snapshot?async=1
200 OK
Snapshot save queued for ${targetRepo}/snapshots/${tag}

Calculate Opkg Repository Metadata

Description: Calculates/recalculates the Packages and Release metadata for this repository,based on the ipk packages in it (in each feed location).
Calculation can be synchronous (the default) or asynchronous. Please refer to Opkg Repositories for more details. Supported by local repositories only.
By default, the recalculation process also writes several entries from the ipk package's metadata as properties on all of the artifacts (based on the control file's content). 
This operation may not always be required (for example, if the ipk files are intact and were not modified, only the index needs to be recalculated. The operation is resource intensive and can be disabled by passing the ?writeProps=0 query param. 
Notes: Requires Artifactory Pro. 
Security: Up to version 4.8 , requires a valid admin user. From version 4.8 only requires the set of permissions assumed by Manage (Manage + Delete/Overwrite + Deploy/Cache + Annotate + Read).
Usage: POST api/opkg/reindex/{repoKey} [?async=0/1][?writeProps=0/1]
Headers (Optionally):  -H X-GPG-PASSPHRASE:passphrase 
Produces
: application/text
Since: 4.4
Sample Output:

POST /api/opkg/reindex/opkg-local

Recalculating index for Opkg repository opkg-local scheduled to run.

Calculate Bower Index

Description: Recalculates the index for a Bower repository. 
Notes: Requires Artifactory Pro. 
Security: Up to version 4.8 , requires a valid admin user. From version 4.8 only requires the set of permissions assumed by Manage (Manage + Delete/Overwrite + Deploy/Cache + Annotate + Read).
Usage: POST api/bower/{repoKey}/reindex
Produces
: application/text
Since: 3.6.0
Sample Output:

POST /api/bower/bower-local/reindex

Bower index for refresh for bower-local has been accepted

Calculate Helm Chart Index

Description: Calculates Helm chart index on the specified path (local repositories only).
Notes: Requires JFrog Container Registry or Artifactory Pro.
Security
: Requires the set of permissions assumed by Manage (Manage + Delete/Overwrite + Deploy/Cache + Annotate + Read)
Usage: POST /api/helm/{repoKey}/reindex
Produces: application/text
Since: 5.8
Sample Usage:

POST /api/helm/helm-local/reindex
OK

Calculate CRAN Repository Metadata

Description: Calculates/recalculates the Packages and Release metadata for this repository, based on the CRAN packages in it.
The calculation can be synchronous (the default) or asynchronous. Please refer to CRAN Repositories for more details. Supported by local repositories only.
From version 6.1, by default, the recalculation process also writes several entries from the CRAN package's metadata as properties on all of the artifacts (based on the control file's content). 

Notes: Requires Artifactory Pro. 
Security: Requires the set of permissions assumed by Manage (Manage + Delete/Overwrite + Deploy/Cache + Annotate + Read)
Usage: POST /api/cran/reindex/cran-local[?async=0/1]
Produces
: application/text
Since: 6.1
Sample Output:

POST /api/cran/reindex/cran-local
 
Recalculating index for CRAN repository cran-local scheduled to run.

Move CRAN Archives

Description:  Moves the existing archives from the wrong location to the correct location (if the system property is enabled). 
Since : 7.42.1
Notes : Requires Artifactory Pro. Requires that the "cran.archiveMover.enabled"  parameter be added to the Artifactory.yml file.
Security : Requires an admin.
Usage : PUT /api/v1/cran/<repoKey>/move-archives
Produces:  application/json
Sample Request

curl -username:password http://<artifactory-instance>/artifactory/api/cran/<repoKey>/move-archives

Sample Response

Moved


Calculate Cargo Repository Metadata

Description: Calculates/recalculates the Cargo packages and release metadata for this repository.
The calculation can be synchronous (the default) or asynchronous. Please refer to Cargo Package Registry for more details. Supported for local and remote repositories. 
Notes: Requires Artifactory Pro. 
Security: Requires a valid admin user.
Usage: POST /api/cargo/{repoKey}/reindex[?async=0/1]
Produces
: application/text
Since: 7.17.4
Sample Output:

POST /api/cargo/cargo-local/reindex

Recalculating index for Cargo repository cargo-local scheduled to run.

Calculate Conda Repository Metadata

Description: Calculates/recalculates the Conda packages and release metadata for this repository.
The calculation can be synchronous (the default) or asynchronous. Please refer to Conda Repositories for more details. Supported for local repositories only. 
Notes: Requires Artifactory Pro. 
Security: Requires a valid admin user.
Usage: POST /api/conda/conda-local/reindex[?async=0/1]
Produces
: application/text
Since: 6.3
Sample Output:

POST /api/conda/conda-local/reindex
 
Recalculating index for Conda repository conda-local scheduled to run.

Calculate Conan Repository Metadata

Description: Calculates/recalculates the Conan packages and release metadata for this repository.

The calculation can be synchronous (the default) or asynchronous. Please refer to Conan Repositories for more details. Supported for local repositories only. 
Notes: Requires Artifactory Pro. 
Security: Requires a valid admin user.
Usage: POST /api/conan/conan-local/reindex[?async=0/1]
Produces
: application/text
Since: 6.3
Sample Output:

POST /api/conan/conan-local/reindex
 
Recalculating index for Conan repository conan-local scheduled to run.

Calculate Pub Repository Metadata

Description : Calculates/recalculates the Dart/ Flutter packages and release metadata for this repository.
The calculation is asynchronous. Supported for local and remote repositories. 
Notes : Requires Artifactory Pro. 
Security : Requires a valid admin user.
Usage : POST /api/pub/{repoKey}/reindex[?async=0/1]
Produces : application/text
Since : 7.31.10
Sample Output :

POST /api/pub/pub-local/reindex

Calculate Terraform Index

Description : Calculates Terraform Modules or Providers index for the specified repository.
Notes : Requires Artifactory Pro.
Security : Requires a valid admin user.
Usage : POST /api/terraform/{repoKey}/reindex
Produces : application/text
Since : 7.38.4
Sample Output :

POST /api/terraform/terraform-local/reindex

Reindexing of Terraform repository terraform-local was scheduled to run.

Calculate Swift Index

Description : Calculates a Swift index for the specified repository.
Notes : Requires Artifactory Pro.
Security : Requires a valid admin user.
Usage : POST /api/swift/{repoKey}/reindex
Produces : application/text
Since : 7.39.4
Sample Output :

POST /api/swift/swift-local/reindex
 
Reindexing of Swift repository swift-local was scheduled to run.



Convert Local Repository to a Federated Repository

Description : Converts the local repository to a federated repository.
Note: The federated repository cannot be  converted  back to a local repository.
Since : 7.18.3
Security : Requires an admin user
Usage : POST /api/federation/migrate/{localRepoName}
Produces : application/json
Sample Output :

POST /api/federation/migrate/generic-repo
  
Migration finished successfully.



Convert Build-Info Repository to a Federated Repository

Description : Converts the Build-Info repository to a federated repository. Once you have converted the build-info repository into a federated Build-Info repository, proceed to add members to the federation using the Update Repository Configuration.
Note: The federated repository cannot be converted back to a local Build-Info repository.
Since : 7.35
Security : Requires an admin user
Usage : POST /api/federation/migrate/{ buildInfoRepoName }
Produces : application/json
Sample Input :

POST /api/federation/migrate/artifactory-build-info
Migration finished successfully. 



Federated Repository Full Sync

Description : Runs a full synchronization between the federated repository members.
Since : 7.18.3
Security : Requires an admin user
Usage : POST /api/federation/fullSync/{localRepoName}[?mirror={mirror_url}]
Produces : application/json
Sample Output :

Example: Syncs all the 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

Synchronize Federated Member Configuration

Description : Synchronize the configuration of a federated member in case of a network malfunction. 
Since : 7.27.6
Security : Requires an admin user
Usage POST  /api/federation/configSync/<repositoryKey>
Produces : application/json
Sample Output :

POST http://localhost:port/artifactory/api/federation/configSync/<repositoryKey>

Get Federated Repository Status

Description:  Returns the synchronization status of the Federation for a specific repository.

This API has a high impact on the database and should be used with care.

Since: 7.49.3
Security:  Requires an admin user.
Usage:  GET api/federation/status/repo/<REPO_NAME >

Sample Request:

GET api/federation/status/repo/<example-repo-loca l >

Sample Response:

{
    "localKey": "generic-repo-federated0",
    "binariesTasksInfo": {
        "inProgressTasks": 0,
        "failingTasks": 0
    },
    "mirrorEventsStatusInfo": [
        {
            "remoteUrl": "https://fedrepo1241node2master.jfrogdev.org/artifactory/",
            "remoteRepoKey": "generic-repo-federated0",
            "status": "SYNC",
            "createEvents": 9463,
            "updateEvents": 0,
            "deleteEvents": 0,
            "propsEvents": 0,
            "errorEvents": 0,
            "lagInMS": 46628,
            "eventRegistrationTimeStamp": 1676559878115
        }
    ],
    "federatedArtifactStatus": {
        "countFullyReplicateArtifacts": 987329,
        "countArtificiallyReplicatedArtifacts": 0
    }
}

The response displays the following information:

Property

Description

localRepoKey

The name of the local repository.

binariesTasksInfo

Includes the properties listed below:

inProgressTasks

Total number of tasks in the binaries tasks table waiting to download artifacts (currently only metadata is stored in the local JFrog Platform Deployment).

failingTasks

Total number of tasks that failed to download from the mirror during the download.

mirrorEventsStatusInfo

Includes the properties listed below:

remoteUrl

URL of one of the Federated mirrors.

remoteRepoKey

Repository name of the Federated mirror.

statusThe current synchronization status of the Federated mirror.

createEvents

The number of Create events waiting to be sent to the target mirror.

updateEvents

The number of Update events waiting to be sent to the target mirror.

deleteEvents

The number of Delete events waiting to be sent to the target mirror.

propsEvents

The number of node properties waiting to be sent to the target mirror.

errorEvents

The number of failed events during the sync process.

lagInMS

The amount of time the event waits to be processed (in milliseconds). The calculation is current time/query time (eventRegistrationTimeStamp).

eventRegistrationTimeStamp

The time when the event was created.

federatedArtifactStatus

Includes the properties listed below:

countFullyReplicateArtifacts

The number of artifacts that fully exist (binary data & metadata) in the JFrog Platform Deployment [JPD].

countArtificiallyReplicatedArtiftacts

The number of artificial artifacts (metadata only) in the JPD. The full binary file does not yet exist. If the user tries to download the artifact, the search will proceed on one of the other mirrors.


Get Federation Mirror Lag Time

Description:  Returns the elapsed time since the last event that was not handled on each Federation mirror for all repositories.
Since: 7.49.3
Security:  Requires an admin user.
Usage:  GET api/federation/status/mirrorsLag

Usage Strategy:  Use this API to gather lag statistics at regular intervals (e.g. every few minutes/hours). When a repository with significant lag is detected, use the repository status API to get additional details. 

Sample Request:

GET api/federation/status/mirrorsLag

Sample Response:

[
    {
        "localRepoKey" :  "example-repo-local" ,
        "remoteUrl" :  "http://docker.for.mac.localhost:10103/artifactory/" ,
        "remoteRepoKey" :  "test3-repo" ,
        "lagInMS" :  2117042 ,
        "eventRegistrationTimeStamp" :  1663772736117
    },
    {
        "locallRepoKey" :  "example-repo-local" ,
        "remoteUrl" :  "http://docker.for.mac.localhost:10102/artifactory/" ,
        "remoteRepoKey" :  "test3-repo" ,
        "lagInMS" :  2117042 ,
        "eventRegistrationTimeStamp" :  1663772736117
    }
]

The response displays the following information:

Property

Description

localRepoKey

The name of the local repository.

remoteUrl

The URL of the Federation mirror.

remoteRepoKey

The name of the repository on the Federation mirror.

lagInMS

The amount of time the event waits to be processed (in milliseconds). The calculation is current time/query time (eventRegistrationTimeStamp).

eventRegistrationTimeStamp

The time when the event was created.


Get Unavailable Mirrors

Description: Gets a list of unsynchronized Federated mirrors from all repositories. Mirrors are unsynchronized when they are first added to the federation, during repository migration from local to Federated, and when a certain error threshold is crossed.
Since: Artifactory 7.49.3
Security: Requires an admin user.
Usage: GET 
api/federation/status/unavailableMirrors
Sample Request:

GET api/federation/status/unavailableMirrors

The response displays the following information:

Sample Response:

[
    {
        "localRepoKey" :  "example-repo-local" ,
        "remoteUrl" :  "http://docker.for.mac.localhost:10104/artifactory/" ,
        "remoteRepoKey" :  "test3-repo" ,
        "status" :  "OUT_OF_SYNC"
    }
]

The response displays the following information:

Property

Description

localRepoKey

The name of the local repository.

remoteUrl

The URL of the Federation mirror.

remoteRepoKey

The name of the repository on the Federation mirror.

status

Returns all mirrors that are not in a SYNC status.

Replace URL

Description: Replaces the base URL defined for the JPD.
Security: Requires Admin permissions
Usage: POST /artifactory/api/federation/replaceUrl

Query Parameters (optional): {none}

Request Body

{
  “oldBaseUrl”: “http:/<old base URL>/artifactory”,
  “newBaseUrl”: “http://<new base URL>/artifactory”
}

Status Codes:

CodeDescription
200Success
400 Invalid URL
500Bad request

Get Federation Sync Status

Description: Returns the Federation synchronization status across JPDs.
Security: Requires Admin permissions
Usage: GET /artifactory/api/federation/monitor

Query Parameters (optional): {none}

Request Body: {none}

Sample Response:

[
   {
      "url":"https://localhost:8080",
      "binariesToFetch":10,
      "binariesFetchFailures":5,
      "mostLaggingMirrors":[
         {
            "localRepoKey":"federated-repo-1",
            "remoteUrl":"https://localhost:8081",
            "remoteRepoKey":"federated-repo-2",
            "lagInMS":129600001,
            "eventRegistrationTimeStamp":1675188918262
         },
         {
            "localRepoKey":"federated-repo-1",
            "remoteUrl":"https://localhost:8082",
            "remoteRepoKey":"federated-repo-3",
            "lagInMS":10000,
            "eventRegistrationTimeStamp":1675318508263
         }
      ],
      "syncStatus":"delayed",
      "mirrorLagThresholdInMS":129600001
   },
   {
      "url":"https://localhost:8081",
      "binariesToFetch":15,
      "binariesFetchFailures":10,
      "mostLaggingMirrors":[
         {
            "localRepoKey":"federated-repo-2",
            "remoteUrl":"https://localhost:8080",
            "remoteRepoKey":"federated-repo-1",
            "lagInMS":20000,
            "eventRegistrationTimeStamp":1675318498263
         }
      ],
      "syncStatus":"federated",
      "mirrorLagThresholdInMS":20000
   },
   {
      "url":"https://localhost:8082",
      "binariesToFetch":0,
      "binariesFetchFailures":12,
      "mostLaggingMirrors":[],
      "syncStatus":"federated"
   }
]

The response includes the following information:

PropertyDescription
url

The URL of the JPD.

binariesToFetch

The total number of binaries that this JPD needs to fetch from Federated repositories on remote JPDs.

binariesFeatchFailures

The number of fetch actions that have failed after a predefined number of retries.

mostLaggingMirrors

List of the target mirrors with the longest lag values. The properties of each mirror are described in the table that follows.

syncStatus

Indicates whether this JPD has at least one Federated repository that has exceeded the synchronization delay threshold.

mirrorLagThresholdInMs

The threshold (in milliseconds) that determines when the sync status of the JPD switches from Federated to Delayed.

The properties of each lagging target mirror are as follows:

PropertyDescription
localRepoKeyThe unique key of the local repository.
remoteUrlThe URL of the remote repository.
remoteRepoKeyThe unique key of the remote repository.
lagInMSThe mirror lag (in milliseconds).
eventRegistrationTimeStampThe time of the oldest unhandled event related to the mirror.

Status Codes:

CodeDescription
200Success
401Bad Credentials
403Permission Denied

Get VCS Tags

Description: Lists all VCS tags.
Since: 3.6.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/vcs/tags/{repoKey}/{userOrg}/{repo}
Produces: application/json
Sample Output:

GET /api/vcs/tags/github/jquery/jquery
[ {
  "name" : "1.0",
  "commitId" : "bcc8a837055fe720579628d758b7034d6b520f2e",
  "isBranch" : false
}, {
  "name" : "1.0.1",
  "commitId" : "bcc8a837055fe720579628d758b7034d6b520f2e",
  "isBranch" : false
}
...]

Get VCS Branches

Description: Lists all VCS branches.
Since: 3.6.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/vcs/branches/{repoKey}/{userOrg}/{repo}
Produces: application/json
Sample Output:

GET /api/vcs/branches/github/jquery/jquery
[ {
  "name" : "1.11-stable",
  "commitId" : "852529c9f148de6df205be01659a79731ce8ebef",
  "isBranch" : true
}, {
  "name" : "1.x-master",
  "commitId" : "73c1ceaf4280bd0318679c1ad832181f3f449814",
  "isBranch" : true
}
...]

Download a VCS Tag

Description: Download a complete tarball (tar.gz/zip, default tar.gz) of a tag.
Downloading can be executed conditionally according to properties by specifying the properties query param. In this case only cached artifacts are searched.
Since: 3.6.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/vcs/downloadTag/{repoKey}/{userOrg}/{repo}/{tag-name}?ext=tar.gz/zip (default tar.gz)
Produces: application/octet-stream
Sample Output :  

GET /api/vcs/downloadTag/github/jquery/jquery/2.0.1
<Tag binary content>

Download File within a VCS Tag

Description: Download a specific file from within a tag.
Since: 3.6.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/vcs/downloadTagFile/{repoKey}/{userOrg}/{repo}/{tag-name}!{file-path}
Produces: application/octet-stream
Sample Output :

GET /api/vcs/downloadTagFile/github/jquery/jquery/2.0.1!AUTHORS.txt
<AUTHORS.txt content>

Download a VCS Branch 

Description: Downloads a tarball (tar.gz/zip, default tar.gz) of a complete branch.
Downloading can be executed conditionally according to properties by specifying the properties query param. In this case only cached artifacts are searched.
Since: 3.6.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/vcs/downloadBranch/{repoKey}/{userOrg}/{repo}/{branch-name}?ext=tar.gz/zip[&properties=qa=approved]
Produces: application/octet-stream
Sample Output :  

GET /api/vcs/downloadBranch/github/jquery/jquery/master
<Branch binary content>

Download File within a VCS Branch 

Description: Downloads a specific file from within a branch.
Since: 3.6.0
Security: Requires a privileged user (can be anonymous)
Usage: GET /api/vcs/downloadBranchFile/{repoKey}/{userOrg}/{repo}/{branch-name}!{file-path}
Produces: application/octet-stream
Sample Output:   

GET /api/vcs/downloadBranchFile/github/jquery/jquery/master!README.md
<AUTHORS.txt content>

Download a VCS Release 

Description: Downloads a complete release tarball (tar.gz/zip, default tar.gz) of a tag from GitHub.
Since: 4.3.0
Security: Requires a privileged user (can be anonymous)
VCS Usage: GitHub only
Usage: GET /api/vcs/downloadRelease/{repoKey}/{userOrg}/{repo}/{release-name}?ext=tar.gz/zip (default tar.gz)
Produces: application/octet-stream
Sample Output:   

GET /api/vcs/downloadRelease/git-remote/google/protobuf/v3.0.0-beta-1?ext=tar.gz/zip
<Tag binary content>

RELEASE BUNDLES

The following APIs apply to the Release Bundles received in Artifactory.

Get All Bundles 

Description: Returns a list of all release bundles 
Notes: Requires Artifactory Enterprise+ 
Security
: Requires admin privileges
Usage: GET api/release/bundles
Produces: text/plain
Since: 6.5.0
Sample Usage:

GET /api/release/bundles

Sample Output:

{
  "bundles" : {
    "test" : [ {
      "version" : "test",
      "created" : "2018-10-21T13:29:42.184Z",
      "status" : "COMPLETE"
    } ]
    "test2" : [ {
      "version" : "test2",
      "created" : "2018-11-21T13:29:42.184Z",
      "status" : "COMPLETE"
    } ]
}

Get All Bundle Versions 

Description: Returns a list of all bundles versions
Notes: Requires Artifactory Enterprise+ 
Security
: Requires admin privileges
Usage: GET api/release/bundles/{bundle-name}
Produces: text/plain
Since: 6.5.0
Sample Usage:

GET /api/release/bundles/{bundle-name}

Sample Output:

{
  "versions" : [ {
    "version" : "test",
    "created" : "2018-10-21T13:29:42.184Z",
    "status" : "COMPLETE"
  } ]

Get a Release Bundle Version

Description: Returns a specific release bundle 
Notes: Requires Artifactory Enterprise+ 
Security
: Requires admin privileges
Usage: GET api/release/bundles/{bundle-name}/{bundle-version}
Produces: application/json or application/jsoe
Since: 6.5.0
Sample Usage:

GET /api/release/bundles/{bundle-name}/{bundle-version}[?format=jws|json]

Sample Output:

{
	"name": "test",
	"version": "2.1.0",
	"description": "",
	"created": "2018-10-21T13:29:42.184Z",
	"artifacts": [{
		"repo_path": "artifactory-generic/bintray-client-java-api-0.9.2.jar",
		"checksum": "5880e05b5886a2fcd9a5a6dace38cd4f243affa06719c5e63116b16094e95a31",
		"props": []
	}]
}

Delete a Release Bundle Version 

Description: Delete a specific release bundle version from the source Artifactory. To delete a release bundle on a target Artifactory, see Delete Release Bundle Version in the Distribution REST API. 
Notes: Requires Artifactory Enterprise+ 
Security
: Requires admin privileges
Usage: DELETE api/release/bundles/source/{bundle-name}/{bundle-version}
Produces: text/plain
Since: 6.5.0
Sample Usage:

DELETE /api/release/bundles/source/{bundle-name}/{bundle-version}

Import Release Bundle Version

Description: Import the Release Bundle from the zip file. For more information, see Distributing Release Bundles in an Air Gap Environment.
Note: The Import process is performed on the Artifactory node.
You can set dryRun=true to validate that the conditions for performing the import process are met:
- All the target repositories exist in Artifactory
- No Release Bundle of this name already exists in Artifactory.
From Artifactory 7.10.2, the import feature has been extended to support importing a file from a user-defined  ARTIFACTORY_HOME/var/data/artifactory/import/ path. Note that the file will be deleted from the path after the file is imported.
Since: 7.9
Security: Admin only
Usage: POST api/release/import/import?file_name=<fileName>&dry_run=<true|false>
Consumes:  application/json

Import from Local File Example
curl -X POST 'http://localhost:8082/artifactory/api/release/import -H 'Content-Type: application/octet-stream' -uadmin:password

curl -X POST "http://localhost:8082/artifactory/api/release/import" -H "Content-Type: application/octet-stream" --data-binary @release_bundle-1.0.0.zip -uadmin:password
Import from Path Example
curl -X POST "http://localhost:8082/artifactory/api/release/import?file_name=release_bundle-1.0.0.zip" -H "Content-Type: application/json" -uadmin:password

Response status codes:

202 - Successfully triggered to import version
400 - Failed to import version


Get Release Bundle Version Import Status

Description: Returns the status of the imported Release Bundle version. For more information, see Distributing Release Bundles in an Air Gap Environment.
Note: The Import process is performed on the Artifactory Edge node.
Since: 7.9
Security: Admin only
Usage: GET api/release/import / {name} / {version} /status
Consumes: application/json

cURL Example
Curl -XGET 'http://localhost:8082/artifactory/api/release/import/{name}/{version}/status 

Response status codes:

200 - Successful request

format=json
{
	"status":"IN_PROGRESS|NOT_EXPORTED|FAILED|COMPLETED"	
}

SYSTEM & CONFIGURATION

System & configuration APIs have been moved to the JFrog Platform REST APIs I documentation.


PLUGINS

Execute Plugin Code

Description: Executes a named execution closure found in the executions section of a  user plugin .
Execution can take parameters and be synchronous (the default) or asynchronous.

When parameters can have multiple values, you can separate the items in one of the following ways:

  • Use a semicolon - ; (recommended)
  • Use the encoding for the pipe ("|") character - %7C
    Alternatively, you may configure your NGINX to encode URLs so that if an unencoded pipe is used in the URL, NGINX will encode it to %7C. We recommend that you verify that this configuration does not break any other systems served by NGINX

Since: 2.3.1
Notes: Requires Artifactory Pro
Security: Requires an authenticated user (the plugin can control which users/groups are allowed to trigger it)
Usage: POST /api/plugins/execute/{executionName}?[params=p1=v1[,v2][|p2=v3][&async=1]]
Produces: text/plain
Sample Output:

POST /api/plugins/execute/cleanup?params=suffix=SNAPSHOT;types=jar,war,zip&async=1
OK

Retrieve Plugin Code

Description: Returns the source code of the specified user plugin.
Since: 5.0.0
Notes: Requires Artifactory Pro
Security: Requires an admin user.
Usage: GET /api/plugins/download/{pluginName}
Producestext/x-groovy-source
Sample Usage

GET /api/plugins/download/myPlugin
 
Response:
<The source code of the plugin>

Retrieve Plugin Info

Description: Returns user plugin  information for Executions and Staging plugins (subject to the permissions of the provided credentials).
Since: 2.5.2
Notes: Requires Artifactory Pro
Security: Requires an authenticated user.
Usage: GET /api/plugins
Produces: application/json
Sample Output:

GET /api/plugins
{
    "executions": [
        {
            "name": "execution1",
            "version": "version",
            "description": "description",
            "users": ["user1"],
            "groups": ["group1", "group2"],
            "params": {}
        }
    ], 
    "staging": [
        {
            "name": "strategy1", 
            "version": "1.0", 
            "description": "desc", 
            "params": {"key1": "val1"}
        }
    ]
}



Retrieve Plugin Info of a Certain Type

Description: Returns all available  user plugin  information (subject to the permissions of the provided credentials) of the specified type.
Since: 2.5.2
Notes: Requires Artifactory Pro
Security: Requires an authenticated user.
Usage: GET /api/plugins/{pluginType}
Produces: application/json
Sample Output:

GET /api/plugins/staging
{
  "staging": [
        {
            "name": "strategy1", 
            "version": "1.0", 
            "description": "desc", 
            "params": {"key1": "val1"}
        }
    ]
}

Retrieve Build Staging Strategy

Description: Returns a build staging strategy defined by a  user plugin .
When passing in parameters that may take multiple values, you can separate the items in one of the following ways:

  • Use a semicolon - ; (recommended)
  • Use the encoding for the pipe ("|") character - %7C
    Alternatively, you may configure your NGINX to encode URLs so that if an unencoded pipe is used in the URL, NGINX will encode it to %7C. We recommend that you verify that this configuration does not break any other systems served by NGINX

Since: 2.5.2
Notes: Requires Artifactory Pro
Security: Requires an authenticated user.
Usage: GET /api/plugins/build/staging/{strategyName}?buildName={buildName}&[params=p1=v1[,v2][|p2=v3]]
Produces: application/json (application/vnd.org.jfrog.plugins.BuildStagingStrategy
Sample Output:

GET /api/plugins/build/staging/strategy1?buildName=build1&params=types=jar,war,zip
{
    "defaultModuleVersion":
    {
        "moduleId": "moduleId",
        "nextRelease": "nextRelease",
        "nextDevelopment": "nextDevelopment"
    },
    "vcsConfig":
    {
        "useReleaseBranch": true,
        "releaseBranchName": "branchName",
        "createTag": true,
        "tagUrlOrName": "tagUrl",
        "tagComment": "comment",
        "nextDevelopmentVersionComment": "comment"        
    },
    "promotionConfig":
    {
        "targetRepository": "repoKey",
        "comment": "comment",
        "status": "statusName"
    }
}

Execute Build Promotion 

Description: Executes a named promotion closure found in the promotions section of a  user plugin .
Since: 2.5.2
Notes: Requires Artifactory Pro
Security: Requires an authenticated user.
Usage: POST /api/plugins/build/promote/{promotionName}/{buildName}/{buildNumber}?[params=p1=v1[,v2][|p2=v3]]
Produces: text/plain
Sample Output:

POST /api/plugins/build/promote/promotion1/build1/3?params=types=jar,war,zip
OK

Reload Plugins

Description: Reloads user plugins if there are modifications since the last user plugins reload. Works regardless of the automatic user plugins refresh interval.
Since: 2.9.0
Notes: Requires Artifactory Pro
Security: Requires a valid admin user
Usage: POST /api/plugins/reload
Produces: text/plain
Sample Output:


POST /api/plugins/reload
Successfully loaded:  myplugin1.groovy, myplugin2.groovy


Live Logs Plugin

The following endpoints are used to enable the Live Log feature. B oth endpoints are open only for   Artifactory Enterprise+   subscriptions, and require Admin permissions.

We recommend using the Live Log APIs in the JFrog CLI. For more information, see JFrog Live Logs Readme.



Get Live Logs Config

Description: Returns the Live Logs configuration. The configuration output contains the list of the available logs, the available Artifactory nodes, and the refresh rate. 
Note: This feature is available only for Enterprise+ subscriptions.
Since:  Artifactory 7.16.0
Security: Requires a privileged user (admin).
Usage: GET /api/system/logs/config

  • Artifactory: api/system/logs/config
  • Xray, Mission Control, Pipelines and Distribution: api/v1/system/logs/config

Sample Usage

GET /api/system/logs/config
{
  "logs": [
...
  ],
  "nodes": [
...
  ],
  "refresh_rate_millis": 10000
} 



Get Live Logs Data

Description: Returns the Live Logs data for the specified log ID.

ParameterDescription
Data OutputContains the log content chuck (up to 300KB)
Last_update_modified valueThe log file's last updated timestamp
Last_update_label valueThe timestamp of the response
File_size valueThe total size of the log file

Note: This feature is available only for Enterprise+ subscriptions.
Since:  Artifactory 7.16.0
Security: Requires a privileged user (admin).

Headers: X-JFrog-Node-Id
Usage: GET /api/system/logs/data?id=log_name[&file_size=file_size]

  • Artifactory: api/system/logs/data
  • Xray, Mission Control,Pipelines and Distribution: api/v1/system/logs/data

Sample Usage

GET /api/system/logs/data?id=some_log.log&file_size=0 -H "X-JFrog-Node-Id:node1"
{
  "last_update_modified": 1612869112882,
  "last_update_label": 1612869113059,
  "log_content": “...”
  "file_size": 45550
}


IMPORT & EXPORT

Import Repository Content

Description: Import one or more repositories.
Since: 2.2.2
Security: Requires a valid admin user
Usage: POST: /api/import/repositories
Requests Params:
path - The file system path to import from. This may point to a specific folder to import data for a single repository, or to the parent "repositories" folder to import data for all repositories.
repo - Empty/null repo -> all
metadata - Include metadata - default 1
verbose - Verbose - default 0
Produces: text/plain
Sample Output:

POST: /api/import/repositories?path=pathToRepos&verbose=1

Import System Settings Example

Description: Returned default Import Settings JSON. From version 5.10, Artifactory maintains any security entities (users, groups, permissions and tokens) when doing a system import.
Since: 2.4.0
Security: Requires a valid admin user
Usage: GET: /api/import/system
Producesapplication/json (application/vnd.org.jfrog.artifactory.system.ImportSettings+json)
Sample Usage:

GET /api/import/system
{
  "importPath" : "/import/path",
  "includeMetadata" : true,
  "verbose" : false,
  "failOnError" : true,
  "failIfEmpty" : true
}

Full System Import

Description: Import full system from a server local Artifactory export directory. From version 5.10, Artifactory maintains any security entities (users, groups, permissions and tokens) when doing a system import.
Since: 2.4.0
Security: Requires a valid admin user
Usage: POST: /api/import/system
Consumes : application/json (application/vnd.org.jfrog.artifactory.system.ImportSettings+json)
Produces: text/plain
Sample Usage:

POST /api/import/system
{
import-settings.json
}

Export System Settings Example

Description: Returned default Export Settings JSON.
Since: 2.4.0
Security: Requires a valid admin user
Usage: GET: /api/export/system
Producesapplication/json (application/vnd.org.jfrog.artifactory.system.ExportSettings+json)
Sample Usage:

GET /api/export/system
{
  "exportPath" : "/export/path",
  "includeMetadata" : true,
  "createArchive" : false,
  "bypassFiltering" : false,
  "verbose" : false,
  "failOnError" : true,
  "failIfEmpty" : true,
  "m2" : false,
  "incremental" : false,
  "excludeContent" : false
}

Export System

Description: Export full system to a server local directory.
Since: 2.4.0
Security: Requires a valid admin user
Usage: POST: /api/export/system
Consumes : application/json (application/vnd.org.jfrog.artifactory.system.ExportSettings+json)
Produces: text/plain
Sample Usage:

POST /api/export/system{ export-settings.json } 

XRAY

Xray APIs have been moved to the Xray REST API documentation.


SUPPORT

Support APIs have been moved to the JFrog Platform REST API documentation.


ACCESS

Access APIs have been moved to the JFrog Platform REST APIs documentation.


PROJECTS

Projects APIs have been moved to the JFrog Platform REST API documentation.


WEBHOOKS

Webhooks APIs have been moved to the JFrog Platform REST API documentation.


ROUTER

Router APIs have been moved to the JFrog Platform REST APIs documentation.


RETENTION

The following APIs apply to the Release Bundles received in Artifactory.

The Retention feature is disabled by default and will need to be enabled by the customer.

Query the Status of the Retention Service

Description: Gets the activation status of the retention policies. 

If enable is set to false, any bundles can be deleted even if they have been marked as keep (i.e., their keep status will be ignored). 

Security: Requires admin privileges

Usage: GET: http://localhost:8082/artifactory/api/v1/bundle/retention/config/enable

Produces: application/json

Since: 7.55.1

Response:

{
    "enable": true|false
}

Set Retention Policies to Enabled

Description: Sets the Release Bundle retention policy to enabled. 

Warning : If enable is set to false, any bundles can be deleted even if they have been marked as keep (i.e., their keep status will be ignored).

Security: Requires admin privileges

Usage: POST: http://localhost:8082/artifactory/api/v1/bundle/retention/config/enable

Produces:  N/A

Since: 7.55.1

Sample Usage:

BODY:
{
    "enable":true
}

Get Retention Policy Configuration 

Description: Gets the retention policies that were configured.

Security: Requires admin privileges

Usage: GET: http://localhost:8082/artifactory/api/v1/bundle/retention/config

Produces: application/json

Since: 7.55.1

Response:

{

    "automatic": false,

    "num_of_versions_to_keep_per_release_bundle": 2,

    "max_days_to_keep": 1100,

    "cron_pattern": "0 0 0 1 1 ? 2099",

    "max_deletions_per_background_run": 100

}

Set the Retention Policy Configuration 

Description: Sets the retention policies that were configured. If a Release Bundle meets one or more of the retention policies configured, the policy will be applied to it.

Note that you can set a partial configuration, but you cannot ‘unset’ a value - instead you will need to override it to change it.

Security: Requires admin privileges

Usage: POST: http://localhost:8081/artifactory/api/ui/bundle/retention/config

Produces:   N/A

Since: 7.55.1

Sample Usage:

BODY:

{

    "automatic": true,

    "num_of_versions_to_keep_per_release_bundle": 2,

    "max_days_to_keep": 1100,

    "cron_pattern": "0 0 0 ? * SUN *",

    "max_deletions_per_background_run": 1000

}

Get the Configured Retention Policies List 

Description: Finds the bundles that are candidates for retention according to the configuration type.

Security: Requires admin privileges

Usage: POST: http://localhost:8082/artifactory/api/ui/bundle/retention/report

Produces: application/json

Since: 7.55.1

Sample Usage:

QUERY_PARAMS: offset, limit, order_by, direction, pattern (name/version pattern)

offset - offset in set of all fitting bundle versions (fitting by retention config). Default is 0.

limit - maximum amount of items to return. Default is 100.

order_by - "bundle_name"|"bundle_version"|"distribution_time"|"keep". Default is "distribution_time".

direction - "asc"|"desc". Default is "asc".

pattern - case insensitive name/version pattern, where "*" is allowed as the wild card. Default is "*".

BODY:

{

    "include_keep": true,

    "type": "MAX_VERSIONS_PER_RELEASE_BUNDLE"|"MAX_DAYS_TO_KEEP"

}

response:

{

    "total": 180,

    "items": [

        {

            "bundle_name": "rb-0",

            "bundle_version": "ver-18",

            "creation_time": 1665488849956,

            "distribution_time": 1665488849968,

            "keep": true

        },

        {

            "bundle_name": "rb-0",

            "bundle_version": "ver-19",

            "creation_time": 1665488850024,

            "distribution_time": 1665488850041,

            "keep": false

        }

    ]

}

Get the Retention Operations History

Description: Gets the history of the retention operations

Security: Requires admin privileges

Usage: GET: http://localhost:8082/artifactory/api/ui/bundle/retention/audit

Produces: application/json

Since: 7.55.1

Sample Usage:


QUERY_PARAMS: offset, limit, order_by, direction

offset - offset in a set of historical operations. Default is 0.

limit - maximum amount of items to return. Default is 100.

order_by - "bundle_name"|"bundle_version"|"operation"|"created"|"created_by". Default is "created".

direction - "asc"|"desc". Default is "desc".

response:

{

    "total": 4,

    "items": [

        {

            "bundle_name": "rb-2",

            "bundle_version": "ver-23",

            "operation": "DELETE"|"KEEP"|"UNKEEP",

            "created": "2022-10-25T13:24:49.643+0200",

            "created_by": "admin"

        }

    ]

}

Delete Release Bundles

Description: Deletes the Release Bundles.

Security: Requires admin privileges

Usage: POST: http://localhost:8082/artifactory/api/v1/bundle/retention/delete

Produces: application/json

Since: 7.55.1

Sample Usage:


QUERY_PARAMS: dryRun

dryRun - true|false - when true no actual deletion will be performed, could be used for validation. Default is false.




BODY:

[

    {

        "bundle_name": "rb_1663499358771",

        "bundle_version": "v1"

    },

    {

        "bundle_name": "rb_1663499358771",

        "bundle_version": "v3"

    }

]

Mark Release Bundles to Keep (or Don’t Keep)

Description: Sets the indicator to keep (indefinitely) or not keep (upkeep) Release Bundles.

Security: Requires admin privileges

Usage: POST: http://localhost:8082/artifactory/api/ui/bundle/retention/keep

Produces: application/json

Since: 7.55.1

Sample Usage:

BODY:
{
    "keep": [
        {
            "bundle_name": "rb-2",
            "bundle_version": "ver-23"
        }
    ],

    "unkeep": [
        {
            "bundle_name": "rb-2",
            "bundle_version": "ver-22"
        }
    ]
}



ERROR RESPONSES

In case of an error, Artifactory will return an error response in JSON format. The response contains the HTTP status code and error message.

For example, a badly formatted API call would return the "404, File not found" response below:

{
  "errors" : [ {
    "status" : 404,
    "message" : "File not found."
  } ]
}


Sample input:

POST /api/security/apiKey
{
    "apiKey": "3OloposOtVFyCMrT+cXmCAScmVMPrSYXkWIjiyDCXsY="
}
PUT /api/storage/libs-release-local/ch/qos/logback/logback-classic/0.9.9?properties=os=win,linux;qa=done&recursive=1

Use a semicolon - ; (recommended) When parameters can have multiple values, you can separate the items in one of the following ways:

  • Use the encoding for the pipe ("|") character - %7C
    Alternatively, you may configure your NGINX to encode URLs so that if an unencoded pipe is used in the URL, NGINX will encode it to %7C. We recommend that you verify that this configuration does not break any other systems served by NGINX


Copyright © 2023 JFrog Ltd.