Creating Webhooks in the JFrog Platform
To start creating Webhooks, do the following:
- Navigate to Administration Module | General | Webhooks.
- Click New Webhook.
Enter the details of the following fields:
Field Description 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 through the “X-JFrog-Event-Auth” HTTP header. This token can be used by the service that receives the event to authenticate the event emitter.
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:
urlStrictPolicy: true
. See Artifactory System YAML.- 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.
{ "domain": "artifact", "event_type": "deployed", "data": { "repo_key": "example-repo-local", "path": "pipeinfo7.json", "name": "pipeinfo7.json", "sha256": "8b6cd18345075ff248487fed24e87ff0acff1454e761cc0676f78fc898dff7a7", "size": 203 }, "subscription_key": "jfdev-agent", "source": "jfrog/jfrt@01fsmwgxevmmcr1ajmvhfw1j9s" }
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.
{ "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.
{ "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.
{ "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: cached
The Webhook is triggered for each artifact that is pulled from a new remote repository. Webhooks are generated when downloading remote artifacts, for example: npm install busybox
. If a webhook can be generated for push replication and the downloading of a remote artifact then it should also work for pull replication as well.
{ "repo_key":"sample_repo", "path":"sample_path_dir/sample_artifact", "name":"sample_artifact", "sha256":"ec1be623d148ed220f70f4f6125dc738b1d301a85b75e87c5b554fa3bb1b4141", "size":17848 }
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.
{ "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.
{ "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.
{ "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.
{ "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.
{ "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_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_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_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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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: Destination
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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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.
{ "destination": "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.