Skip to content

Webhooks

View as Markdown

Webhooks allow you to send notifications to servers outside of CloudRepo whenever one of the following events occurs in a Maven, Python or npm repository:

  • File Deletion
  • File Download
  • File Upload

CloudRepo currently supports the following type of Webhooks:

Every webhook target must be an https:// URL that resolves to a public host.

CloudRepo can be configured to POST a JSON payload to an HTTPS endpoint whenever a file event happens in a Maven, Python or npm repository.

Jump to Creating a Webhook to get started.

To send events to a Slack channel, create an incoming webhook in your Slack workspace first, by following Slack’s guide, Sending messages using incoming webhooks. Slack gives you a webhook URL. Then create a CloudRepo webhook of type Slack and paste that URL as the Webhook Target. Treat the URL as a secret: whoever has it can post to your channel.

First, you’ll need to login to the CloudRepo Administrator Portal.

From the side navigation panel, click Webhooks.

The Webhooks page reads No webhooks configured.

You’ll be presented with the list of webhooks. If this is your first, the page reads No webhooks configured.

Click Create Webhook.

The Create a Webhook form: the repository, the webhook target, the type and the events.

On the Create a Webhook screen, fill in:

  • Repository to Trigger Webhook: the webhook fires for events in this repository.
  • Webhook Target: for JSON, the https:// URL that listens for an HTTP POST with a JSON body; for Slack, the webhook URL you copied from Slack.
  • The webhook type: JSON or Slack.
  • Fire Webhook On the Following Artifact Events: tick Delete, Download, Upload, or any of them.

Then click Create Webhook.

maven-releases is chosen, the target is https://ci.example.com/hooks/cloudrepo, the type is JSON, and Upload and Delete are ticked.

Upon successful completion, your webhook will now be listed in the list of webhooks:

The new webhook is listed with its target.

At this time, CloudRepo doesn’t support modifying an existing webhook.

If you wish to add events to a particular webhook URL, simply create a new webhook with the additional events you wish to monitor.

If you wish to remove events from a particular webhook, delete the existing webhook and add a new webhook with the updated permissions.

In order to delete a webhook, select it from the list of webhooks:

The webhook's details, with Delete Webhook at the bottom.

On the Webhook Details page, click Delete Webhook.

Delete Webhook asks you to type the target URL to confirm.

A confirmation window will pop up; confirm, and the webhook is permanently removed.