Hitachi Content Platform​

 View Only

 Bucket size via API call

Torbjorn Migchelsen's profile image
Torbjorn Migchelsen posted 02-22-2023 04:45

In the GUI, "S3 Console", of the HCP for Cloud Scale the total size of a bucket is show (i.e. including all versions). Is there a way to obtain this information with an API call?

I know you can do this with an aws s3api call listing the content and adding it upp with jq but since the data is already there it seems like a roundabout way of getting it and can be rather time consuming if it is a large bucket.

Bernard Lam's profile image
Bernard Lam

You can get this via management api get chargeback report:
or Grafana:
sum by (bucket)(metadata_total_bytes_per_bucket{})