How do I promote a build using the REST-API?

Build promotion can be done by using our REST-API query for Build Promotion. This query will require a simple JSON file with the the desired details for the promotion, i.e. "targetRepo", copy artifacts or move them to the destination repository etc.

You can see in our wiki page the set of details required in the JSON file for promoting a build and the REST query for running the promotion.

Here is an example for the REST query, using cURL and the JSON file:

curl -u user:password -H"Content-type:application/json" --data-binary @promote.json -X POST "http://server:port/artifactory/api/build/promote/buildName/buildNumber"


JSON file:


"status": "released",

"ciUser": "admin",

"dryRun" : false,

"targetRepo" : "ext-snapshot-local",

"copy": false,

"artifacts" : true,

"dependencies" : true,

"scopes" : [ "compile", "runtime" ],



   "components": ["c1","c3","c14"],

   "release-name": ["fb3-ga"]




Please note that the promotion requires a build info file which is part of our build integration feature


In case that your build deploys snapshot artifacts, and you are interested to promote them from snapshot to release artifacts with moving them into another repository, you can use the build-promotion user plugin which can be found here.

To run this plugin, you will need to put it under the $ARTIFACTORY_HOME/etc/plugins/ folder and enable logger in the $ARTIFACTORY_HOME/etc/logback.xml with the plugin name so this plugin will print into the artifactory.log. For example:

<logger name="promotion">

<level value="info" />



Once the plugin is set and loaded, you run run the snapshotToRelease promotion by running the Execute Build Promotion REST-API query. For example:



You can find more information about user plugin and how to setup the plugins here.