Webhooks

Overview

Webhooks allow you to send notifications to servers outside of CloudRepo whenever one of the following events occur:

  • File Deletion
  • File Download
  • File Upload

Types of Webhooks

CloudRepo currently supports the following type of Webhooks:

Note

If you need additional webhook support, please let us know.

Email Notifications

CloudRepo can be configured to send an email notification whenever a file event happens in your repositories.

Jump to Creating a Webhook to get started.

JSON Webhooks

CloudRepo can be configured to POST a JSON payload to an HTTP endpoint whenever a file event happens in your repositories.

Jump to Creating a Webhook to get started.

Slack Integration

This section details how to setup CloudRepo to fire events into your Slack channels.

Create a Slack Workspace App

First, navigate to the Slack API Access and sign in.

Once you’re signed in click the ‘Create an App’ button as seen in the following screenshot:

_images/100-create-app.png

On the next screen, enter ‘CloudRepo’ for the App Name and select the workspace you wish to integrate with:

_images/200-app-name.png

Activate Incoming Webhooks

Once your Slack Workspace App is created you will need to activate Incoming Webhooks for your workspace.

To do this, click on Incoming Webhooks as seen in the following screenshot:

_images/300-incoming-webhooks.png

Toggle the button to activate Incoming Webhooks for your workspace:

_images/400-activate-incoming-webhooks.png

Once the button is toggled, click the ‘Add Webhook to Workspace’ button:

_images/500-add-new-webhooks-to-workspace.png

You will then be prompted to authorize the app in your workspace and to select the channel you wish to send notifications:

_images/600-authorize-application.png

Upon successful authorization, you’ll be sent back to the Webhooks Configuration screen. Your new webhook will be added and you will be able to copy the URL into your clipboard in order to add it to CloudRepo.

Click the ‘Copy’ button next to your newly created webhook:

_images/700-copy-webhook-url.png

Now that the Slack Webhook has been created within Slack and added to your Slack workspace, you’ll need to login to the CloudRepo Administrator Portal.

Creating a CloudRepo Webhook

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

From the side navigation panel, navigate to ‘Webhooks’:

_images/100-navigate-to-webhooks.png

You’ll be presented with the list of webhooks. If this is your first webhook, the list will be empty.

Click the button to create a new webhook:

_images/200-add-new-webhook.png

On the ‘Create Webhook’ screen you’ll need to fill out the form appropriately:

  • Repository to Trigger Webhook
    • The webhook will fire for events that occur within this repository.
  • Webhook Target
    • Email: Type the email address you wish to send notifications to.
    • JSON: Type the Webhook URL that will listen for an HTTP POST with an HTTP JSON body.
    • Slack: Paste the Webhook URL that you copied from the Slack Webhook Configuration Page here.
  • Fire Webhook On The Following Artifact Events:
    • Select the events you wish to be notified about.

Once you’ve completed the form, you can click the ‘Add Webhook’ to create your webhook:

_images/1000-add-webhook.png

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

_images/1100-list-webhooks.png

Modifying a Webhook

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.

Deleting a Webhook

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

_images/300-select-existing-webhook.png

On the Webhook Details page, click the Delete button as shown:

_images/400-delete-existing-webhook.png

A confirmation window will pop up, confirm deletion and the webhook will be permanently removed.