Hello, the 204 is thrown, if the artifact is not found by the search call. So I'm not sure, why it is not found. Is anonymous access allowed to your repository? How many repositories do you have? Is it the same, if you set the repository ID with the 'r'-Parameter? Can you find the artifact on the web UI with the given entries?
Is there any info in the log file? If not, could you please change it to debug level, and send it to me? Greetings Martin Am Mittwoch, 21. März 2018, 21:54:26 CET schrieb Maury Hammel: > Hello, I have just getting into Archiva and am having problems attempting to > download artifacts using the REST API. > > I have the standalone distribution of Archiva 2.2.3 installed on CentOS 7 and > have started it with the "archiva console" command. > > As noted in the Quick Start guide, I can download an artifact using the > following URL from the command line on the same machine: > > % wget > "http://localhost:8080/repository/internal/junit/junit/3.8.1/junit-3.8.1.jar" > > My first attempt to down load the same artifact using the REST API generated > a "403 Forbidden" error: > > % wget > "http://localhost:8080/restServices/archivaServices/searchService/artifact?g=junit&a=junit&v=3.8.1" > -O junit-3.8.1.jar > > After some reading, I went into conf/archiva.xml, changed > rest.csrffilter.enabled to "false" and restarted Archiva. > > Now when attempting the above command, I no longer get the "403 Forbidden" > error, I get a "204 No Content" error and an empty file (see wget output > below). > > Is there something else (or something different) that I need to change in the > Archiva configuration, or is my request formatted incorrectly? > > Thanks in advance..... > > > --2018-03-21 14:53:33-- > http://localhost:8080/restServices/archivaServices/searchService/artifact?g=junit&a=junit&v=3.8.1 > Resolving localhost (localhost)... ::1, 127.0.0.1 > Connecting to localhost (localhost)|::1|:8080... connected. > HTTP request sent, awaiting response... 204 No Content > Length: 0 > Saving to: 'junit-3.8.1.jar' > > [ <=> > ] 0 --.-K/s in 0s > > 2018-03-21 14:53:33 (0.00 B/s) - 'junit-3.8.1.jar' saved [0/0] > >
