minas
minas

Reputation: 230

How to search for directories in Artifactory API?

I know how to list files in a specific path but I want to get a list of all directories. Is it possible ?

Upvotes: 1

Views: 2315

Answers (1)

yinon
yinon

Reputation: 1554

The easiest way is to use AQL.
For example, to find all folders in repo myrepo under the path foo/bar/, use the following query:

items.find({"repo":"myrepo","path":{"$match":"foo/bar/*"},"type":"folder"})

Upvotes: 7

Related Questions