What is the name of the domain?
https://api.cloudflare.com/client/v4/graphql
What is the issue you’re encountering
There is a discrepancy between the analytics data I get from the GraphQL API and the analytics data shown in the R2 interface.
What steps have you taken to resolve the issue?
I examined analytics data for a specific date range (January 19, 2025 00:00 UTC - January 21, 2025 23:59 UTC) from the R2 bucket interface.
For the same date range, I sent an r2OperationsAdaptiveGroups query using the Cloudflare GraphQL API (https://api.cloudflare.com/client/v4/GraphQL).
When I compared the data from both sources, I found inconsistencies:
GraphQL API: Class B Requests = 120
R2 Interface: Class B Operations = 108
GraphQL API: Class A Requests = 5,392
R2 Interface: Class A Operations = 5.38k
I observed similar inconsistencies in the “R2 Data Storage” data - the results of the billing and analytics query show different values.
What are the steps to reproduce the issue?
- View R2 bucket metrics:
- Login to Cloudflare dashboard
- Navigate to https://dash.cloudflare.com/[ACCOUNT_ID]/r2/default/buckets/[BUCKET_NAME]/metrics
- Set the date range (Ex: “January 19, 2025 00:00 UTC - January 21, 2025 23:59 UTC”)
- Note the number of Class A and Class B operations
- Send a GraphQL API query:
Use the following GraphQL query:
query GetOperationMetrics($accountId: String!, $startDate: DateTime!, $endDate: DateTime!) {
viewer {
accounts(filter: { accountTag: $accountId }) {
r2OperationsAdaptiveGroups(
filter: {
datetime_geq: $startDate
datetime_leq: $endDate
}
limit: 10000
orderBy: [actionType_ASC]
) {
sum {
requests
}
dimensions {
actionType
bucketName
}
}
}
}
}
Variables:
{
"accountId": "[ACCOUNT_ID]",
"startDate": "2025-01-19T00:00:00Z",
"endDate": "2025-01-21T23:59:59Z"
}
- Compare the results:
- Put the Class A and Class B operation counts from the two sources side by side
- Confirm that different values are seen for the same date range
By following these steps, inconsistencies between the R2 interface and the GraphQL API can be easily observed.
What feature, service or problem is this related to?
Other / I don’t know