Currently JIRA offers a webhook administration page. We would like to see a similar feature in Confluence.
There exists a private API that can be used for this purpose. However, the endpoint discussed below is intended for internal use only. Therefore, it is not part of the official Confluence Cloud REST APIs, it is not supported and it can change without any notice.
Once this has been said: you can register, list or delete Webhooks in Confluence Cloud by using the internal REST API endpoint /wiki/rest/webhooks/1.0/webhook.
The endpoint works the same way as the /rest/webhooks/1.0/webhook endpoint documented for Jira Cloud in the Webhook documentation page, section: Registering a webhook using the Jira REST API (Other integrations)
To register a webhook using REST:
- Send a POST request using below format to: https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook
- The response will return the webhook in JSON with additional information, including the user that created the webhook, the created timestamp, etc.
For a complete list of events, etc, please refer to the Confluence Cloud Webhook documentation page.
To unregister (that is, delete) a webhook using REST:
- Execute a DELETE to the following URL: https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook/<Webhook-ID>
The following would delete the webhook with an ID of 70:
To query a webhook using REST:
- To get all webhooks (registered using this method) for a Confluence Cloud site, send a GET request to: https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook.
- To get a specific webhook by its ID, perform a GET with the following URL: https://your-domain.atlassian.net/rest/webhooks/1.0/webhook/<Webhook-ID>
Example: the following would get a webhook with an ID of 72