REST api : how do i authenticate, to be able to use the API

56 views
Skip to first unread message

Cédric Levasseur

unread,
May 14, 2019, 11:34:38 AM5/14/19
to scmmanager
Hello

The documentation is not really clear for using the REST api

How do i authenticate ?
Here's what i'm doing
curl -v -X POST -H "Content-Type: application/json" -d '{"username":"scmadmin", "password"}':"verysecretpassword"' http://myserveur/api/rest/authentication/login
But i get a HTTP/1.1 400 Bad Request


Also, How do i keep get api key ? authentication doesn't return a key ?

My aim is to install a plugin throught the REST api.

Thank you

Cedric


Cédric

unread,
May 15, 2019, 12:14:36 PM5/15/19
to scmmanager
finally, i found a way to use the REST Api. For example.
curl -u scmadmin:mysecretpassword -X GET -H "Content-Type: application/json"  http://svnsdfl.xit.rxcorp.com/api/rest/plugins/available

Thanks
Cédric

--
You received this message because you are subscribed to the Google Groups "scmmanager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scmmanager+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scmmanager/1324f7ef-faef-478c-8195-6f86f0f67c3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages