API integration with Postman

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube * Version 7.9.1)
  • what are you trying to achieve (I want to get metrics from tested project to my website)
  • what have you tried so far to achieve this (I checked API in postman, but have no result)
  • question (Is your API working, how to authorized my sonarqube account in postman?)

Welcome to the community ! You have two way of authenticate for API call described in the doc. We recommend to use a User token.

Hello, Thank you! I have generated User token and try to authorization like written in doc. But nothing happens.

Hey,
I’m a bit too late to this post but still adding a comment to help out.

In Sonar’s Web_API documentation the URL that they share is https:///web_api/api/user_groups/search, this API won’t work in Postman.
We need to change the URL to https:///api/user_groups/search.
For the Authentication, use BASIC AUTH and pass the User token as the user name, and the password blank.

1 Like