As suggested in issue 12051, I have been attempting to use the undocumented v2.0 API /refs endpoint to fetch tags and branches from a repo that has a lot of them.
The branch and tag data returned by this endpoint looks fine, however the pagination of the results is not working properly. The "pagelen" field always appears to be returning a value of 10 regardless of the size of the "values" list (which itself seems to be correct), and also the "next" field is being returned even in cases where there is no additional branch/tag data remaining.
(In this case, calling the "next" URL returns a result that (correctly) has an empty "values" but yet still includes the "next" field. So I currently don't have any way to programmatically determine when the end of the result set has been reached.)