Rest API for SonarQube Quality profile

q_profiles
web_api

(Haisrig) #1

Sonarqube version: 7.5

We are using SonarQube as Static Code Analysis tool. My requirement is to set a specific quality profile to a project using Rest API. I was able to do that but in the request i’m passing Username and Password for authentication.

Is there anyway to try the Rest API with the SonarQube authentication token?

Thanks,
Srikanth.


(Julien Lancelot) #2

Hi,

Indeed, you can use a token when querying SonarQube web service.
As explained here :

When invoking web services: just pass the token instead of your login while doing the basic authentication

Regards,
Julien Lancelot


(Haisrig) #3

Thanks. Its worked.