Can you, programmatically or declaratively, create a webhook on startup/initialization of the sonarqube server?

webhooks

(Carlos OKieffe) #1

For sonarqube server, is there a way to create a webhook on startup or initialization.
I see that in 6.7, on $server/admin/settings?category=webhooks, the webhook has a property key of ‘sonar.webhooks.global’

I have tried to create a webhook by adding values to sonar.properties in $SONARQUBE_HOME/conf

tried
sonar.webhooks.global=1
sonar.webhooks.global.1.name=jenkins
sonar.webhooks.global.1.url=***

and
sonar.webhooks.global.name=jenkins
sonar.webhooks.global.url=***

Thanks in advance for any assistance. If it is only available in a later version that would be helpful to know


(Scott) #2

Hi.

In newer versions you can use the REST API: https://sonarcloud.io/web_api/api/webhooks