Artifactory Query Language


JFrog Xray
Content Type

Artifactory Query Language (AQL) is specially designed to let you uncover any data related to the artifacts and builds stored within Artifactory. Its syntax offers a simple way to formulate complex queries that specify any number of search criteria, filters, sorting options, and output parameters. AQL is exposed as a RESTful API which uses data streaming to provide output data resulting in extremely fast response times and low memory consumption. AQL can only extract data that resides in your instance of Artifactory, so it runs on Local Repositories,Local Repositories Remote Repositories Caches, and Virtual RepositoriesVirtual Repositories.Remote Repositories

From Artifactory 7.17.4, you can search within remote repositories.

Here are a few simple examples:

// Return all artifacts of the "artifactory" build.
// Return all builds that have a dependency with a license that is not Apache.
// Return all archives containing a file called "org/artifactory/Main.class".
items.find({"":{"$eq":"Main.class"} , "archive.entry.path":{"$eq":"org/artifactory"}})

Here is a slightly more complex example:

// Return all entries of any archive named "Artifactory.jar" from any build named "Artifactory" with 
// build number 521.
archive.entries.find( {

Here is another example that shows the full power of AQL to mine information from your repositories in a way that no other tool can match:

// Compare the contents of artifacts in 2 "maven+example" builds  

For detailed information about AQL, refer to the following topics: