Skip to content

Get Top Path Statistics By Traffic

wafv2_get_top_path_statistics_by_traffic R Documentation

Retrieves aggregated statistics about the top URI paths accessed by bot traffic for a specified web ACL and time window

Description

Retrieves aggregated statistics about the top URI paths accessed by bot traffic for a specified web ACL and time window. You can use this operation to analyze which paths on your web application receive the most bot traffic and identify the specific bots accessing those paths. The operation supports filtering by bot category, organization, or name, and allows you to drill down into specific path prefixes to view detailed URI-level statistics.

Usage

wafv2_get_top_path_statistics_by_traffic(WebAclArn, Scope,
  UriPathPrefix, TimeWindow, BotCategory, BotOrganization, BotName, Limit,
  NumberOfTopTrafficBotsPerPath, NextMarker)

Arguments

WebAclArn

[required] The Amazon Resource Name (ARN) of the web ACL for which you want to retrieve path statistics.

Scope

[required] Specifies whether the web ACL is for an Amazon Web Services CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer, an AppSync GraphQL API, an Amazon Cognito user pool, an Amazon Web Services App Runner service, or an Amazon Web Services Verified Access instance.

UriPathPrefix

A URI path prefix to filter the results. When you specify this parameter, the operation returns statistics for individual URIs within the specified path prefix. For example, if you specify ⁠/api⁠, the response includes statistics for paths like ⁠/api/v1/users⁠ and ⁠/api/v2/orders⁠. If you don't specify this parameter, the operation returns top-level path statistics.

TimeWindow

[required] The time window for which you want to retrieve path statistics. The time window must be within the data retention period for your web ACL.

BotCategory

Filters the results to include only traffic from bots in the specified category. For example, you can filter by ai to see only AI crawler traffic, or search_engine to see only search engine bot traffic. When you apply this filter, the Source field is populated in the response.

BotOrganization

Filters the results to include only traffic from bots belonging to the specified organization. For example, you can filter by openai or google. When you apply this filter, the Source field is populated in the response.

BotName

Filters the results to include only traffic from the specified bot. For example, you can filter by gptbot or googlebot. When you apply this filter, the Source field is populated in the response.

Limit

[required] The maximum number of path statistics to return. Valid values are 1 to 100.

NumberOfTopTrafficBotsPerPath

[required] The maximum number of top bots to include in the statistics for each path. Valid values are 1 to 10.

NextMarker

When you request a list of objects with a Limit setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

Value

A list with the following syntax:

list(
  PathStatistics = list(
    list(
      Source = list(
        BotCategory = "string",
        BotOrganization = "string",
        BotName = "string"
      ),
      Path = "string",
      RequestCount = 123,
      Percentage = 123.0,
      TopBots = list(
        list(
          BotName = "string",
          RequestCount = 123,
          Percentage = 123.0
        )
      )
    )
  ),
  TotalRequestCount = 123,
  NextMarker = "string",
  TopCategories = list(
    list(
      Source = list(
        BotCategory = "string",
        BotOrganization = "string",
        BotName = "string"
      ),
      Path = "string",
      RequestCount = 123,
      Percentage = 123.0,
      TopBots = list(
        list(
          BotName = "string",
          RequestCount = 123,
          Percentage = 123.0
        )
      )
    )
  )
)

Request syntax

svc$get_top_path_statistics_by_traffic(
  WebAclArn = "string",
  Scope = "CLOUDFRONT"|"REGIONAL",
  UriPathPrefix = "string",
  TimeWindow = list(
    StartTime = as.POSIXct(
      "2015-01-01"
    ),
    EndTime = as.POSIXct(
      "2015-01-01"
    )
  ),
  BotCategory = "string",
  BotOrganization = "string",
  BotName = "string",
  Limit = 123,
  NumberOfTopTrafficBotsPerPath = 123,
  NextMarker = "string"
)