Size for Each project

shankara vijayendran
Contributor
September 19, 2023

Hello all 
Greetings of the day 
"I'd like to initiate a discussion on how to retrieve the total size of individual projects in Jira Cloud, beyond just calculating attachments size. My goal is to identify which projects are consuming the most Jira Cloud storage space. Any insights or methods to achieve this would be greatly appreciated. Thank you!"

1 answer

1 accepted

1 vote
Answer accepted
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2023

Hi @shankara vijayendran -

From reading this page: Track storage and move data across products, I don't believe Atlassian has any limits on storage except for attachments, so I'm curious as to why you would want to have this information. Are you trying to plan a migration to Data Center, and want to scope how big your database will need to be?

As far as concerns about disk space, there was a recent answer that reiterated this current policy:

What happens if I exceed my storage limit?

Storage limits are not currently enforced. If your Confluence or Jira products exceed their plan's storage limit, we won’t cancel your subscriptions or remove any data, as long as usage is in accordance with our acceptable use policy.

But as an academic exercise I was kind of interested in whether the API would be able to get the attachments size (I know you didn't want that, but the short answer to your question is that Atlassian does not provide information on database size, as far as I can tell.)

Anyways, it looks like this shell command that uses curl and jq ought to do the trick of getting the total of all attachments for project BUG:

curl -s --user --user "YOUREMAIL:YOURTOKEN" "https://YOURHOST.atlassian.net/rest/api/2/search?jql=project=BUG%20and%20not%20attachments%20is%20empty&fields=attachment" | jq  -r '[.issues[] | .fields.attachment[].size] | add'

Which gave me a total of 2531505, which I believe is in bytes. (This is my test project.)

Original source for that API call is from this article:

And oh, there's a KB article with a set of instructions on installing jq. Nice! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events