简体   繁体   中英

Using REST api of ARCHIVA artefact repository

I need your help. I would like to access my Archiva artefact repository using the REST api, but only one request works: http://myArchiva/restServices

It returns a list of URLs to access the wadl files. But the listed urls as well as all other requests described in the Archiva documentation return status 404 - Not found! I tried it with Archiva 2.2.3 (with or without CRSF activated) and also with Archiva 2.2.1.

What do I wrong? Do I need to add special headers?

me found out 2 things that has to be done to work with Archiva REST-API (tested with archiva v2.2.3):

Example URL Base Pattern for Rest-Requests:
http://[YOUR-ARCHIVA-BASE-URL]/restServices/archivaServices/
(from that point you can target the URL's as described in the Archiva-REST-Docs)

It seems to be required that u have to put in Header a Referer in that manner:
Referer: http://[YOUR-ARCHIVA-BASE-URL]/

This finally works for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM