title: How to download the artifactory by parsing AQL using curl script?
body: <p>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.</p>
  
  <blockquote>
    <p>curl -u 'uname:pwd' -X PUT
    <a href="https://testrepo.test.test/artifactory/api/search/aql" rel="nofollow noreferrer">https://testrepo.test.test/artifactory/api/search/aql</a> -d 'items.find
    ({"repo":"snapshots"},{"name":{"$match":"test*.war"}}).sort({"$desc" :
    ["created"]}).limit(3)' -H "Content-Type: text/plain"</p>
  </blockquote>
  
  <p>Following is the AQL I get -</p>
  
  <blockquote>
    <p>{ "results" : [ {   "repo" : "snapshots",   "path" :
    "******-SNAPSHOT",   "name" : "*****.war",   "type" : "file",   "size"
    : 63059101,   "created" : "2018-05-31T08:39:11.353-05:00",<br>
    "created_by" : "***_user",   "modified" :
    "2018-05-31T08:39:09.724-05:00",   "modified_by" : "****_user",<br>
    "updated" : "2018-05-31T08:39:09.724-05:00" } ], "range" : {<br>
    "start_pos" : 0,   "end_pos" : 1,   "total" : 1,   "limit" : 3 } }</p>
  </blockquote>
  
  <p>How can I download the artifacts by parsing this AQL using Curl?</p>