Forums

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

How to get the Bitbucket repo size by API

Deleted user December 15, 2020

Hi team,

I would like to know the size of the bitbucket repo by API or by any means. I've seen the comment of the Atlassian Team and I've attached the screenshot as well. 

But I'm not sure I get that. Could you pls elaborate on that?Screenshot 2020-12-15 185133.png

https://community.atlassian.com/t5/Bitbucket-questions/How-to-find-out-repository-size/qaq-p/631316  

 

Appreciate it if this can be discussed by having a call on google meet or anyother.

3 answers

2 accepted

2 votes
Answer accepted
Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 15, 2020

Here is the documentation: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D#get

Replace `workspace` and `repo_slug` with the details of your repository.

You can filter for just the size field:

https://api.bitbucket.org/2.0/repositories/atlassian/bbql/?fields=size

{"size": 1911650}

That is the size in bytes. It's about 1.8 MB.

That's a public repository: https://bitbucket.org/atlassian/bbql/src/master/

Deleted user December 17, 2020

Thank you So much @Tyler T 

1 vote
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 24, 2024

The Forge app described in the Access and Share Repository Size Data Across All Projects article adds a Workspace Settings Menu page with the size of all repositories in a workspace and a download option to export the information in a CSV file.

The app also adds the size information in the repository overview for each user to see.

I'm showing how the app works in this YouTube video.

You could try installing that!

Caterina

4 votes
manuelwallrapp
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 17, 2022

Is there a way to do the same in Bitbucket Server since it is another product an another Api

https://<bitbuckethost>/rest/api/1.0/projects/<yourproject>/repos/<yourrepo> 

doesn't give me the size in the details. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events