chargebackReport
The chargebackReport
data type describes the chargebackReport
resource for tenants and namespaces. You use this resource to generate chargeback reports for tenants and namespaces.
A chargeback report contains historical statistics about a tenant or namespace, broken out either by hour or by day. You can also generate chargeback reports that contain a single set of statistics for a given time period, such as a specific month.
Chargeback reports can serve as input to billing systems that need to determine charges for capacity and bandwidth usage at the tenant or namespace level. Because a chargeback report can cover a specified time period, you can create applications that generate these reports at regular intervals and feed those reports to your billing system.
Chargeback reports are also a good source of information for system analysis, enabling you to adjust storage and bandwidth allocations based on usage patterns.
Chargeback reports are available only for HCP tenants and namespaces. You cannot generate a chargeback report for the default tenant or namespace.
A chargeback report for a namespace contains statistics only for that namespace. A chargeback report for a tenant contains aggregated namespace statistics. For example, the number of read operations for a tenant during a given reporting interval is the total of the numbers of read operations that occurred in all the namespaces owned by that tenant during that reporting interval.
You can use a system-level user account to request a tenant chargeback report regardless of whether the tenant has granted system-level users administrative access to itself. To generate a namespace chargeback report using a system-level user account, system-level users must have administrative access to the owning tenant.
When generating a chargeback report, you use query parameters on the resource URL in the GET request to specify the reporting interval and the time period you want the report to cover. HCP keeps chargeback statistics for 180 days. As a result, chargeback reports cannot report statistics from more that 180 days in the past.
The response to a chargebackReport GET request can be formatted as XML, JSON, or CSV.
Query parameters
You use query parameters appended to the request URL to specify the time period and reporting interval for a chargeback report. These parameters are all optional. Default values are used for any you omit.
Parameter type | Paramter name | Accepted values | Notes |
Time period | start=start-time |
Use the ISO 8601 format If you specify both a start time and an end time, the start time must be earlier than the end time. |
|
end=end-time |
Use the ISO 8601 format If you specify both a start time and an end time, the start time must be earlier than the end time. |
| |
Reporting interval | granularity |
The default is These values are not case sensitive. | The statistics reported for the current reporting interval, if included in the chargeback report, may not reflect some reads and writes that have already occurred during the current hour. After the hour is past, however, the statistics for that hour are complete. |
Query parameter examples
To get hourly statistics for the entire day of February 18, 2017:
start=2017-02-18T00:00:00-0500&end=2017-02-18T23:59:59-0500 &granularity=hour
To get daily statistics for the week starting February 19, 2017:
start=2017-02-19T00:00:00-0500&end=2017-02-25T23:59:59-0500 &granularity=day
To get a single set of statistics for the entire month of February 2017:
start=2017-02-01T00:00:00-0500&end=2017-02-29T23:59:59-0500 &granularity=total
To get hourly statistics for the current day from 8:00 a.m. up to the current time, where the current day is February 22, 2017:
start=2017-02-22T08:00:00-0500&granularity=hour
Properties
The table below describes the property included in the chargebackReport
data type.
Property name | Data type | Description | Notes |
chargebackData |
chargeback Data | Specifies statistics that describe the usage of a given namespace or of all the namespaces owned by a given tenant. | The response body includes one instance of this property for each reporting interval in the time period specified by the query parameters in the GET request for the chargebackReport resource. |