Sonar Custom Plugin Store Custom Data

Hi All,
i’m trying to create a custom plugin for sonar. i want to store some external( from api) data in sonarqube database (creating new table and store). i couldn’t find any source regarding above info.

1.) is there any way to achieve this ?
2.) is there any api to access sonarqube analysis data (violations ,project) ?

your help will be appreciated.

any idea?

Welcome :slight_smile:

  1. In general the Sonarqube database should be handled as black box, don’t touch it.
    Maybe you’re sucessfully injecting / adding your data , but will the next Sonarqube update still work with your modifications … etc. ?!
    That said i had one use case in 4 years because of redesign of organisational structures.
    Had to rename several hundreds of projectnames.
    You may change the projectkey via Sonarqube web ui or web api BUT not the projectname.
    So i had to change it in the Sonarqube database via groovy script using the Sonarqube web api.

You may also use flat json or your own database !?

  1. yes, Sonarqube provides a web api to get informations + configuring, see the web api link
    in the footer of your instance or for all details.


@Rebse Thanks for the info