@muriel.schmidt
To get available branches from a Bitbucket repository, you can use the Bitbucket API or command-line interface.
Using the Bitbucket API:
- Obtain your Bitbucket API credentials by creating an app password.
- Use an API client like cURL or an API development tool like Postman to send a GET request to the Bitbucket API endpoint for branches.
- The API endpoint for branches is usually in this format:
https://api.bitbucket.org/2.0/repositories/{username}/{repository_slug}/refs/branches
Using the Bitbucket command-line interface:
- Install the Bitbucket command-line interface (CLI) on your local machine.
- Run the following command to list all branches in a Bitbucket repository:
$ bitbucket branches list --repository
With these methods, you can easily get a list of all available branches in your Bitbucket repository.