Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

list of repos and their dates on last access exported to xls

Varsha Mungale
Contributor
October 3, 2024

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

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 4, 2024

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

0 votes
vikram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2024

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events