Webhooks
Understanding the webhooks in SonarQube Cloud.
This feature is only available in the Team and Enterprise plans.
To configure your webhooks, see:
Webhooks notify external services when:
A project analysis is complete. This is done regardless of the status of the background task or of the quality gate.
An issue type, severity, or status is updated, and this update changes the quality gate status. For example:
A user marks an issue as False Positive and the quality gate status turns green.
The severity of an issue is increased and the quality gate status turns red.
An HTTP(S) call including a JSON payload is sent to each configured URL. URLs may be specified at both the project and global levels. The project-level specification does not replace global-level webhooks. All hooks at both levels are called.
HTTP(S) call
The HTTP(S) call:
Has an HTTP header
X-SonarQube-Projectwith the project key to allow quick identification of the project involved.Includes a JSON document as payload, using the POST method. See below.
Has a content type of
application/json, with UTF-8 encoding.
Payload
The payload is a JSON document that includes:
analysedAt: when the analysis was performed.project: the identification of the project analyzed.qualityGate: each quality gate criterion checked and its status.qualityGate.status: the quality gate status of the analysis.statusandtaskID: the status and the identifier of the background task.properties: user-specified properties.
You can define project parameters to be added to the payload.
Webhook protection with HMAC
SonarQube can generate an HMAC to allow the third party service to verify the integrity and authenticity of the webhook they receive. To do so, it uses the HMAC-SHA256 algorithm and the secret stored in the webhook configuration.
Related pages
Last updated
Was this helpful?

