Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Overview

This node integrates with Bitbucket Data Center to manage webhooks for repositories within projects. Specifically, the "Webhook - Create" operation allows users to create a new webhook on a specified repository. Webhooks are HTTP callbacks triggered by specific events in the repository, such as pushes or pull request activities. This node is beneficial for automating workflows that depend on repository events, like triggering CI/CD pipelines, notifying external systems, or synchronizing data.

For example, you can use this node to automatically notify an external deployment system whenever code is pushed to a repository or when a pull request is merged.

Properties

Name Meaning
Authentication Method of authentication: either "Personal Access Token" or "Basic Auth".
Webhook URL The URL where webhook notifications will be sent.
Events The repository events that trigger the webhook. Options include:
- Repository Push (repo:refs_changed)
- Pull Request Opened (pr:opened)
- Pull Request Merged (pr:merged)
- Pull Request Declined (pr:declined)
- Pull Request Comment Added (pr:comment:added)
Active Boolean flag indicating whether the webhook is active immediately after creation.

Output

The output JSON contains the response from the Bitbucket Data Center API representing the created webhook object. This typically includes details such as the webhook ID, name, URL, subscribed events, and its active status.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Bitbucket Data Center instance.
  • Requires credentials for authentication, either via a personal access token or basic authentication.
  • The node expects the server URL to be configured in the credentials.
  • Network connectivity to the Bitbucket Data Center API endpoint is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing authentication credentials will cause API request failures.
    • Incorrect project key or repository slug parameters will result in errors indicating resource not found.
    • Providing an invalid webhook URL or unsupported event types may cause the API to reject the request.
  • Error messages:

    • "Bitbucket Data Center API request failed: ..." indicates an issue with the API call, often due to authentication or parameter errors.
    • "The operation "create" is not supported for resource "webhook" would indicate a misconfiguration or unsupported operation (unlikely here since "create" is supported).
  • Resolutions:

    • Verify that the API credentials are correct and have sufficient permissions.
    • Ensure the project key and repository slug correspond to existing resources.
    • Confirm the webhook URL is reachable and correctly formatted.
    • Select valid event triggers supported by Bitbucket Data Center.

Links and References

Discussion