I have a private repo on Bitbucket Cloud with 7 branches. A call to the API returns all but one. I have tried fiddling with pagsize and pagelength with no success. Are there any known problems or restrictions with this endpoint?
https://api.bitbucket.org/2.0/repositories/{myteam}/{repo}/refs/branches
Or is there an alternative endpoint I should be using?
Hello @markhamlin ,
Welcome to the Community.
The endpoint you refer to is the right one to list all branches of your repository.
Do you see all 7 branches in Bitbucket's UI, e.g. here:
https://bitbucket.org/<workspace>/<repository_slug>/branches/?status=all
If not, how did you count those 7 branches – maybe one of them is not pushed to Bitbucket and only exists on your local working copy?
If you believe there's an issue, please open a support case with us and point to the repository in question so that we can take a look.
Hope this helps.
Cheers,
Daniil
I was counting remotes under the origin section in Sourcetree. A look directly on the portal and a fresh clone both revealed the missing branch had been closed, so no missing branches after all, API working properly. Thanks for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.