restjenkins-pipelineartifactoryartifactory-query-lang

How to find artifacts from Artifactory that have a specific property value using REST API


I want to search for all the artifacts in Artifactory that have some property field:

items.find({"@some_property" : {"$eq" : "some_value"}})

How can I do it using a REST API?


Solution

  • Here is an example:

    Following AQL query

    items.find(
     {
     "repo":{"$eq":"mymavenrepo"},
     "name": {"$match" : "*.jar"}
     }
    )
    

    can be translated to this REST call

    http://localhost/artifactory/api/search/artifact?name=*jar&re
    pos=jcenter-cache