Retrieves ranked monetization statistics¶
Description¶
Retrieves ranked monetization statistics. Use the StatisticType parameter to specify the ranking: TOP_SOURCES_BY_REVENUE for top sources by revenue, or TOP_PATHS_BY_REVENUE for top content paths by revenue. This operation is only available for CLOUDFRONT scope. The maximum supported time window is 90 days. When no CurrencyMode filter is provided, results default to REAL. To retrieve test data, include a CurrencyMode filter with the value TEST.
Usage¶
wafv2_get_revenue_statistics(StatisticType, TimeWindow, Scope, Currency,
GroupBy, Filters, NextMarker, Limit, SortBy, SortOrder)
Arguments¶
-
StatisticType[required]
TOP_SOURCES_BY_REVENUEranks revenue from AI bot traffic, grouped by the dimension you specify in theGroupByparameter (NAME,CATEGORY,INTENT,ORGANIZATION, orWEBACL);GroupByis required for this statistic type.TOP_PATHS_BY_REVENUEranks revenue by path. -
TimeWindow[required] The time range for the query. Specify start and end timestamps.
-
Scope[required] Specifies whether this is for a Amazon CloudFront distribution (
CLOUDFRONT) or for a regional application (REGIONAL). -
Currency[required] The currency for the revenue amounts in the response.
-
GroupByThe dimension to group results by:
NAME,CATEGORY,INTENT,ORGANIZATION, orWEBACL. Required whenStatisticTypeisTOP_SOURCES_BY_REVENUE. Not required forTOP_PATHS_BY_REVENUE, where results are grouped by content path. IfStatisticTypeisTOP_SOURCES_BY_REVENUEandGroupByis omitted, the request is rejected with aWAFInvalidParameterException. -
FiltersOptional filters to narrow the results.
-
NextMarkerWhen you get a paginated response, this marker indicates that additional results are available. Use it in a subsequent request to retrieve the next page of results.
-
LimitThe maximum number of results to return.
-
SortByThe field to sort results by:
REVENUE,PERCENTAGE, orNAME. -
SortOrderThe sort order:
ASCfor ascending orDESCfor descending.
Value¶
A list with the following syntax:
list(
SourceStatistics = list(
list(
SourceName = "string",
Percentage = 123.0,
Amount = "string",
RequestCount = 123,
SourceCategory = "string",
Intent = "string",
Organization = "string",
Verified = TRUE|FALSE,
GroupByValue = "string"
)
),
RevenuePathStatistics = list(
list(
Path = "string",
Percentage = 123.0,
Amount = "string",
RequestCount = 123
)
),
NextMarker = "string"
)
Request syntax¶
svc$get_revenue_statistics(
StatisticType = "TOP_SOURCES_BY_REVENUE"|"TOP_PATHS_BY_REVENUE",
TimeWindow = list(
StartTime = as.POSIXct(
"2015-01-01"
),
EndTime = as.POSIXct(
"2015-01-01"
)
),
Scope = "CLOUDFRONT"|"REGIONAL",
Currency = "USDC",
GroupBy = "NAME"|"CATEGORY"|"INTENT"|"ORGANIZATION"|"WEBACL",
Filters = list(
list(
Name = "string",
Values = list(
"string"
)
)
),
NextMarker = "string",
Limit = 123,
SortBy = "REVENUE"|"PERCENTAGE"|"NAME",
SortOrder = "ASC"|"DESC"
)