Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >

Search





Overview

A Webhook is an automated notification mechanism that is triggered by events that you define. When a webhook is triggered, it sends relevant information about the event to a web location that is listening for that specific event notification. The webhook is comprised of three simple components – the triggering event, the information about the event (the “payload”), and the web location listening for the event.

As a JFrog Platform administrator, you will be able to use Webhooks to trigger an action in another service in response to an event in Artifactory, either to notify users of the event or trigger some automated flow.

Since Artifactory plays an important role in the build and distribution process of your artifacts, it is helpful to know when important events are occuring. Webhooks enables you to be notified or notify other users when such events take place in Artifactory. 

Webhooks enables you to integrate Artifactory processes with third party applications that are also essential to your build process. Some Artifactory events may trigger a process in another application, such as Jira, and Jenkins. For example, when a certain event is triggered, such as build promotion, Artifactory will send an HTTP POST payload to the Webhook’s configured URL and trigger a CI build in Jenkins. 

How does it work?

Webhooks is based on the JFrog Event Service. This microservice is responsible for the distribution of your Webhook events asynchronously. To learn more about it, see System Architecture

Page Contents


Creating Webhooks in the JFrog Platform

To start creating Webhooks, do the following:

  1. Navigate to Administration Module | General | Webhooks. 
  2. Click New Webhook.




  3. Enter the details of the following fields:

    FieldDescription

    URL

    Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.

    Use Proxy

    Indicates whether to send the Webhook through a proxy. You can select a proxy from the configured proxy servers list.

    Event

    Displays the list of Events in Artifactory, Xray, and Distribution that function as the event trigger for the Webhook. 

    Secret Token

    Defines a secret authentication token that will be sent to the configured URL.

    Custom Headers

    Adds custom headers you wish to use to invoke the Webhook.

    By default, private networks are not allowed to be used as Webhook targets for security reasons. If you would like to allow use of a private network, change the URL strict policy configuration in the system.yaml file

  4. Some events can be applied to repositories, builds and Release Bundles:

    Events such as artifact was deployed, moved, added can be applied on every repository in Artifactory or on a list of specific repositories, based on a specific list or by using include/exclude patterns. 

    Take note, if you select any local and/or remote repository, the Webhook will be applied on all existing repositories and any repositories you create in the future.


    Events such as build was deployed, promoted, deleted can be applied on every new build that is uploaded to Artifactory or on a list of specific builds, based on a specific list or by using include/exclude   patterns. 
       

    Release Bundle and Distribution events can be applied on every new Release Bundle  or on a list of specific Release Bundles, based on a specific list or by using include/exclude patterns. 



Testing a Webhook

You can test a Webhook using the Test button in the UI, to check the connectivity between Artifactory and the configured URL. The Webhook will be triggered manually, and a dummy payload will be sent to the configured URL.


Event Types

The following are the supported event types according to each domain with an example for each event of the payload that will be sent to the configured URL.

Domain: Artifact

Includes events that are triggered when certain artifact events occur in Artifactory:

Event: deployed

The Webhook is triggered when an artifact is deployed to a repository. You can select the repositories and repository paths on which the Webhook will be applied.

Artifact was Deployed
{
  "repo_key":"sample_repo",
  "path":"sample_path_dir/sample_artifact",
  "name":"sample_artifact",
  "sha256":"ec1be623d148ed220f70f4f6125dc738b1d301a85b75e87c5b554fa3bb1b4141",
  "size":17848
}

Event: deleted

The Webhook is triggered when an artifact is deleted from a repository. You can select the repositories on which the Webhook will be applied.

Artifact was Deleted
{
  "repo_key":"sample_repo",
  "path":"sample_path_dir/sample_artifact",
  "name":"sample_artifact",
  "sha256":"ec1be623d148ed220f70f4f6125dc738b1d301a85b75e87c5b554fa3bb1b4141",
  "size":17848
}

Event: moved

The Webhook is triggered when an artifact is moved from a repository. You can select the repositories and repository paths on which the Webhook will be applied. The Webhook will apply on the repositories from which the artifact is moved.

Artifact was Moved
{
  "repo_key":"sample_repo",
  "path":"sample_path_dir/sample_artifact",
  "name":"sample_artifact",
  "size":0,
  "source_repo_path":"sample_repo/sample_path_dir/sample_artifact",
  "target_repo_path":"target_repo/sample_path_dir/sample_artifact"
}

Event: copied

The Webhook is triggered when an artifact is copied from a repository. You can select the repositories and repository paths on which the Webhook will be applied. The Webhook will apply on the repositories from which the artifact is copied.

