# Sonar REST API - date of scanning and Coverage on the same RESTAPI

**URL:** <https://community.sonarsource.com/t/sonar-rest-api-date-of-scanning-and-coverage-on-the-same-restapi/35158>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube\
**Created:** [November 30, 2020, 9:48am UTC](https://community.sonarsource.com/t/sonar-rest-api-date-of-scanning-and-coverage-on-the-same-restapi/35158 "2020-11-30T09:48:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![miri\_saidon](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/miri_saidon/32/17315_2.png) [@miri\_saidon](https://community.sonarsource.com/u/miri_saidon)\
**Post date:** [November 30, 2020, 9:48am UTC](https://community.sonarsource.com/t/sonar-rest-api-date-of-scanning-and-coverage-on-the-same-restapi/35158/1 "2020-11-30T09:48:16Z")

</div>

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

- which versions are you using- Community Edition Version 8.3.1 (build 34397)
- what are you trying to achieve - get coverage of overall and new code in addition to get in the same REST API the date of scanning
- what have you tried so far to achieve this - execute NEW CODE coverage RESTAPI- [https://actsonarqube.actimize.systems/api/qualitygates/project\_status?projectKey=X](https://actsonarqube.actimize.systems/api/qualitygates/project_status?projectKey=X) but this contain the date of the base period and I need the last time of scanning

execute for OVERALL coverage RESTAPI -  
[https://actsonarqube.actimize.systems/api/measures/component?component=x&metricKeys=coverage](https://actsonarqube.actimize.systems/api/measures/component?component=x&metricKeys=coverage)

but again in this API - I have no date of scanning

---

<div class="post-metadata">

**Author:** ![Eric\_Le\_Goff](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/eric_le_goff/32/3951_2.png) [@Eric\_Le\_Goff](https://community.sonarsource.com/u/Eric_Le_Goff)\
**Post date:** [December 1, 2020, 10:10am UTC](https://community.sonarsource.com/t/sonar-rest-api-date-of-scanning-and-coverage-on-the-same-restapi/35158/2 "2020-12-01T10:10:35Z")

</div>

Hello,

You may want to use API _GET api/measures/search\_history_  
i.e something like  
[https://actsonarqube.actimize.systems/api/measures/search\_history?component=x&metrics=coverage](https://actsonarqube.actimize.systems/api/measures/search_history?component=x&metrics=coverage)

Regards

Eric

---

<div class="post-metadata">

**Author:** ![miri\_saidon](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/miri_saidon/32/17315_2.png) [@miri\_saidon](https://community.sonarsource.com/u/miri_saidon)\
**Post date:** [December 1, 2020, 2:47pm UTC](https://community.sonarsource.com/t/sonar-rest-api-date-of-scanning-and-coverage-on-the-same-restapi/35158/3 "2020-12-01T14:47:18Z")

</div>

> [@miri\_saidon](#):
>
> are you trying to achieve - get coverage of overall and new code in addition to get in the same REST API the date of scanning

Thanks Eric , regarding overall code - U r right? but what about new code ?

---

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://community.sonarsource.com/u/Karthik)\
**Post date:** [August 22, 2022, 8:02am UTC](https://community.sonarsource.com/t/sonar-rest-api-date-of-scanning-and-coverage-on-the-same-restapi/35158/4 "2022-08-22T08:02:47Z")

</div>

Hi miri saidon

Even I’m looking for a RestApi which will give latest scan timestamp or date with the required attributes, Can you please share it if you find it?

Thanks & Regards,  
karthik

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [August 22, 2022, 8:17am UTC](https://community.sonarsource.com/t/sonar-rest-api-date-of-scanning-and-coverage-on-the-same-restapi/35158/5 "2022-08-22T08:17:39Z")

</div>

Hey @Karthik

Instead of bumping an old thread, I invite you to open a new thread with specifics about what data you’re looking for.

I’d also encourage you to read this guide.

> [@How to reverse engineer the Sonar Web API](https://community.sonarsource.com/t/how-to-reverse-engineer-the-sonar-web-api/66810):
>
> Every action that is taken in the SonarQube / SonarCloud UI is driven by the Web API. There is nothing you can do in SonarQube / SonarCloud that you cannot do using the Web API. warning We put a great deal of effort into the UI and UX of our products and sincerely think that most actions should be completed there. Especially when it comes to viewing analysis results, the UI is the best place to view up-to-date information with the right context. We think it is much better that you give access…

I will close this thread.

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [August 22, 2022, 8:17am UTC](https://community.sonarsource.com/t/sonar-rest-api-date-of-scanning-and-coverage-on-the-same-restapi/35158/6 "2022-08-22T08:17:42Z")

</div>


