How to automate Pull Request Decoration to apply multiple Sonarqube projects

I am using SQ 8.1 Enterprise edition.
Need to automate PR decoration to be applied to multiple projects (not individual project basis). I see the same topic discussed in the community but not seeing any clear direction. Any help would be appreciated.


Hi Hasan,

The web API would be the only way to accomplish this. It’s documented within your SonarQube instance (see the “Web API” link in the footer of most pages). The resource api/alm_settings is probably the droid you’re looking for.

1 Like

Hi Jeff,

Thanks for the response. Are there samples of the alm_settings APIs for Azure that I can look at? I see some API parameters got changed from SQ version 8.1 to the latest and I notice some permission issue showing up while playing with the APIs. So, any samples of the API implementation might help me to understand them better. Thank you much.

No samples; however I encourage you to “spy” on our own usage of the API using your browser’s dev tools. When you change the ALM settings for Azure using the UI, you should see how we make the calls and can learn to reproduce based on that example.

Found a way to do it. Use API to set DevOps Platform Integration