Single Assets Download

Hi There,

I am trying to download a single asset from nexus repository manager 3.14 through nexus web-api. I am using below api
curl -u userName:password -X GET “https://serverName:port/nexus/service/rest/v1/search/assets/download?repository=test&group=com.test&name=testApp&version=1.0.1”

so its giving me message like’search returned multiple assets. Please refine search criteria’

Here I am trying to download a .jar file from NXRM3 so what extra search criteria I can specify or is there any other way to download asset (through scripts)?

After some hours of surfing and testing I came to know that the API I mentioned above won’t download the assets instead it will just provide me URL of asset and by using that URL I can download the asset. Is there any other way to download the asset? Why you all are giving url and not the downloadable file directly?

You need to narrow the search down to a single file for this to work. Assuming this is a maven repository, try adding these parameters: maven.extension=jar&maven.classifier

So it will match an artifact with jar extension and no classifier.