Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Overview

This node interacts with the Bitbucket Data Center API to manage repositories and other related resources. Specifically, for the Repository - Delete operation, it deletes a specified repository within a given project on a Bitbucket Data Center server.

This operation is useful when you want to programmatically remove repositories that are no longer needed, helping maintain a clean and organized version control environment. For example, you might automate cleanup of test or temporary repositories after CI/CD pipelines complete.

Properties

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

Output

The output JSON contains a single object indicating success:

{
  "success": true
}

This confirms that the repository was deleted successfully. If an error occurs, the node will throw an error message describing the failure.

No binary data is output by this operation.

Dependencies

  • Requires access to a Bitbucket Data Center instance.
  • Requires credentials configured in n8n for either Personal Access Token or Basic Authentication.
  • The node uses the Bitbucket Data Center REST API endpoint /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug} with HTTP DELETE method.

Troubleshooting

  • Common issues:

    • Incorrect project key or repository slug: Ensure both are valid and exist in the Bitbucket Data Center instance.
    • Insufficient permissions: The API user must have rights to delete repositories in the specified project.
    • Network or server errors: Verify connectivity and that the Bitbucket server URL is correct.
  • Error messages:

    • "Bitbucket Data Center API request failed: ..." indicates an issue with the API call, such as authentication failure or resource not found.
    • "The operation "delete" is not supported for resource "repository" would indicate a misconfiguration but should not occur here since delete is supported.

To resolve errors, verify credentials, project and repository identifiers, and ensure the API user has appropriate permissions.

Links and References

Discussion