I am using curl for downloading the latest artifactory from the repository and then want to download it to my server.. How can I achieve that. I am using the following command for getting AQL.
curl -u 'uname:pwd' -X PUT https://testrepo.test.test/artifactory/api/search/aql -d 'items.find ({"repo":"snapshots"},{"name":{"$match":"test*.war"}}).sort({"$desc" : ["created"]}).limit(3)' -H "Content-Type: text/plain"
Following is the AQL I get -
{ "results" : [ { "repo" : "snapshots", "path" : "******-SNAPSHOT", "name" : "*****.war", "type" : "file", "size" : 63059101, "created" : "2018-05-31T08:39:11.353-05:00",
"created_by" : "***_user", "modified" : "2018-05-31T08:39:09.724-05:00", "modified_by" : "****_user",
"updated" : "2018-05-31T08:39:09.724-05:00" } ], "range" : {
"start_pos" : 0, "end_pos" : 1, "total" : 1, "limit" : 3 } }
How can I download the artifacts by parsing this AQL using Curl?