Private lines of code analyzed with web_api

Hello,

I’m trying to get the “private lines of code analyzed” from our Sonar organization through the API SonarCloud.

Using the APIs provided by Sonar, I don’t get the same result as in the SonarCloud interface.
I use the following endpoints:

Is there another way to get the “private lines of code analyzed” via API?

Thanks,

A user with Administer Organization permissions can use the internal API GET api/billing/show with the organization parameter. This is an internal API subject to change without notice.

https://sonarcloud.io/api/billing/show?organization=<ORG_KEY>

This API endpoint returns values like nclocCount (representing private projects)

I’m crying.
Why isn’t this documented somewhere?

Thanks for the answer by the way.

Internal APIs stay internal so we have the flexibility to change them however we want without worrying about compatibility.

It’s a great question – why isn’t there a Public API with this information :smiley: I’m happy to move your thread over to Product Manager for a Day - Sonar Community

And, in the future, if there’s data you see in the UI you can’t seem to figure out how to get via the API, keep this in mind: