How can I get page 2 with a pagelen=100 when querying a list of repos with bitbucket API 2.0?

I have run into a cumbersome limitation of the bitbucket API 2.0 - I am hoping there is a way to make it more usable.

When one wants to retrieve a list of repositories from the bitbucket API 2.0, this url can be used:

https://api.bitbucket.org/2.0/repositories/{teamname}

This returns the first 10 repos in the list. To access the next 10, one simply needs to add a page parameter:

https://api.bitbucket.org/2.0/repositories/{teamname}?page=2

This returns the next 10. One can also adjust the number of results returned using the pagelen parameter, like so:

https://api.bitbucket.org/2.0/repositories/{teamname}?pagelen=100

The maximum number can vary per account, but 100 is the maximum any team is able to request with each API call. The cumbersome part is that I cannot find a way to get page 2 with a pagelength of 100. I have tried variations on the following:

https://api.bitbucket.org/2.0/repositories/{teamname}?pagelen=100&page=2
https://api.bitbucket.org/2.0/repositories/{teamname}?page=2&pagelen=100

I've also tried using parameters such as limit or size to no avail. Is the behavior I seek even possible? Thank you, in advance.

1 answer

Guys, you need to fix this. I can't list more than 25 branches in a repository with the v2 API, even on Bitbucket Server? C'mon now. This is a duplicate of: https://community.atlassian.com/t5/Answers-Developer-Questions/How-can-I-set-the-page-size-of-branches-on-V2-0/qaq-p/535608

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

261 views 3 8
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you