Using pagination for /2.0/repositories

We are maintaining a Bitbucket app. We have customer complaints that we are not showing all repositories. It seems this is a bug in the Bitbucket API.

The pagination seems broken. The request

https://api.bitbucket.org/2.0/repositories?page=1&pagelen=10&role=owner

returns the same result than

https://api.bitbucket.org/2.0/repositories?page=2&pagelen=10&role=owner

In fact, changing the number of pages in the request parameter does not seem to have any effect.

There are the results from an impacted customer:

Page 1

$curl -H "Authorization: JWT <jwt>" 'https://api.bitbucket.org/2.0/repositories?page=1&pagelen=10&role=owner' | jq -r ".values[].slug"

project1
project2

Page 2

$ curl -H "Authorization: JWT <jwt>" 'https://api.bitbucket.org/2.0/repositories?page=2&pagelen=10&role=owner' | jq -r ".values[].slug"

project1
project2

The correct behavior should be to have a different list of values for each page.

Am I doing anything wrong?

Umm, maybe I’m missing something, but if the customer has only a total of 2 repositories, those 2 repositories would be wholly within the first page of 10 results, with nothing remaining.

What are you expecting to find on the second page? There would only be something to return on the second page if the client had 11 or more repositories.

If you query:

https://api.bitbucket.org/2.0/repositories?page=3&pagelen=10&role=owner

…do you also get the exact same two repositories in the response?