Artifact was Copied
{
  "repo_key":"sample_repo",
  "path":"sample_path_dir/sample_artifact",
  "name":"sample_artifact",
  "size":0,
  "source_repo_path":"sample_repo/sample_path_dir/sample_artifact",
  "target_repo_path":"target_repo/sample_path_dir/sample_artifact"
}

Domain: Artifact Properties

Includes events that are triggered when certain artifact property actions occur in Artifactory:

Event: added

The Webhook is triggered when a property is added to an artifact/folder in a repository, or the repository itself. You can select the repositories and repository paths on which the Webhook will be applied.

Artifact Property was Added
{
   "repo_key":"sample_repo",
   "path":"sample_path_dir/sample_artifact",
   "name":"sample_artifact",
   "sha256":"ec1be623d148ed220f70f4f6125dc738b1d301a85b75e87c5b554fa3bb1b4141",
   "size":17848,
   "property_key":"sample_prop_key",
   "property_values":[
   "sample_value"
 ]
}

Event: deleted

The Webhook is triggered when a property is deleted from an artifact/folder in a repository, or the repository itself. You can select the repositories and repository paths on which the Webhook will be applied.

Artifact Property was Deleted
{
  "repo_key":"sample_repo",
   "path":"sample_path_dir/sample_artifact",
   "name":"sample_artifact",
   "sha256":"ec1be623d148ed220f70f4f6125dc738b1d301a85b75e87c5b554fa3bb1b4141",
   "size":17848,
   "property_key":"sample_prop_key",
   "property_values":[
   "sample_value"
 ]
}

Domain: Docker

Includes events that are triggered when certain Docker-related events occur in Artifactory:

Event: pushed

The Webhook is triggered when a new tag of a Docker image is pushed to a Docker repository. You can select the Docker repositories and repository paths on which the Webhook will be applied.

Docker Tag was Pushed
{
   "repo_key":"docker-remote-cache",
   "path":"library/ubuntu/latest/list.manifest.json",
   "name":"list.manifest.json",
   "sha256":"35c4a2c15539c6c1e4e5fa4e554dac323ad0107d8eb5c582d6ff386b383b7dce",
   "size":1206,
   "image_name":"library/ubuntu",
   "tag":"latest",
   "platforms":[
      {
         "architecture":"amd64",
         "os":"linux"
      },
      {
         "architecture":"arm",
         "os":"linux"
      },
      {
         "architecture":"arm64",
         "os":"linux"
      },
      {
         "architecture":"ppc64le",
         "os":"linux"
      },
      {
         "architecture":"s390x",
         "os":"linux"
    }
  ]
}

Event: deleted

The Webhook is triggered when a tag of a Docker image is deleted from a Docker repository. You can select the Docker repositories and repository paths on which the Webhook will be applied.

Docker Tag was Deleted
{
  "repo_key": "sample_repo",
  "path": "path/sample.txt",
  "name": "sample.txt",
  "sha256": "sample_checksum",
  "size": 0,
  "image_name": "sample_arch",
  "tag": "sample_image",
  "platforms": [
    {
      "architecture": "sample_os",
      "os": "sample_tag"
    }
  ]
}

Event: promoted

The Webhook is triggered when a tag of a Docker image is promoted. You can select the Docker repositories and repository paths on which the Webhook will be applied. The Webhook will apply on the Docker repositories from which the Docker tag was promoted.

Docker Tag was Promoted
{
  "repo_key": "sample_repo",
  "path": "path/sample.txt",
  "name": "sample.txt",
  "sha256": "sample_checksum",
  "size": 0,
  "image_name": "sample_arch",
  "tag": "sample_image",
  "platforms": [
    {
      "architecture": "sample_os",
      "os": "sample_tag"
    }
  ]
}

Domain: Build

Includes events that are triggered when certain build-related events occur in Artifactory:

Event: uploaded

The Webhook is triggered when a new build is uploaded. You can select the build names or build patterns on which the Webhook will be applied.

Build was Uploaded
{
  "build_name":"sample_build_name",
  "build_number":"1",
  "build_started": "2020-06-18T14:40:49.869+0300"
 }
}

Event: deleted

The Webhook is triggered when a build is deleted. You can select the build names or build patterns on which the Webhook will be applied.

Build was Deleted
{
  "build_name":"sample_build_name",
  "build_number":"1",
  "build_started": "2020-06-18T14:40:49.869+0300"
 }
}

Event: promoted

The Webhook is triggered when a build is promoted. You can select the build names or build patterns on which the Webhook will be applied.

Build was Promoted
{
  "build_name":"sample_build_name",
  "build_number":"1",
  "build_started": "2020-06-18T14:40:49.869+0300"
 }
}

