Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Overview

The node integrates with Bitbucket Data Center's API to manage webhooks associated with repositories. Specifically, the Update Webhook operation allows users to modify an existing webhook's configuration, such as its target URL, subscribed events, and activation status.

This node is beneficial in scenarios where automated workflows depend on repository events (e.g., pushes, pull requests). By updating webhooks dynamically, users can redirect notifications or adjust event triggers without manual intervention in Bitbucket's UI.

Practical example:
You have a CI/CD pipeline that listens to repository push events via a webhook. When migrating your pipeline to a new server, you can use this node to update the webhook URL to point to the new endpoint, ensuring uninterrupted automation.


Properties

Name Meaning
Authentication Method of authentication: "Personal Access Token" or "Basic Auth"
Webhook ID The unique numeric identifier of the webhook to update
Webhook URL The destination URL where webhook notifications will be sent
Events List of events triggering the webhook; options include:
- Repository Push
- Pull Request Opened
- Pull Request Merged
- Pull Request Declined
- Pull Request Comment Added
Active Boolean flag indicating whether the webhook is active (true) or inactive (false)

Output

The node outputs JSON data representing the updated webhook object returned by the Bitbucket Data Center API. This typically includes details such as:

  • Webhook ID
  • Name (auto-generated with prefix n8n-webhook- and timestamp)
  • URL
  • Subscribed events
  • Activation status
  • Other metadata related to the webhook

If the update operation fails, the node throws an error unless configured to continue on failure, in which case it outputs an error message object.

No binary data output is involved.


Dependencies

  • Requires access to a Bitbucket Data Center instance with API enabled.
  • Requires either a personal access token or basic authentication credentials for API access.
  • The node expects the Bitbucket server URL to be configured within the credentials.
  • No additional external dependencies beyond standard HTTP API calls.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication credentials will cause API request failures.
    • Providing a non-existent Webhook ID will result in a "not found" error from the API.
    • Incorrect URL format for the webhook URL may cause validation errors.
    • Insufficient permissions for the authenticated user to update webhooks.
  • Error messages:

    • "Bitbucket Data Center API request failed: <message>" indicates an issue with the API call, often due to network, authentication, or permission problems.
    • "The operation "update" is not supported for resource "webhook" would indicate a misconfiguration but should not occur if using the correct operation.
    • "Unknown error" is a fallback message when the error cannot be parsed.
  • Resolutions:

    • Verify and refresh authentication credentials.
    • Confirm the webhook ID exists and belongs to the specified project and repository.
    • Ensure the webhook URL is a valid HTTPS endpoint.
    • Check user permissions in Bitbucket for managing webhooks.

Links and References

Discussion