How do I create and deploy the build information JSON file via the REST-API?

JFrog Support
2016-10-06 13:35

There is a private REST-API call to deploy build-info files to Artifactory, so you will be able to generate a build info JSON file (same as the plugin generates for your builds).


The REST-API query for deploying the build info file should look like the following:

curl -X PUT -uusername:password -H "Content-type: application/json" -T buildtest.json "http://host:8081/artifactory/api/build"


Since this is a private query, we have no documentation about this; however, we can give you a kickstart. Generally, the minimum for a valid build info JSON file is version, name, number and started date. The most basic one with the above params + module and artifact should look like the following example:


"version" : "1.0",

"name" : "myBuild",

"number" : "129",

"started" : "2014-03-31T16:24:42.116+0300",


"modules" : [ {

"id" : "org.jfrog.test:multi:2.36-2-SNAPSHOT",

"artifacts" : [ {

"type" : "pom",

"sha1" : "a1ab9222c219ec885ce4374b77cc4bd93485c6c8",

"md5" : "495a5e916f0e308a8ed4fc170e4d9136",

"name" : "multi-2.36-2-SNAPSHOT.pom"

} ]

} ]


For more complicated builds, you might want to review your current build info files and create one with the same structure (dependencies etc..)