Actions50
- Branch Actions
- Commit Actions
- Issue Actions
- Project Actions
- Pull Request Actions
- Repository Actions
- Tag Actions
- File Actions
- User Actions
- Webhook Actions
Overview
This node interacts with the Bitbucket Data Center API to perform various file-related operations within a repository. Specifically, the "Get All" operation for the "File" resource lists files in a specified directory path of a repository project. This is useful when you want to retrieve an overview of all files contained in a particular folder or the root directory of a repository.
Common scenarios include:
- Automating audits or reports on repository contents.
- Triggering workflows based on the presence or changes of files in certain directories.
- Integrating repository file listings into other systems or dashboards.
For example, you could use this node to list all files under the src/ directory of a project repository to verify source code structure or to feed the list into another process that analyzes or processes these files.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method used to authenticate API requests. Options: "Personal Access Token", "Basic Auth" |
| Directory Path | The directory path inside the repository to list files from. Leave empty to list root files. |
| Return All | Whether to return all files found or limit the number of results returned. |
| Limit | Maximum number of files to return if "Return All" is false. Range: 1 to 500. |
Output
The output is a JSON array where each item represents a file or directory entry retrieved from the specified directory path in the repository. Each item contains metadata about the file such as its name, type (file or directory), and possibly other attributes provided by the Bitbucket Data Center API.
No binary data output is produced by this operation; it strictly returns structured JSON data describing the files.
Dependencies
- Requires access to a Bitbucket Data Center instance.
- Requires authentication credentials configured in n8n, either via a personal access token or basic authentication.
- The node uses the Bitbucket Data Center REST API endpoints to fetch file listings.
- The user must specify the project key and repository slug elsewhere in the node configuration (not shown in the provided properties but required for API calls).
Troubleshooting
- Authentication errors: Ensure that the selected authentication method matches the credentials provided and that the credentials have sufficient permissions to access the repository.
- Empty results: Verify that the directory path is correct and exists in the repository. An empty string lists the root directory.
- API request failures: Network issues or incorrect server URLs can cause failures. Check connectivity and the correctness of the Bitbucket server URL.
- Limit exceeded: If too many files exist and "Return All" is false, only up to the specified limit will be returned. Increase the limit or enable "Return All" to get complete results.
- Missing project or repository parameters: Although not listed in the provided properties snippet, the node requires project and repository identifiers to function correctly. Make sure these are set properly in the node.