Skip to content

Latest commit

 

History

History
90 lines (58 loc) · 3 KB

BillingUsageMetricsApi.md

File metadata and controls

90 lines (58 loc) · 3 KB

BillingUsageMetricsApi

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
get_service_level_usage GET /billing/v2/account_customers/{customer_id}/service-usage-metrics Retrieve service-level usage metrics for a product.
get_service_level_usage_types GET /billing/v2/account_customers/{customer_id}/service-usage-types Retrieve product usage types for a customer.

get_service_level_usage

Returns product usage, broken down by service.

let cfg = &Configuration::default();
let params = GetServiceLevelUsageParams {
    // parameters
};
get_service_level_usage(cfg, params)

Parameters

Name Type Description Required Notes
customer_id String Alphanumeric string identifying the customer. [required]
product_id String The product identifier for the metrics returned (e.g., cdn_usage). This field is not required for CSV requests. [required]
usage_type_name String The usage type name for the metrics returned (e.g., North America Requests). This field is not required for CSV requests. [required]
time_granularity String [required]
start_date Option<String>
end_date Option<String>
start_month Option<String>
end_month Option<String>
limit Option<String> Number of results per page. The maximum is 100. [default to 5]
cursor Option<String> Cursor value from the next_cursor field of a previous response, used to retrieve the next page. To request the first page, this should be empty.

Return type

crate::models::Serviceusagemetrics

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

get_service_level_usage_types

Returns product usage types reported by the customer's services.

let cfg = &Configuration::default();
let params = GetServiceLevelUsageTypesParams {
    // parameters
};
get_service_level_usage_types(cfg, params)

Parameters

Name Type Description Required Notes
customer_id String Alphanumeric string identifying the customer. [required]

Return type

crate::models::Serviceusagetypes

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]