How to get names of projects with the default quality gate?

I’m thinking about changing the default quality gate, but I can’t find names of projects that may be affected by this change. Non-default quality gates show names of projects with and without these quality gates, but the default quality gate just says “Every project not specifically associated to a quality gate will be associated to this one by default.”

Is there a way to find out names of the projects that use the default quality gate? I’m using SonarQube 8.6 at the moment.

1 Like

Hi @vladimir-kazakov ,

You can use SonarQube API: GET api/qualitygates/search .
See the documentation of this API method under http(s)://<your_sq_server_url>/web_api/api/qualitygates


Hi, @Daniel_Meppiel! I tried api/qualitygates/search?gateName=* with a name of my default quality gate, but it only returns names of projects that are explicitly assigned to this gate. Projects that are implicitly using this gate are not in the response.

Hi Vladimir,

You are right, projects with no specific Quality Gate set will not show up upon this query.
What I can think of: you may use a combination of API methods on your own crafted script:

  1. Get a list of all your active projects using GET api/projects/search
  2. Using the list above, for each project, query which QG is being used via GET api/qualitygates/get_by_project. If the QG is the default one, the project will be affected.

Hope it helps, cheers,

Is there any plan to display the list of projects implicitly assigned to the default quality gate in the user interface? It would be so helpful.