Using time machine Web Api to get number of issues with a certain tag


(Guillaume Serneels) #1

Hello Sonar Community, my first post here.

Is is possible to use the /timemachine Web Api to retrieve the number of issues with a certain tag? (in my case, the tag I would like to look for is brain-overload)

I was able to get the number of issues, critical issues and blocking issues, using the metrics parameter:


But I can’t find a way to look for issues with a specified tag.

Thanks in advance for your help

(Nicolas Bontoux) #2

Hi Guillaume,

I was gonna ask: why use timemachine API ? But I guess it’s because you care about historical values.

To the point then: timemachine API is about measures . So if you could get number of issues per tag, it would mean that SonarQube would constantly be tracking and recording the measure of ‘number of issues with this tag’ (and would that for each tag!). That’s not the case, only the measures that you see in the Measures page are tracked by SonarQube.

You’re still very much able to track the current number of issues with a certain tag, and you could do that using api/issues/search.

(Guillaume Serneels) #3

Hi Nicolas,

Yes I am interested in the historical values

Thanks for your quick and precise answer