How do I ignore certain classifiers when performing gavc search on Artifactory through REST?

165 views Asked by At

I am writing a REST Client application which needs to perform a gavc search on our Enterprise Artifactory and list out the builds currently retained for specific version.

My REST URI looks like following:

/artifactory/api/search/gavc?g=com.abc&a=xyz&v=1.0-SNAPSHOT&repos=libs-release

As expected, this will return the applicable search results including jar files, pom files, sources jars and javadoc jars

Eg:
../com/abc/xyz/1.0-SNAPSHOT/xyz-1.0-1111.jar
../com/abc/xyz/1.0-SNAPSHOT/xyz-1.0-1111-sources.jar
../com/abc/xyz/1.0-SNAPSHOT/xyz-1.0-1111-javadoc.jar
../com/abc/xyz/1.0-SNAPSHOT/xyz-1.0-1111.pom
../com/abc/xyz/1.0-SNAPSHOT/xyz-1.0-1234.jar
../com/abc/xyz/1.0-SNAPSHOT/xyz-1.0-2222-sources.jar
../com/abc/xyz/1.0-SNAPSHOT/xyz-1.0-2222.pom
../com/abc/xyz/1.0-SNAPSHOT/xyz-1.0-3.jar
../com/abc/xyz/1.0-SNAPSHOT/xyz-1.0-45.pom etc

In the URI, if I specify c=sources or c=javadoc, I can get only those paths. How do I get only the regular jar files like xyz-1.0-1111.jar, xyz-1.0-3.jar etc?

I already tried

/artifactory/api/search/gavc?g=com.abc&a=xyz&v=1.0-SNAPSHOT&repos=libs-release&c=null
/artifactory/api/search/gavc?g=com.abc&a=xyz&v=1.0-SNAPSHOT&repos=libs-release&c=''
/artifactory/api/search/gavc?g=com.abc&a=xyz&v=1.0-SNAPSHOT&repos=libs-release&c=

The first two calls doesn't produce any results, while the third produces the same results as the initial query.

Thanks in advance.

0

There are 0 answers