Search code examples
pythonrestartifactoryartifactory-query-lang

How to quickly return all artifacts and their properties in an Aritfactory repo?


We have an AQL that returns all folders that contain a specific file that contains various property keys and values, and then, for each artifact, we send GET request for ?properties and ?general as documented here: https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-ItemProperties so we can get the properties listed on the file and when the file was last modified. But with long list of files and to send two GET request for each file, the overall request slows down. Is there way to get all of the properties and all of the file in a single request, or is there a faster approach? The AQL itself runs fast, but having 2 subsequent requests slows down the overall process.


Solution

  • Use .include in your AQL, to get all results in one request. In your case: .include("name","modified","property")

    I would recommend using the Search Command of JFrog CLI. It also uses AQL internally, but you can your desired results in a more convenient manner.