Skip to main content

r2_operations_adaptive_groups

Analytics resource

This is a time-bounded analytics resource. Queries against it differ from typical CRUD resources in a few ways:

  • since and until are required. Both are RFC3339 timestamps and define the analytics window (e.g. since = '2026-05-28T00:00:00Z', until = '2026-05-29T00:00:00Z'). Queries without them will fail.
  • Row cap via limit. The limit parameter (default 100) bounds the response. Widen the time window or raise limit to return more rows.
  • Token scope. Cloudflare's analytics endpoints require an API token with Account -> Analytics -> Read permission, which is broader than typical zone-scoped tokens. A token without it will return empty results.

Creates, updates, deletes, gets or lists a r2_operations_adaptive_groups resource.

Overview

Namer2_operations_adaptive_groups
TypeResource
Idcloudflare.r2.r2_operations_adaptive_groups

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
bucket_namestringR2 bucket name.
action_statusstringOperation result (success / failure / etc.).
action_typestringR2 operation (GetObject / PutObject / ListObjects / etc.).
datetimestring (date-time)
eyeball_regionstringRegion of the requesting eyeball (WNAM / ENAM / WEU / etc.).
requestsintegerRequest count for the tuple.
response_bytesintegerTotal retrieved bytes.
response_object_sizeintegerTotal response object sizes.
response_status_codeintegerHTTP status returned.
storage_classstringStorage class (Standard / InfrequentAccess).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_tag, since, untillimitCloudflare R2 storage operation analytics for an account, grouped by bucket, operation type, region, and HTTP status. Per-tuple totals for request count, response bytes, and object size.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_tagstringCloudflare account ID (the 32-char hex tag).
sincestring (date-time)Lower bound (inclusive). RFC3339.
untilstring (date-time)Upper bound (exclusive). RFC3339.
limitintegerMaximum dimension-tuple rows per call.

SELECT examples

Cloudflare R2 storage operation analytics for an account, grouped by bucket, operation type, region, and HTTP status. Per-tuple totals for request count, response bytes, and object size.

SELECT
bucket_name,
action_status,
action_type,
datetime,
eyeball_region,
requests,
response_bytes,
response_object_size,
response_status_code,
storage_class
FROM cloudflare.r2.r2_operations_adaptive_groups
WHERE account_tag = '{{ account_tag }}' -- required
AND since = '{{ since }}' -- required
AND until = '{{ until }}' -- required
AND limit = '{{ limit }}'
;