I need to get all repositories from Bitbucket, and I am using the RepositoryService .findAll()
repoService.findAll(new PageRequestImpl(0, 10000)
But it is returning only 1000 repos while in fileSystem there are more than that and I have specified the limit for 10000.
Does this findAll ignores any repositories ?
How can I get all repositories?
Thanks,
Anil
You will have to look at how many pages the response returns and then iterate on that. Have a look at PageRequest.
Hi Mikael, Thanks for your reply.
I did use PageRequest, I used PageRequestImpl with below code snipped
repoService.findAll(new PageRequestImpl(0, 10000)
Constructs a new PageRequestImpl
for retrieving a page with limit
entries from the specified start
index.
Am I doing anything wrong here? Can you suggest path forward on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is a hard limit of 1000 by default on the page request, so unless you have changed that in the config file for bitbucket (forgot where it is) your 10000 is being ignored. For the scripts I created using the REST API I always check the pages returned to see if I have to do the call multiple times to get everything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.