Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why does /2.0/repositories/{}/{}/refs/branches fail to return all branches

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?

 

1 answer

1 vote

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. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

477 views 5 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you