- Print
- DarkLight
Use Partner API Reports
- Print
- DarkLight
Usage Reports provide a daily, detailed ledger of Backblaze B2 Cloud Storage usage for each Group member. This report can be used to calculate fees for a customer in line with the amount of data that have stored, as well as any other transaction fees.
Three CSV files—“Groups,” “Locations,” and “Usage”—related to usage are generated for each Group member on a daily basis. The “Usage” file contains the amount of storage used and other usage data while the “Groups” and “Locations” files provide lists of files that are generated daily and are primarily for reference purposes.
The “Groups” file (file name: usage.groups.csv
) contains a list of Group identifiers and the corresponding “Locations” file names that you can expect to be generated for the day. The “Locations” file (file name structure: usage.group-{groupId}.reportingLocations.csv
) contains a list of regions (e.g., U.S. West) and “Usage” file names that you can expect to be generated for the day. The “Usage” file (file name structure: usage.group-{groupId}.{reportingLocation}.csv
) contains the usage totals generated by each Group member for a given day.
Files for each day are organized into folders named by the {UTC date}
, and are uploaded to a special bucket in your account. That bucket is auto-generated by Backblaze once files are available for the Partner API-enabled account. The name of the bucket follows the format "b2-reports-$ACCOUNTID
" where “$ACCOUNTID” is your Backblaze account identifier.
The bucket is restricted; it cannot be modified (e.g., it cannot be toggled between private and public) and you cannot upload files into it. The bucket is reserved for the daily usage files. You may store as many (or as few) of the daily usage files in the bucket as you wish. Like any other bucket in your account, you will be charged every 30 days for the amount stored in the bucket and your account will be charged for downloads and transaction fees (see details here).
Groups File
The Groups file name convention is {UTC date}_usage.groups.csv
. The file contains a header row and the column names and description below.
date | Dates in YYYY-MM-DD format in UTC. |
group_id | Group identifier, integer. |
reporting_locations_file_name | File name of each "Locations" file to expect per Group. |
Locations File
The “Locations” file name convention is {UTC date}_usage.group-{group_id}.reportingLocations.csv
. The file contains a header row and the column names and description below.
date | Dates in YYYY-MM-DD format and in UTC. |
group_id | Group identifier, integer. |
reporting_location | Region, e.g., us-west. |
report_file_name | File name for each "Usage" file to expect per Group. |
Usage File
The Usage file name convention is {UTC date}_usage.group-{group_id}.{reporting location}.csv
. One file per Group is generated. The file contains a header row and the data.
In the “Usage” file, a row dedicated to account-level transactions is included. api_txn_class_a/b/c are included in this row since Backblaze B2 attributes them to the account level and not the bucket level.
If a bucket does not have any usage to report, that bucket will not appear in the “Usage” file.
date | Dates in YYYY-MM-DD format, indicating the UTC day covered by the report. |
group_id | Group identifier, integer. |
reporting_location | Region, e.g., us-west. |
account_id | Backblaze account identifier for Group member, alphanumeric. |
account_email | Email address for Group member. |
bucket_id | Bucket identifier, alphanumeric. |
bucket_name | Name of the bucket. |
uploaded_gb | Number of bytes uploaded in gigabytes. |
bucket_name | Name of the bucket. |
deleted_gb | Number of bytes deleted in gigabytes. |
downloaded_gb | Number of bytes downloaded in gigabytes. |
downloaded_bytes | Number of bytes downloaded in bytes. Number of bytes downloaded is a billable entity. Number includes the free allocated amount. |
downloaded_favored_bytes | Number of favored bytes downloaded in bytes—Backblaze does not charge for favored bytes. |
stored_gb | Number of bytes stored in gigabytes (at the end of the day). |
storage_byte_hours | Number of byteHours stored. Number of stored byte hours is a billable entity. Number includes the free allocated amount. |
api_txn_class_a | Number of Class A transactions. Class A transactions are free of charge. |
api_txn_class_b | Number of Class B transactions. API transactions are a billable entity. Number includes the free allocated amount. |
api_txn_class_c | Number of Class C transactions. API transactions are a billable entity. Number includes the free allocated amount. |