Extract bugs code-smells vulnerabilities from db

Hi ,
I am trying to extract the below details from sonarqube postgres db.
for each project:

  1. number of bugs.
  2. number of code-smells
  3. number of vulnerabilities
  4. Result of qa gate evaluation

Please help me from which table/tables I can find this information.

Note: I am able to connect to sonar-PostgreSQL database, I can see all the tables and their content. I need to know from which table I can get the required information.


The database should be treated as a black box. If you want data, you should use the web services instead. You’ll find a link to their on-board documentation to the SQ page footer.