A machine-readable guide to this site for AI agents and language models is available at/llms.txt(https://dev.acquia.com/llms.txt on the production site).
The Webhooks feature enables real-time synchronization between Acquia DAM (Widen) assets and Drupal media entities. The feature sends immediate notifications to your Drupal application when assets are updated, deleted, or released. This process keeps content synchronized without waiting for cron to run.
In your Drupal application:
drush en acquia_dam_webhooksSite administrators can use Drush commands to manage webhook registrations, automate deployments, and test connectivity.
Register webhook configurations with Acquia DAM (Widen) for selected event types. The command uses a find-and-claim strategy that reuses existing webhook configurations before it creates new ones. This strategy helps prevent the shared DAM account from reaching the 10-configuration limit.
Command syntax:
drush acquia-dam:webhook-register
Options:
--force: Registers the webhook again even when a webhook ID is already stored for the event type.
--essential: Registers only the three essential event types: asset_deleted, asset_metadata_value_updated, and asset_version_added.
--all: Registers all event types: asset_deleted, asset_expiration_date_updated, asset_metadata_value_updated, asset_release_date_updated, asset_version_added, and asset_created.
--type: Specifies a comma-separated list of event types to register. This option overrides the default configuration. For example, --type=asset_deleted,asset_version_added.
Examples:
drush acquia-dam:webhook-register --essential
drush acquia-dam:webhook-register --force
drush acquia-dam:webhook-register --type=asset_deleted,asset_version_addedReconcile the webhook IDs stored in Drupal with the webhook registrations in Acquia DAM (Widen). If a stored webhook is missing or stale in Acquia DAM, Drupal registers it again.
Run this command periodically or after a suspected webhook issue. For example, run it after a webhook is manually deleted in the Acquia DAM (Widen) user interface.
Command syntax:
drush acquia-dam:webhook-syncFor each configured event type, the command reports one of the following statuses:
Send a ping request to every registered webhook configuration. Use this command to verify that Acquia DAM can reach your Drupal application through the delivery URL.
Run this command after a domain change, firewall update, or CDN deployment.
Command syntax:
drush acquia-dam:webhook-ping
Display the current webhook registration status without making an API call to Acquia DAM. This command provides a read-only view of the webhook data stored locally.
The command displays the delivery URL registered for your site, the webhook configuration ID for each event type, and the registration status.
Command syntax:
drush acquia-dam:webhook-statusThe command reports one of the following statuses:
Remove all registered webhook configurations from Acquia DAM. The command also clears the stored webhook IDs and secrets from Drupal state.
Run this command before you decommission a site or reset the webhook configuration.
Command syntax:
drush acquia-dam:webhook-deregister
Run this command when you need to remove registrations from an environment before copying its database to another environment.
When you update your Acquia DAM credentials in the main Acquia DAM configuration form, the Webhooks submodule automatically completes the following actions:
No manual action is required.
When Enable webhook management is selected, cron performs a registration health check at the configured frequency. The default frequency is once per day.
The health check reconciles the webhook IDs stored locally with the configurations registered in Acquia DAM. Drupal registers any missing webhook configurations again.
Disable or uninstall the Acquia DAM Webhooks submodule to automatically deregister all webhook configurations from Acquia DAM. This action also removes the stored registration IDs and secrets from your Drupal application.
When you copy a database from one environment to another, the source environment’s webhook registration IDs are copied to the target environment.
For example, when you copy the production database to staging, the staging environment receives the production webhook registration IDs. Run the following command on the target environment after copying the database:
drush acquia-dam:webhook-register --forceThis command replaces the copied registration IDs with registrations that use the target environment’s delivery URL.
Acquia DAM (Widen) supports webhook event types that notify your Drupal application when assets change.
The three essential events directly affect content that already exists in Drupal. Drupal processes these events synchronously within the HTTP request.
The two optional date events are also processed synchronously when enabled. When these events are disabled, the parent module applies the corresponding changes through cron polling.
The optional asset_created event is processed through the background queue.
Acquia DAM (Widen) sends this event when an asset is permanently deleted.
The Drupal application immediately unpublishes every media entity that references the deleted asset. Each unpublished entity receives a new revision with an automatic log message that records the reason for unpublishing.
Acquia DAM (Widen) sends this event when one or more metadata fields on an asset change.
The Drupal application immediately updates each media entity that references the asset and synchronizes the mapped metadata fields.
The update uses the same logic as the cron-based synchronization path. This provides consistent results regardless of which process handles the change.
Acquia DAM (Widen) sends this event when a new file version is uploaded to an existing asset.
The Drupal application immediately updates each media entity that references the asset to use the latest version.
File downloads are refreshed when the Download and sync assets option is enabled for the relevant media type.
Acquia DAM (Widen) sends this event when the expiration date of an asset changes.
The Drupal application immediately resynchronizes each media entity that references the asset. If the asset expires, Drupal unpublishes the related media.
When this event is disabled, the parent module applies expiration changes through cron polling.
Acquia DAM (Widen) sends this event when the release date of an asset changes.
The Drupal application immediately resynchronizes each media entity that references the asset. If the asset expires, Drupal unpublishes the related media. If the release date is in the future, Drupal unpublishes the entity.
When this event is disabled, the parent module applies release date changes through cron polling.
Acquia DAM (Widen) sends this event when a new asset is uploaded for the first time.
Because this event is triggered for every new upload in the Acquia DAM account, it requires explicit opt-in and configuration. The configuration determines which assets automatically create Drupal media entities.
Prioritize the Acquia DAM Bulk Asset Import feature over the asset_created webhook event when importing multiple assets.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.