Use Partner API Reports
    • Dark
      Light

    Use Partner API Reports

    • Dark
      Light

    Article Summary

    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.

    For all of the Backblaze API operations and their corresponding documentation, see API Documentation.

    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.

    Note
    Each day, Backblaze checks the bucket to ensure that the files from the previous seven days exist so that it can fill in any missing files, if needed.

    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).

    Note
    Third-party applications may not support restricted buckets. Files should not be deleted until after seven days of age, as they will be regenerated by the system.

    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.

    dateDates in YYYY-MM-DD format in UTC.
    group_idGroup identifier, integer.
    reporting_locations_file_nameFile 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.

    dateDates in YYYY-MM-DD format and in UTC.
    group_idGroup identifier, integer.
    reporting_locationRegion, e.g., us-west.
    report_file_nameFile 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.

    dateDates in YYYY-MM-DD format, indicating the UTC day covered by the report.
    group_idGroup identifier, integer.
    reporting_locationRegion, e.g., us-west.
    account_idBackblaze account identifier for Group member, alphanumeric.
    account_emailEmail address for Group member.
    bucket_idBucket identifier, alphanumeric.
    bucket_nameName of the bucket.
    uploaded_gbNumber of bytes uploaded in gigabytes.
    bucket_nameName of the bucket.
    deleted_gbNumber of bytes deleted in gigabytes.
    downloaded_gbNumber of bytes downloaded in gigabytes.
    downloaded_bytesNumber of bytes downloaded in bytes. Number of bytes downloaded is a billable entity. Number includes the free allocated amount.
    downloaded_favored_bytesNumber of favored bytes downloaded in bytes—Backblaze does not charge for favored bytes.
    stored_gbNumber of bytes stored in gigabytes (at the end of the day).
    storage_byte_hoursNumber of byteHours stored. Number of stored byte hours is a billable entity. Number includes the free allocated amount.
    api_txn_class_aNumber of Class A transactions. Class A transactions are free of charge.
    api_txn_class_bNumber of Class B transactions. API transactions are a billable entity. Number includes the free allocated amount.
    api_txn_class_cNumber of Class C transactions. API transactions are a billable entity. Number includes the free allocated amount.

    Was this article helpful?