mardi 24 juillet 2018

How to use WebAPI in bash for sonarqube?

I want to write a shell script to login and get bugs for a project.

Here is what I found online: curl -u MY_LOGIN:MY_PASSWORD https://sonarqube.com/api/user_tokens/search

But when I use it in terminal: curl -X POST -u username:password http://www.example.com/api/user_tokens/search

I get an error: {"errors":[{"msg":"Authentication is required"}]}.

Here is the URL: https://docs.sonarqube.org/display/DEV/Web+API

Please help me use webapi in sonarqube.




Aucun commentaire:

Enregistrer un commentaire