For Artifactory versions older than 4.2 which does not support the builds domain in AQL, you can find the artifact build by getting this information from the build.name and build.number properties. Any artifact deployed using the Artifactory build integration is annotated with those 2 properties.
For example:
$ curl -uadmin:password http://localhost:8081/artifactory/api/storage/libs-snapshot-local/org/jfrog/test/multi1/3.5-SNAPSHOT/multi1-3.5-20160112.080623-1.jar?properties=build.name,build.number
{
"properties" : {
"build.name" : [ "maven-example" ],
"build.number" : [ "8" ]
},
"uri" : "http://localhost:8081/artifactory/api/storage/libs-snapshot-local/org/jfrog/test/multi1/3.5-SNAPSHOT/multi1-3.5-20160112.080623-1.jar"
}
Once you have the build name and number, you can use the Build Info REST API to get the build information.
For example:
$ curl -u admin:password http://localhost:8081/artifactory/api/build/maven-example/8
{
"buildInfo" : {
"version" : "1.0.1",
"name" : "maven-example",
"number" : "8"
...
}