I have close to 200 repos in the company's workspace. All the repos are private.Is it possible to get a list of repos and their date of last access and if possible the name of the creator. Can this reported be extracted to xls This is required to do some re-organization of the repos into different Projects
Hi @Varsha Mungale
Welcome to Atlassian Community
yes we can list them, for that you should have database access to query if you require from database, please refer below url knowledge document.
How to obtain a list of all projects and repositories from Bitbucket database | Bitbucket Data Center | Atlassian Documentation
below url where already this type of question is answered it might be useful
Solved: Can I list private repos via the API? I so, how? (atlassian.com)
BitBucket List All Repositories - using REST API | DevOps Junction (middlewareinventory.com)
Vikram P
Hi Varsha!
We have an API endpoint for listing repositories that belong to a workspace:
However, details like the date of last access or the creator of the repo are not available via the API or the UI.
There is a property named "updated_on" in the output for each repo, which indicates the date and time the repo was last updated (e.g. branch created, commits pushed, repository details changed from Repository settings).
You can get a partial response with the fields parameter, e.g. the following API call will return only the name of each repo and the last updated date:
curl -u username:app_password --request GET \--url 'https://api.bitbucket.org/2.0/repositories/workspace-id?fields=values.name,values.updated_on' \--header 'Accept: application/json'
where username, app_password, and workspace-id replace with your own values.
The API returns JSON data. I don't know if Excel supports importing data from a JSON file, this is something you can look into.
Kind regards,Theodora
It looks like you're new here. Sign in or register to get started.