Usage Metrics API
Notes
- Only use the Usage Metrics API if you do not receive invoices. If you're a customer receiving invoices, use the invoices API instead.
Limitations
- /usage-metrics API returns data for a maximum period of three months at a time.
Get information on billing usage metrics.
Data model
customer_id | string | Alphanumeric string identifying the customer. Read-only. | |
details | array | ||
end_time | string | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | |
meta | object | Pagination metadata. | |
start_time | string | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | |
unit | string | The unit for the usage as shown on an invoice. If there is no explicit unit, this field will be "unit" (e.g., a request with product_id of 'cdn_usage' and usage_type of 'North America Requests' has no unit, and will return "unit"). | |
usage_type | string | The usage type identifier for the usage. This is a single, billable metric for the product. | |
name | string | Full name of the product usage type as it might appear on a customer's invoice. | |
product_id | string | The product identifier associated with the usage type. This corresponds to a Fastly product offering. | |
limit | integer | The number of invoices included in the response. | |
next_cursor | string | The token used to request the next set of results. | |
sort | string | The sort order of the invoices in the response. [Default billing_start_date ] | |
total | integer | Total number of records available on the backend. | |
last_updated_at | string | The date when the usage metric was last updated. | |
month | string | The year and month of the usage element. | |
quantity | number | The quantity of the usage for the product. | |
raw_quantity | number | The raw units measured for the product. | |
region | string | The geographical area applicable for regionally based products. |