I’m using SonarQube version 10.6.0.92116 and trying to create a quality gate via Web API with conditions on only three metrics: vulnerabilities, code smells, and bugs — for both Overall and New Code.
While conditions for Overall Code are created successfully, adding conditions for New Code via API doesn’t work as expected.
Has anyone faced this issue or knows the correct way to set New Code conditions using the API?
Any help or example API calls would be appreciated.
As previously mentioned, you should upgrade your system—this time, the target version is 25.10
That said, If the functionality works in the SonarQube UI, consider monitoring the API calls your browser makes. The UI interacts with SonarQube through its API. More tips on reverse-engineering these API calls can be found here: