[RTFACT-15639] Size of a top level folder that contains sub-folders in AQL or Artifactory REST API Created: 12/Jan/18 Updated: 03/Jun/19 Resolved: 03/Jun/19
|Project:||Artifactory Binary Repository|
|Component/s:||AQL, REST API|
Unable to get the size of a top level folder if this folder contains any sub-folders
Option 1: have the rest api for folder info contain the size of the folder including all sub-folders
Option 2: Be able to retrieve size via AQL. We tried to perform an AQL query to get the size of the folder.
The customers use case is their builds are deposited in each repository of different sizes so then need to query the top level folders (associated with their build) to see the largest folder before adding another folder. Their logic using the recursive function cleans out the oldest builds until there is enough space for one more build of size equal to the largest build. They have folders with over 1000 files that drastically impacts the API.
The workaround for them now is to zip up the sources directory to limit the size to one API query. This then does not allow the source files that are used across other projects to leverage the checksum based storage.