title: How to get a list of subfolders and files in jfrog Artifactory
body: <p>I am looking to fetch the subfolders and files inside jfrog artifactory repo and for that I am running the below script which I am running in Groovy</p>
  <pre><code>def test = sh(script: &quot;curl -u uname:password -X POST -k https://artifactory.xxxx.com/artifactory/api/search/aql -d 'items.find({\&quot;type\&quot; : \&quot;file\&quot;,\&quot;\$or\&quot;:[{\&quot;repo\&quot; : {\&quot;\$match\&quot; : \&quot;war*\&quot;}, \&quot;repo\&quot; : {\&quot;\$match\&quot; : \&quot;web*\&quot;} }]}).include(\&quot;name\&quot;,\&quot;repo\&quot;,\&quot;path\&quot;,\&quot;size\&quot;).sort({\&quot;\$desc\&quot;: [\&quot;size\&quot;]}).limit(10)'&quot;, returnStdout: true).trim()
  echo &quot;The list is ${test}&quot;
  </code></pre>
  <p>But its not returning any value.
  Any solution would be helpful.
  Thanks</p>