Sonarcloud web api doesn't return anything for new_coverage

Hello!

I’m trying to create a dashboard in power bi to have a cross project overview of different metrics.
It will help me keep a better overview of the overall quality of our different projects.
I’ve created a dashboard to see the overall coverage of the projects and this works fine.
I wanted to replicate this for the new_coverage metric, but was met with only a collection of dates, without any actual value.

Request: https://sonarcloud.io/api/measures/search_history?component=*ComponentName*&metrics=new_coverage&ps=100

response:

{
    "paging": {
        "pageIndex": 1,
        "pageSize": 100,
        "total": 17
    },
    "measures": [
        {
            "metric": "new_coverage",
            "history": [
                {
                    "date": "2022-10-11T11:40:17+0200"
                },
                {
                    "date": "2022-10-25T14:19:34+0200"
                },
                {
                    "date": "2022-11-25T13:15:58+0100"
                },
                {
                    "date": "2022-12-12T11:04:23+0100"
                },
                {
                    "date": "2022-12-13T16:10:59+0100"
                },
                {
                    "date": "2023-01-27T15:20:06+0100"
                },
                {
                    "date": "2023-02-01T11:10:45+0100"
                },
                {
                    "date": "2023-03-31T14:59:48+0200"
                },
                {
                    "date": "2023-04-13T17:01:09+0200"
                },
                {
                    "date": "2023-04-21T10:39:14+0200"
                },
                {
                    "date": "2023-04-28T15:21:46+0200"
                },
                {
                    "date": "2023-05-04T17:40:17+0200"
                },
                {
                    "date": "2023-05-05T13:53:31+0200"
                },
                {
                    "date": "2023-05-08T10:41:10+0200"
                },
                {
                    "date": "2023-05-09T12:45:04+0200"
                },
                {
                    "date": "2023-05-10T10:08:26+0200"
                },
                {
                    "date": "2023-05-11T09:15:55+0200"
                }
            ]
        }
    ]
}

I assume that this is probably a bug as the exact same request for “coverage” does return the same structure but with actual values?

Hi,

We don’t store historical values for “new” metrics. Because once they’re historical… they’re no longer new.

 
:woman_shrugging:
Ann