how can I have the repo name, all artefact names and, if a certain property occurs, e.g. e-mail address, also the e-mail address output? At the moment, I only get the artefacts that have a specific email address.

Here is my aql query:

items.find({"repo": {"$eq": myRepo}}).include("@Contact-Adress")

But I want ALL artefacts. So also the artefacts that do not have an email address. And if an email address exists, it should also be output in the result.

Thanks in advance

1

There are 1 best solutions below

0
Vaibhav Jain On

To get the repository name, artifact name, and properties, execute the below AQL query:-

curl -u <username>:<password> -X POST -k -H 'Content-Type:text/plain' https://<ART-URL>/artifactory/api/search/aql --data 'items.find({"repo": "repository-name"}).include("repo", "name", "property")'

This will list all the artifacts having the properties associated with them as well as the artifacts not having any properties along with the repository name. For more information on AQL visit the Documentation Page