Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • gitlab_main_application_settings_and_static
  • rails-next protected
  • ruby-next protected
  • 469603-add-detail-to-other-label
  • mrincon-fix-no-unused-properties
  • jennli-ensure-qa-suite-status-env-file-exists
  • jnnkl-duo-chat-locale
  • dg-fix-issues
  • gkatz_add_security_findings_severity_override_audit
  • 482499-cronjob-to-evaluate-compliance-controls
  • pl-rubocop-internal-affairs
  • 470699-requirement-entries
  • 470699-present-data
  • 470699-model-validations
  • 523685-add-severity-override-to-pipeline-page
  • ysiev-vulnerability-namespace-statistics-update-service
  • master-i18n
  • selhorn-ci-paths
  • qa-knapsack-master-report-update
  • v17.7.6-ee protected
  • v17.8.4-ee protected
  • v17.9.1-ee protected
  • v17.8.3-ee protected
  • v17.7.5-ee protected
  • v17.9.0-ee protected
  • v17.9.0-rc42-ee protected
  • v17.6.5-ee protected
  • v17.7.4-ee protected
  • v17.8.2-ee protected
  • v17.6.4-ee protected
  • v17.7.3-ee protected
  • v17.8.1-ee protected
  • v17.8.0-ee protected
  • v17.7.2-ee protected
  • v17.8.0-rc42-ee protected
  • v17.5.5-ee protected
  • v17.6.3-ee protected
  • v17.7.1-ee protected
  • v17.7.0-ee protected
40 results

web_hooks.md

stage: Systems
group: Distribution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
title: Webhook administration Rake tasks

{{< details >}}

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab Self-Managed

{{< /details >}}

GitLab provides Rake tasks for webhooks management.

Requests to the local network by webhooks can be allowed or blocked by an administrator.

Add a webhook to all projects

To add a webhook to all projects, run:

# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook"

# source installations
bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" RAILS_ENV=production

Add a webhook to projects in a namespace

To add a webhook to all projects in a specific namespace, run:

# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace>

# source installations
bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=production

Remove a webhook from projects

To remove a webhook from all projects, run:

# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook"

# source installations
bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" RAILS_ENV=production

Remove a webhook from projects in a namespace

To remove a webhook from projects in a specific namespace, run:

# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace>

# source installations
bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=production

List all webhooks

To list all webhooks, run:

# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list

# source installations
bundle exec rake gitlab:web_hook:list RAILS_ENV=production

List webhooks for projects in a namespace

To list all webhook for projects in a specified namespace, run:

# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list NAMESPACE=<namespace>

# source installations
bundle exec rake gitlab:web_hook:list NAMESPACE=<namespace> RAILS_ENV=production