Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Actions29

Overview

This node interacts with the Bitbucket Data Center API to manage repositories within projects. Specifically, the Update Repository operation allows users to modify repository details such as its name, description, and visibility (public or private). This is useful for automating repository management tasks like renaming repositories, updating descriptions to reflect new project goals, or changing access levels without manually using the Bitbucket UI.

Practical examples:

  • Automatically update repository descriptions to include deployment status or version info after a CI/CD pipeline run.
  • Change repository visibility from private to public when releasing an open-source project.
  • Rename repositories programmatically during project restructuring.

Properties

Name Meaning
Authentication Method of authentication to use: "Personal Access Token" or "Basic Auth".
Project The key of the project that contains the repository to update.
Repository The slug identifier of the repository to update within the selected project.
Description New description text for the repository.
Repository Name New name for the repository.
Public Boolean flag indicating whether the repository should be public (true) or private (false).

Output

The output is a JSON object representing the updated repository resource as returned by the Bitbucket Data Center API. It typically includes fields such as repository ID, name, slug, description, public/private status, project information, and other metadata related to the repository.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Bitbucket Data Center instance.
  • Requires either a Personal Access Token or Basic Authentication credentials configured in n8n.
  • The node uses the Bitbucket Data Center REST API endpoints under /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}.
  • Proper permissions on the Bitbucket server to update repository settings are necessary.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication credentials will cause API request failures.
    • Incorrect project key or repository slug will result in "not found" errors.
    • Insufficient permissions to update repository details will cause authorization errors.
    • Providing invalid values for properties (e.g., empty repository name) may cause validation errors.
  • Error messages:

    • "Bitbucket Data Center API request failed: <message>" indicates an issue communicating with the API; check credentials and network connectivity.
    • "The operation "update" is not supported for resource "repository" would indicate a misconfiguration but should not occur here since update is supported.
    • If the node throws errors about missing required parameters, ensure all required fields (Project, Repository, Repository Name) are set.
  • Resolution tips:

    • Verify credentials and re-authenticate if needed.
    • Double-check project keys and repository slugs for typos.
    • Confirm user permissions on Bitbucket server.
    • Ensure all required input properties are provided.

Links and References

Discussion