I’m currently using SonarQube Developer Edition with an active license. In the License Manager settings I configured the “Notification Threshold” to a value of 100,000 LOC to monitor license usage more precisely.
However, I’ve noticed that after each upgrade to a new SonarQube version (e.g., from 2025.1 → 2025.2 → 2025.3), this threshold gets reset to the default value of 200,000 LOC. This requires manual reconfiguration after every upgrade, which is not ideal for automated deployments.
I’d like to request the ability to set or update the LOC Notification Threshold via the Web API, so that this setting can be automatically restored or managed through infrastructure-as-code tools after upgrades.
Is this currently possible through any existing API endpoint?
Everything that happens through the UI happens via an API, so yes, there’s an API for this, although it may not be marked ‘external’. If it’s not, then it’s subject to change without warning (although for this particular one you’re likely to be pretty safe.)
The best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.
I am trying to reproduce locally because by looking at the code I see no reason why this should happen.
Setting that value results in an API call that stores the value in the Database in the properties table.
The LOC threshold property is reset when setting a new license, but I don’t think that is your case when updating from version 2025.1 to 2025.2 or 2025.3.
The manual set of an updated license will justify this behavior, but not a simple upgrade.
I will add more details once my local test is complete.
I would check if the license is being set at each upgrade, because that would justify this reset. In my case the license was not touched after setting it the first time in version 10.8.1.