Domain: Release Bundle

Includes events that are triggered when certain Release Bundle events occur in Artifactory:

Event: created

The Webhook is triggered when a Release Bundle is created. You can select the Release Bundle names or patterns on which the Webhook will be applied.

Release Bundle was Created
{
  "domain": "release_bundle",
  "event_type": "created",
  "data": {
    "release_bundle_name": "sample_name",
    "release_bundle_size": 9800,
    "release_bundle_version": "1.0.0"
  },
  "jpd_origin": "https://dist-pipe2.jfrogdev.co/artifactory"
}

Event: signed

The Webhook is triggered when a Release Bundle is signed. You can select the Release Bundle names or patterns on which the Webhook will be applied.

Release Bundle was Signed
{
  "domain": "release_bundle",
  "event_type": "signed",
  "data": {
    "release_bundle_name": "sample_name",
    "release_bundle_size": 9800,
    "release_bundle_version": "1.0.0"
  },
  "jpd_origin": "https://dist-pipe2.jfrogdev.co/artifactory"
}

Event: deleted

The Webhook is triggered when a Release Bundle is deleted. You can select the Release Bundle names or patterns on which the Webhook will be applied.

Release Bundle was Deleted
{
  "domain": "release_bundle",
  "event_type": "deleted",
  "data": {
    "release_bundle_name": "sample_name",
    "release_bundle_size": 9800,
    "release_bundle_version": "1.0.0"
  },
  "jpd_origin": "https://dist-pipe2.jfrogdev.co/artifactory"
}

Domain: Distribution

Includes events that are triggered when a Release Bundle version is distributed to one or more Edge nodes.

Event: distribute_started

The Webhook is triggered when Release Bundle distribution has started. 

Distribution was Started
{
  “domain”: “distribution”,
  “event_type”: “distribute_started”,
  “data”: {
    “edge_node_info_list”: [
      {
        “edge_node_address”: “https://artifactory-edge2-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge2"
      },
      {
        “edge_node_address”: “https://artifactory-edge1-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge1"
      }
    ],
    “release_bundle_name”: “test”,
    “release_bundle_size”: 1037976,
    “release_bundle_version”: “1.0.0”,
    “status_message”: “CREATED”,
    “transaction_id”: 395969746957422600
  },
  “jpd_origin”: “https://ga-dev.jfrogdev.co/artifactory”
}
  

Event: distribute_completed

The Webhook is triggered when Release Bundle distribution has completed. 

Distribution was Completed
{
  “domain”: “distribution”,
  “event_type”: “distribute_completed”,
  “data”: {
    “edge_node_info_list”: [
      {
        “edge_node_address”: “https://artifactory-edge2-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge2"
      },
      {
        “edge_node_address”: “https://artifactory-edge1-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge1"
      }
    ],
    “release_bundle_name”: “test”,
    “release_bundle_size”: 1037976,
    “release_bundle_version”: “1.0.0”,
    “status_message”: “CREATED”,
    “transaction_id”: 395969746957422600
  },
  “jpd_origin”: “https://ga-dev.jfrogdev.co/artifactory”
}
  

Event: distribute_aborted

The Webhook is triggered when Release Bundle distribution has been aborted. 

Distribution was Aborted
{
  “domain”: “distribution”,
  “event_type”: “distribute_aborted”,
  “data”: {
    “edge_node_info_list”: [
      {
        “edge_node_address”: “https://artifactory-edge2-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge2"
      },
      {
        “edge_node_address”: “https://artifactory-edge1-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge1"
      }
    ],
    “release_bundle_name”: “test”,
    “release_bundle_size”: 1037976,
    “release_bundle_version”: “1.0.0”,
    “status_message”: “CREATED”,
    “transaction_id”: 395969746957422600
  },
  “jpd_origin”: “https://ga-dev.jfrogdev.co/artifactory”
}
  

Event: distribute_failed

The Webhook is triggered when Release Bundle distribution has failed. 

Distribution has Failed
{
  “domain”: “distribution”,
  “event_type”: “distribute_failed”,
  “data”: {
    “edge_node_info_list”: [
      {
        “edge_node_address”: “https://artifactory-edge2-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge2"
      },
      {
        “edge_node_address”: “https://artifactory-edge1-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge1"
      }
    ],
    “release_bundle_name”: “test”,
    “release_bundle_size”: 1037976,
    “release_bundle_version”: “1.0.0”,
    “status_message”: “CREATED”,
    “transaction_id”: 395969746957422600
  },
  “jpd_origin”: “https://ga-dev.jfrogdev.co/artifactory”
}
  

