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?