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.
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot