0

I always get 204 while trying to search for an artifact via the API.

example url: http://archiva.mydomain.com/restServices/archivaServices/searchService/artifact?a=test&g=com.mydomain.test&v=1.0

The groupId, artifactId and version all match up in the pom and also show up on the archiva web interface properly.

In order to download this artifact directly I use this link: http://archiva.mydomain.com/repository/internal/com/mydomain/test/test/1.0/test-1.0.war

diecast
  • 37
  • 4
  • I get _"Server not found"_ with both of your links in my browser. `nslookup archiva.mydomain.com` → `*** ... can't find archiva.mydomain.com: Non-existent domain` – Gerold Broser Nov 15 '14 at 17:00
  • I was giving examples, not the real domain that we use. – diecast Mar 21 '15 at 22:07

1 Answers1

1

Consult the following .wadl:

http://< your_host_name>:< your_port>/archiva/restServices/archivaServices?_wadl

After some trial and error using the provided .wadl, I was able to successfully query the REST API for a known, existing artifact using Chrome's Postman. I started with observableRepoIds, since it doesn't require parameters. Next, I moved on to a resource with only 1 parameter: getAllGroupIds. Using those successful attempts as baselines, I attempted the artifact resource.

The following query worked for me:

http://< your_host_name>:< your_port>/archiva/restServices/archivaServices/searchService/artifact?g=com.atlassian.xmlrpc&a=atlassian-xmlrpc-binder&v=0.11

Within the Header, I specified the following:

Accept = text/html

Authorization = Basic < your encrypted credentials here>

Chris Harris
  • 1,329
  • 4
  • 17
  • 28