About web API hotspots search additionnalFields (get comments)

Version used: SonarCloud web API

Suggestion: hotspots/search api more query parameters.

Hello I’m using SonarCloud web API. I need to do a list of issues and the latest comments input, same for Hotspots. Since the issues and hotspots are reported in different endpoints, I starting to compare what’s missing each others. And I would like to see comments in each hotspots result.

/api/hotspots/search should have query parameter : additionalFields so we can enter “comments”.

Because for /api/issues/search we have this feature, and it helps as we don’t have to use a separate api to get the comments.

Do you have any plan to release this ?

ps: I know also this endpoints is not yet documented, so I can understand you are still under development and subject to refactoring.


For anyone that is interested by this api , it is documented but under sonarQube domain (internal endpoint)

Hi @westtrihar

The additional fields parameter on the Hotspot search does not exist yet. I’m transferring your post to the “suggest a feature” section.
We don’t have any plans yet, but the suggestion will be considered.
Just a small warning, be careful when using undocumented endpoints like /api/hotspots/search, their behavior and definition may change without notice.

Thanks for explaining your use case!

Thanks for replying and I will try to follow up for further change on endpoints.