Actions50
- Branch Actions
- Commit Actions
- Issue Actions
- Project Actions
- Pull Request Actions
- Repository Actions
- Tag Actions
- File Actions
- User Actions
- Webhook Actions
Overview
The Bitbucket Data Center node allows interaction with the Bitbucket Data Center API to manage various resources such as projects, repositories, pull requests, branches, commits, users, tags, files, and webhooks. Specifically, for the Branch resource with the Get All operation, this node fetches a list of all branches within a specified project repository.
This operation is useful when you want to retrieve branch information for automation workflows involving code management, continuous integration, or deployment pipelines. For example, you might use it to:
- List all branches in a repository to trigger builds on specific branches.
- Audit branch names and statuses for compliance or cleanup.
- Integrate branch data into dashboards or reports.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication: "Personal Access Token" or "Basic Auth". |
| Project | The key of the project containing the repository (required). |
| Repository | The slug of the repository within the project (required; implied from context). |
| Return All | Whether to return all branches or limit the number of results. |
| Limit | Maximum number of branches to return if not returning all (1 to 500). |
Note: Although the provided properties JSON does not explicitly include repositorySlug, the source code shows that the repository slug is required for branch operations.
Output
The output is a JSON array where each item represents a branch object retrieved from the Bitbucket Data Center API. Each branch object typically contains details such as branch name, latest commit, and metadata related to the branch.
If multiple branches are returned, they are flattened into a single array. The node does not output binary data for this operation.
Example output structure (simplified):
[
{
"id": "refs/heads/main",
"displayId": "main",
"type": "BRANCH",
"latestCommit": "abc123def456...",
"isDefault": true
},
{
"id": "refs/heads/feature-xyz",
"displayId": "feature-xyz",
"type": "BRANCH",
"latestCommit": "789ghi012jkl...",
"isDefault": false
}
]
Dependencies
- Requires access to a Bitbucket Data Center server URL.
- Requires credentials for authentication, either a personal access token or basic authentication.
- The node uses n8n's built-in HTTP request helper with authentication support.
- The user must configure appropriate credentials in n8n for the Bitbucket Data Center API.
Troubleshooting
- Missing or incorrect project key or repository slug: The node requires valid project and repository identifiers. Ensure these are correctly selected or entered.
- Authentication errors: Verify that the API token or basic auth credentials are correct and have sufficient permissions.
- API request failures: Network issues or incorrect server URLs can cause failures. Check connectivity and server address.
- Limit and pagination: If many branches exist, ensure "Return All" is enabled or set an appropriate limit to avoid incomplete results.
- Unsupported operations: Using an unsupported operation for the Branch resource will throw an error indicating the operation is not supported.
Common error message example:
Bitbucket Data Center API request failed: <error message>
Resolution: Check credentials, server URL, and network connectivity.
Links and References
- Bitbucket Data Center REST API Documentation
- Bitbucket Branches API
- n8n documentation on Creating Custom Nodes