You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Gero Vermaas <gv...@xebia.com> on 2014/12/15 20:25:05 UTC

How to invoke secured Rest API from command line?

Hi,

I want to invoke one of the rest calls from the command line to trigger a
download of the remote repository. The URL below should do the trick, but I
get an HTTP 403 response. I did validate that the username/password is
correct.

wget http://admin:admin1@localhost
:8080/restServices/archivaServices/repositoriesService/scheduleDownloadRemoteIndex?repositoryId=central

Is there a way to invoke the secured rest calls from the command line using
wget or curl?

Regards,

Gero

Re: How to invoke secured Rest API from command line?

Posted by Olivier Lamy <ol...@apache.org>.
Hi,
With wget use
--http-user=USER
--http-password=PASS

With curl

-u, --user USER[:PASSWORD]


HTH
Olivier


On 16 December 2014 at 06:25, Gero Vermaas <gv...@xebia.com> wrote:
>
> Hi,
>
> I want to invoke one of the rest calls from the command line to trigger a
> download of the remote repository. The URL below should do the trick, but I
> get an HTTP 403 response. I did validate that the username/password is
> correct.
>
> wget http://admin:admin1@localhost
>
> :8080/restServices/archivaServices/repositoriesService/scheduleDownloadRemoteIndex?repositoryId=central
>
> Is there a way to invoke the secured rest calls from the command line using
> wget or curl?
>
> Regards,
>
> Gero
>


-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy