title: How to use artifactory query language inside a jenkins pipeline instead of having it call from a file
body: <p>I have a AQL that is used to delete files from the artifactory. I am designing a pipeline so that it can delete files from artifactory based on the AQL.
  I know for artifactory upload and download we can specify the AQL within the pipeline using rtupload/rtdownload, but is there a way to do for delete as well?</p>
  <pre><code>#AQL delete.spec
  {
  &quot;files&quot;: [
    {
      &quot;aql&quot;: {
      &quot;items.find&quot;: {
      &quot;repo&quot;: {&quot;$eq&quot;:&quot;app-java-repo&quot;},
      &quot;path&quot;: &quot;archives/test/app&quot;,
      &quot;type&quot;: &quot;folder&quot;,
      &quot;$or&quot;: [
            {
              &quot;$and&quot;: [
                {
                  &quot;name&quot;: {&quot;$nmatch&quot; : &quot;*build*&quot;}
                }
              ]
            }
          ]
        }
      }
    }
  ]
  }
  </code></pre>
  <pre><code>jf rt del --spec delete.spec
  </code></pre>
  <p>Using the jfrog cli, the spec file can be passed and the files from artifactory repo can be deleted. This is working out manually, but how can the same be achieved by having the AQL in the pipeline stage instead of having AQL as a file.</p>