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 "Delete" operation for the "Repository" resource allows users to delete a repository from a specified project. This is useful in scenarios where repositories are no longer needed or need to be removed to clean up the project structure.

Practical examples include:

  • Automating cleanup of obsolete or test repositories.
  • Integrating repository lifecycle management into CI/CD pipelines.
  • Managing repositories programmatically as part of project maintenance tasks.

Properties

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

Output

The output JSON object for the delete repository operation contains a single field:

{
  "success": true
}

This indicates whether the deletion was successful. No additional data about the deleted repository is returned.

The node does not output binary data for this operation.

Dependencies

  • Requires access to a Bitbucket Data Center server.
  • Requires credentials configured in n8n for either Personal Access Token or Basic Authentication.
  • 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 are necessary to delete repositories.

Troubleshooting

  • Common issues:

    • Insufficient permissions to delete the repository.
    • Incorrect project key or repository slug causing "not found" errors.
    • Network connectivity issues to the Bitbucket server.
    • Authentication failures due to invalid or expired tokens.
  • Error messages:

    • "Bitbucket Data Center API request failed: <error message>" — Indicates an issue with the API call; check credentials, URL, and network.
    • "The operation "delete" is not supported for resource "repository" — Should not occur if using the correct operation; verify node configuration.
  • Resolutions:

    • Verify that the API credentials have delete permissions on the target repository.
    • Confirm the project key and repository slug values are correct and exist.
    • Ensure the Bitbucket server URL is reachable from the n8n instance.
    • Refresh or reconfigure authentication credentials if expired or invalid.

Links and References

Discussion