How do i get the list of all projects and repositories from Bitbucket on premises server
Hey @Shruti S G
We can get this info from Database and via rest API too.
Check out this doc on how to get the list from DB https://confluence.atlassian.com/bitbucketserverkb/how-to-obtain-a-list-of-all-projects-and-repositories-from-bitbucket-database-975027747.html
Regards,
Vishwas
Thank you Vishwas. Could you share me doc on how to get that through rest API
Couldn't get the exact query or API code to retrieve the data at once, you may have to start looking at the Bitbucket REST API document and build the code here https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html
In case if you have Scriptrunner plugin in bitbucket there is a ready made code available here to get list of projects along with all their repositories and bonus too(size of each repo) https://scriptrunner.adaptavist.com/5.4.5/bitbucket/ScriptConsole.html#_list_all_repository_sizes_by_project
Hope this helps !!
Thanks for the details. I will try this
It looks like you're new here. Sign in or register to get started.