# Webhooks

Webhooks are currently incubating. There may be breaking API changes between releases!

You can configure Rundeck to receive webhook events from external system and to run a job based on those actions. Webhook events are handled by Webhook Event Rundeck plugins, so you can write your own handling code if necessary.

# Enable the feature

# WAR/Deb/RPM

To enable the use of webhooks for your Rundeck server add the following configuration property to your rundeck-config.properties or equivalent.

rundeck.feature.webhooks.enabled=true

# Docker

Set the following environment variable:

RUNDECK_FEATURE_WEBHOOKS_ENABLED=true

# Webhook Administration

Once enabled, the ability to configure webhooks will be added to the project sidebar. Click on Webhooks to go to the webhook administration page where you can add, configure, and remove webhooks for your project.

Webhook Administration
Webhook Administration

You can also manage webhooks using the Webhook API or using the rd cli tool.

# Add a webhook

Click the Add button to add a new webhook.

Fill out the information in the form and select a Webhook event handler:

Click Save.

Once you have saved the webhook you will see a Post Url field which represents the url you can copy to your external system as the webhook endpoint.

When a system posts to the url it will be authenticated as the user you specify in the Webhook User field with the roles specified by Webhook Roles.

# Updating a webhook

Click on the webhook row in the Webhooks list. The entry will be highlighted and you may update the plugin configuration or the webhook details.

You cannot change the user associated with the webhook. If you need to update the user you will need to create a new webhook with that user.

# Delete a webhook

Click on the webhook as if to edit it. In the detail view at the bottom right there is a delete webhook button. Click the button and the webhook will be deleted.

# Logging

You can see events and log messages generated by the webhook activity in the $RD_LOGS_DIR/rundeck.webhooks.log file.

Default log4j configuration

log4j.logger.org.rundeck.webhook.events=INFO,webhook
log4j.additivity.org.rundeck.webhook.events=false

log4j.appender.webhook=org.apache.log4j.DailyRollingFileAppender
log4j.appender.webhook.file=${rundeck.log.dir}${file.separator}rundeck.webhook.log
log4j.appender.webhook.append=true
log4j.appender.webhook.layout=org.apache.log4j.PatternLayout
log4j.appender.webhook.layout.ConversionPattern=[%d{ISO8601}] %-5p %c{2} - %m%n