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!"
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.