I’d like to get the current size of an R2 bucket and how many class A and class B have been performed through the API, for reporting purposes.
I only found how to list buckets, but I can’t see how to get metrics data.
The info is available in the console though, so it should lay somewhere
I’m looking for the same information. Your answer doesn’t provide information about metrics of Class A & B operations, but the overall usage of storage of the bucket.
@Cloudflare team: Is there an API, or another way, we can read metrics programatically for R2 buckets, ideally with parameters such as report interval, aggregation period & function.
My team wants to use this service as alternative to a different CDN from a public cloud provider, and visibility is a requirement to properly test Cloudflare’s solution, which looks very promising on paper.
There seems to be a website analytics page at https://dash.cloudflare.com/<account_id>/<website_domain>/analytics/traffic
that will show traffic stats, but seems this is at domain level and don’t see drill-in options to look at analytics per subdomain or configure what data are you looking at (average, sums, aggregation period etc)
How are the api tokens used here generated? I didn’t see the API token corresponding to R2 when I created it. Can you tell me how to generate this API token?