Actions29
Overview
This node interacts with the Bitbucket Data Center API to manage repositories within projects. Specifically, the "Repository - Get All" operation retrieves a list of repositories for a specified project. It supports fetching either all repositories or a limited number based on user input.
Common scenarios where this node is beneficial include:
- Automating repository inventory tasks by listing all repositories in a project.
- Integrating repository data into workflows for reporting or auditing.
- Feeding repository lists into subsequent automation steps like branch creation or pull request management.
For example, a user can configure this node to fetch all repositories under a project "PROJ1" and then use that data to trigger notifications or further processing.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method to authenticate API requests. Options: Personal Access Token, Basic Auth |
| Project | The project key to specify which project's repositories to retrieve |
| Return All | Whether to return all repositories or limit the number of results |
| Limit | Maximum number of repositories to return if not returning all (minimum 1, maximum 500) |
Output
The output is a JSON array where each element represents a repository object retrieved from the Bitbucket Data Center API. Each repository object typically includes details such as repository slug, name, description, visibility (public/private), and other metadata provided by the API.
No binary data is returned by this operation.
Example output snippet (simplified):
[
{
"slug": "my-repo",
"name": "My Repository",
"description": "Repository description",
"public": false,
...
},
{
"slug": "another-repo",
"name": "Another Repository",
"description": "Another description",
"public": true,
...
}
]
Dependencies
- Requires access to a Bitbucket Data Center instance with appropriate API access.
- Needs an API authentication credential configured in n8n, either via a personal access token or basic authentication.
- The node uses the Bitbucket Data Center REST API endpoints under
/rest/api/1.0/projects/{projectKey}/repos.
Troubleshooting
- Authentication errors: Ensure the API credentials are valid and have sufficient permissions to read repositories in the specified project.
- Project key issues: If no repositories are returned, verify that the project key is correct and that the project contains repositories.
- API request failures: Network issues or incorrect server URLs can cause request failures. Check the server URL configuration in credentials.
- Limit parameter misuse: Setting a limit outside the allowed range (1-500) may cause errors; ensure the limit is within bounds.
- Empty results: If "Return All" is false and limit is set too low, you might get fewer repositories than expected.
Error messages from the node will generally indicate API request failures with messages like:
Bitbucket Data Center API request failed: <error message>
Resolving these usually involves checking credentials, network connectivity, and API endpoint correctness.