Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Overview

The node interacts with the Bitbucket Data Center API to manage repositories within specified projects. For the Repository - Get operation, it retrieves detailed information about a specific repository identified by its project key and repository slug.

This node is beneficial in automation workflows where you need to fetch repository metadata such as name, description, visibility, and other repository details from Bitbucket Data Center. For example, you might use it to:

  • Retrieve repository info before triggering deployment pipelines.
  • Audit repository settings across multiple projects.
  • Integrate repository data into reporting dashboards or issue tracking systems.

Properties

Name Meaning
Authentication Method of authentication to use: either "Personal Access Token" or "Basic Auth".
Project The project key that contains the repository.
Repository The slug identifier of the repository within the selected project.

Output

The output JSON contains the full repository object returned by the Bitbucket Data Center API for the specified project and repository slug. This typically includes fields such as:

  • slug: The repository slug.
  • name: The repository name.
  • description: Description of the repository.
  • public: Boolean indicating if the repository is public.
  • Other metadata related to repository configuration and links.

If the repository is found, the node outputs this data as a single JSON object. If multiple items were requested (not applicable for "get" operation), it would output an array of such objects.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Bitbucket Data Center instance with API enabled.
  • Requires credentials configured in n8n for authentication:
    • Either a personal access token credential or basic authentication credential.
  • The node uses the Bitbucket Data Center REST API endpoints under /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}.

Troubleshooting

  • Common issues:

    • Invalid or missing project key or repository slug will cause the API call to fail.
    • Incorrect authentication credentials or insufficient permissions will result in authorization errors.
    • Network connectivity issues to the Bitbucket server can cause request failures.
  • Error messages:

    • "Bitbucket Data Center API request failed: ..." indicates an HTTP or network error during the API call.
    • "The operation "get" is not supported for resource "repository"" would indicate a misconfiguration but should not occur for this standard operation.
  • Resolutions:

    • Verify that the project key and repository slug are correct and exist in your Bitbucket instance.
    • Ensure the API credentials have sufficient permissions to read repository data.
    • Check network access and URL correctness for the Bitbucket server.

Links and References

Discussion