Enterprise Edition v2025.1 (102418)
ACTIVE - Standard Experience
My team is currently working on internal structures to monitor our license usage more closely, given the high number of components we manage. During this process, we encountered some inconsistencies that we would appreciate your clarification on.
When using endpoint X (detailed below), we receive a JSON file with license consumption details per project. However, summing project[“linesOfCode”] across all returned projects results in a discrepancy of over 150K lines compared to the total shown in the license endpoint Y.
Also, out of over N projects registered in our Sonar instance, only about N/2 are returned by endpoint X. Initially, we assumed this was due to many projects being empty (not analyzed, created through APIs), but even after accounting for that, over 100 empty projects are still missing from the count. We assumed that only already analyzed components were counted in endpoint Y, but we have not received clarification on the criteria for a component to appear in the response from endpoint X.
Given this, we would like to ask:
- How can we gain real-time visibility into our license usage without relying solely on endpoint Y? Isn’t there any view that offer a individual component perspective?
- What are the exact criteria for a component to be included in the list returned by endpoint X?
- For license enforcement purposes, which value is used: the sum of linesOfCode from endpoint X, or the total shown in endpoint Y?
We appreciate your support in helping us better understand and manage our license usage.
Endpoint X: api/projects/license_usage
Endpoint Y: api/editions/show_license