Event: deletion_started

The Webhook is triggered when a Release Bundle version deletion has started on one or more Edge nodes.

Deleting a Release Bundle was Started
{
  “domain”: “distribution”,
  “event_type”: “deletion_started”,
  “data”: {
    “edge_node_info_list”: [
      {
        “edge_node_address”: “https://artifactory-edge2-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge2"
      },
      {
        “edge_node_address”: “https://artifactory-edge1-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge1"
      }
    ],
    “release_bundle_name”: “test”,
    “release_bundle_size”: 1037976,
    “release_bundle_version”: “1.0.0”,
    “status_message”: “CREATED”,
    “transaction_id”: 395969746957422600
  },
  “jpd_origin”: “https://ga-dev.jfrogdev.co/artifactory”
}
  

Event: deletion_completed

The Webhook is triggered when a Release Bundle version deletion has completed from one or more Edge nodes.

Deleting a Release Bundle was Completed
{
  “domain”: “distribution”,
  “event_type”: “deletion_completed”,
  “data”: {
    “edge_node_info_list”: [
      {
        “edge_node_address”: “https://artifactory-edge2-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge2"
      },
      {
        “edge_node_address”: “https://artifactory-edge1-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge1"
      }
    ],
    “release_bundle_name”: “test”,
    “release_bundle_size”: 1037976,
    “release_bundle_version”: “1.0.0”,
    “status_message”: “CREATED”,
    “transaction_id”: 395969746957422600
  },
  “jpd_origin”: “https://ga-dev.jfrogdev.co/artifactory”
}
  

Event: deletion_failed

The Webhook is triggered when a Release Bundle version deletion has failed on one or more Edge nodes.

Deleting a Release Bundle has Failed
{
  “domain”: “distribution”,
  “event_type”: “deletion_failed”,
  “data”: {
    “edge_node_info_list”: [
      {
        “edge_node_address”: “https://artifactory-edge2-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge2"
      },
      {
        “edge_node_address”: “https://artifactory-edge1-dev.jfrogdev.co/artifactory”,
        “edge_node_name”: “artifactory-edge1"
      }
    ],
    “release_bundle_name”: “test”,
    “release_bundle_size”: 1037976,
    “release_bundle_version”: “1.0.0”,
    “status_message”: “CREATED”,
    “transaction_id”: 395969746957422600
  },
  “jpd_origin”: “https://ga-dev.jfrogdev.co/artifactory”
}
  

Domain: Artifactory Release Bundle

Includes events that are triggered when a Release Bundle status changes on Edge Nodes.

Requires Artifactory version 7.15.1 and above.


Event: received

The Webhook is triggered when a Release Bundle was received on an Edge Node.

Release Bundle was Received
{
  "domain": "artifactory_release_bundle",
  "event_type": "received",
  "data": {
    "release_bundle_name": "test",
    "release_bundle_version": "1.0.0",
    "status_message": "COMPLETED
  },
  "jpd_origin": "https://dist-pipe2.jfrogdev.co/artifactory"
}

Event: delete_started

The Webhook is triggered when a Release Bundle deletion from an Edge Node completed. 

Release Bundle Deletion Started
{
  "domain": "artifactory_release_bundle",
  "event_type": "delete_started",
  "data": {
    "release_bundle_name": "test",
    "release_bundle_version": "1.0.0",
    "status_message": "COMPLETED
  },
  "jpd_origin": "https://dist-pipe2.jfrogdev.co/artifactory"
}

Event: delete_completed

The Webhook is triggered when a Release Bundle deletion from an Edge Node completed. 

Release Bundle Deletion Completed
{
  "domain": "artifactory_release_bundle",
  "event_type": "delete_completed",
  "data": {
    "release_bundle_name": "test",
    "release_bundle_version": "1.0.0",
    "status_message": "COMPLETED
  },
  "jpd_origin": "https://dist-pipe2.jfrogdev.co/artifactory"
}

Event: delete_failed

The Webhook is triggered when a Release Bundle deletion from an Edge Node fails.

Release Bundle Deletion Failed
{
  "domain": "artifactory_release_bundle",
  "event_type": "delete_failed",
  "data": {
    "release_bundle_name": "test",
    "release_bundle_version": "1.0.0",
    "status_message": "COMPLETED
  },
  "jpd_origin": "https://dist-pipe2.jfrogdev.co/artifactory"
}

Webhooks REST API Support

To use REST API for creating, updating, and deleting Webhooks, see Webhooks APIs.

  • No labels
Copyright © 2021 JFrog Ltd.