How to find out the repository detail like date of creation and size

Bhagwan Basnet (Aakash) May 17, 2017

We are using Bitbucket 4.10.1.since last week its seen that bitbucket is aking up lots of huge space, we have many many repository and its difficult to look at individual repository size from Setting tab repository.so basically I am wondering if there is any way to find out the Repo size with date of creation as well. basically how to watch the changeset on Bitbucket repo?

Thankyou

2 answers

1 vote
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2017

Hi! You can find the size in the Settings page of the repository. As for the creation date you can not find it directly, but you can look for the date of the first commit, for example. You can see it by clicking on the Commit menu in the left hand side. 

Hope that helps,

Ana

Arsen December 9, 2018

Hello Ana,

 

I'd like to ask a similar question from another perspective. Let's say I am storing my repositories on bitbucket cloud. And made several updates on all my code files. Some could be committed to bitbucket cloud at a very late time after their creation dates. As you say I can see their commit dates but what if I want to see their actual create dates, I mean the code files' actual create dates. If I request bitbucket provides it or isn't there any chance to get the original file creation dates?

 

Thanks

Like MMmatt likes this
MMmatt July 25, 2019

I'm looking for something similar. Is there some sort of audit log somewhere? maybe that also shows who pulled the code when... this is pretty important for private repos...

Like Lea Lytvynenko likes this
Bhagwan Basnet (Aakash) July 25, 2019

Hello Ana,

Thanks for the reply.as you said we can find it on the setting tab of repo, thats right we can get some details of repo over there but since the organization has many hundreds of repos, going through individual repo to find size is too much boring and time consuming so I was wondering if we have something like in command line to which can list all the repos with with its detail like 'ls' in linux.

-Thanks

Like # people like this
Rabbit December 13, 2019

I have this same/simalr question. How can I find the total size of all my bitbucket repos together in a given team?

 

Any ideas? I'm looking through the API docs, but I'd rather not re-invent the wheel if I don't have to.

Bradley MacDonald November 4, 2020

Using the API you can retrieve a lot of information, but sadly not the size.

Running this you can get all of the information about a repo.

curl --request GET --user $username:$password https://api.bitbucket.org/2.0/repositories/$workspace/$repoSlug | jq '.[]

Replace the variables with your information.

 

For more limited information such as just the repo name and created date you can try this.

curl --request GET --user $username:$password https://api.bitbucket.org/2.0/repositories/$workspace/$repoSlug?fields=name,created_on | jq '.[]'
0 votes
Zoran Simic December 17, 2019

I'm looking for this same info: repo creation date and size, via REST query.

Any chance this will be provided in an upcoming version?

This is some basic info that should be available

Bhagwan Basnet (Aakash) December 17, 2019

It would be nice if you provide that REST query so that I can try with mine.

Zoran Simic December 17, 2019

Meant to post this as a reply to prev thread, mistakenly posted as answer.

I'd love it if "created" and "size" was part of this REST query: https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#idm8287366304 would be very helpful, to for example find and auto-clean empty repos (lots of ppl create an empty repo, then forget about it, and it stays empty forever)

Like Peter Schübel likes this
Zoran Simic December 17, 2019

Note that currently you can kind-of get the creation date by going to the audit log of the repo... (`/plugins/servlet/audit-log/PROJECT/slug` IIUC), the earliest recorded action there is `RepositoryCreatedEvent`

But I don't see a programmatic way of doing that...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events