# Code Coverage Report via WebAPI

**URL:** <https://community.sonarsource.com/t/code-coverage-report-via-webapi/56476>\
**Category:** SonarQube Server / Community Build\
**Created:** [January 17, 2022, 6:56am UTC](https://community.sonarsource.com/t/code-coverage-report-via-webapi/56476 "2022-01-17T06:56:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vk4linux](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/vk4linux/32/29268_2.png) [@vk4linux](https://community.sonarsource.com/u/vk4linux)\
**Post date:** [January 17, 2022, 6:56am UTC](https://community.sonarsource.com/t/code-coverage-report-via-webapi/56476/1 "2022-01-17T06:56:21Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)  
Sonarqube 8.9.1

- what are you trying to achieve

We have a Project which runs and provides the code Coverage Details on the UI like  
Bugs, Vulnerabilities, Code Smells and you need to click on each link to go in the details.

What we are trying to achieve:  
What we need is to pull that detailed report using WebAPI if that’s an option in HTML/PDF format.

Reason:  
There maybe developers who may not have access to Sonarqube directly, hence we want to send a report directly over email so it can be actioned immediately.

- what have you tried so far to achieve this  
Unable to find any API in the WebAPI documentation

---

<div class="post-metadata">

**Author:** ![Tobias\_Trabelsi](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tobias_trabelsi/32/31755_2.png) [@Tobias\_Trabelsi](https://community.sonarsource.com/u/Tobias_Trabelsi)\
**Post date:** [January 17, 2022, 9:08am UTC](https://community.sonarsource.com/t/code-coverage-report-via-webapi/56476/2 "2022-01-17T09:08:10Z")

</div>

Hi @vk4linux and welcome to the community 👋

what edition are you using? There is the option to generate PDF Reports directly from SonarQube in the Enterprise Edition and above.  
If you are using Community- or Developer Edition you will need to generate these reports for yourself. You can retrieve some high level information via `api/measures/component`. if you are looking for some more granular information you can take a look at `api/issues/search` and extract them from there.  
In general you can observer the API calls in your browser that SQ does (inspect element → network tab in chrome). everything you can do in the UI is fetched via a API call.

Could you maybe clarify why some developers do not have access to SonarQube? Is this a government restriction in your company or is there any other reason to restrict access your instance for people that should work with it?

hope that helps 🙂
