we've got a large number of repos and I would like to get an overview of the sizes of each of these repos. Is there a way to get the repository size available under settings/repository details via REST API call?
Unfortunately that information isn't directly accessible via any Stash REST API:
It would be trivial to add this to a plugin - you just need to expose this method:
Let me know if you're interesting, I'm happy to show you how this could be done.
what I mean was that it would be nice it sizeRaw and size were part of the json parameters returned by /rest/api/1.0/projects/$prj/repos/$repo, but your solution works excellent. And I do appreciate the example source code, I'll have a look at it when time allows and see if I can pick up writing plugins.
might be my vault, my brain hurts from trying to juggle to many tasks at the same time.
My first thought was to look for repository sizes when doing for example: "curl https://stash.silabs.com/rest/api/1.0/projects/cad/repos/gitbm". I was hoping that sizeRaw and size would have been part of the json string returned.
Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs