https://discord.cloudflare.com logo
Title
u

Unsmart | Tech debt

05/25/2023, 4:15 PM
Not sure if the bill has it split out but the GQL API lets you get this info:
gql
query {
  viewer {
    accounts(filter: { accountTag: "<your account id>" }) {

      r2OperationsAdaptiveGroups(
        filter: {
          date_geq: "2023-04-01",
          date_leq: "2023-04-30"
        },
        limit: 10000
      ) {
        dimensions {
          bucketName
          actionType
        }
        sum {
          requests
        }
      }

      r2StorageAdaptiveGroups(
        filter: {
          date_geq: "2023-04-01",
          date_leq: "2023-04-30"
        },
        limit: 10000
      ) {
        dimensions {
          bucketName
          date
        }
        max {
          metadataSize
          payloadSize
        }
      }

    }
  }
}