CustomerUsageQueryData – Management API – MediaKind
CustomerUsageQueryData
object
Properties
download:
boolean(Optional)- Defaults to
false. - When
true, sets response headers to prompt a browser file download.
endDate:
string(Required)- Format:
date. - End date of the usage report (exclusive). To get a full month of usage, set both
startDateandendDateto the first of the month. - Maximum range depends on granularity: 31 days for 'hour', 1 year for 'day', unlimited for 'week', 'month', or 'year'.
filterOnReportedDate:
boolean(Optional)- Defaults to
false. - When
true, filters usage byreport_time(when the usage was charged) rather thansample_time(when it occurred). Useful for reconciling against invoice dates.
format:
enum(Optional)- Defaults to
json. - Response format. Either 'json' or 'csv'.
- Allowed values:
json,csv.
granularity:
enum(Optional)- Defaults to
day. - Time bucket for aggregation.
- Allowed values:
year,month,week,day,hour.
groupBy:
list of strings(Optional)- Fields to group results by. Only
meteris currently valid. Defaults to['meter'].
meterNames:
list of strings(Optional)- Filter results to the specified meter names.
paymentMethodIds:
list of strings(Optional)- Filter results to the specified payment method IDs. Mutually exclusive with
projectNames.
projectNames:
list of strings(Optional)- Filter results to the specified project names. Mutually exclusive with
paymentMethodIds.
startDate:
string(Required)- Format:
date. - Start date of the usage report (inclusive).