Bot request metrics

Historical Stats API returns a time series response of bot-request metrics broken down by bot-type.

Data retention

We store data at the minutely, hourly and daily granularity levels for a duration of 45 days. Note the following maximum data retention limits served by the API response:

  • 24 hours (1 day) of minutely data
  • 45 days of hourly data
  • 45 days of daily data.

We do not report data for time periods that have not yet ended.

Metrics

The following metric sets and metrics are supported:

  • bot_edge_requests_allowed_count
  • bot_edge_requests_challenged_count
  • bot_edge_requests_blocked_count
  • bot_edge_requests_challenge_token_valid_count

Data model

A time series data item containing bot request metric counts. The `bot` field is present when grouped by bot. The `datacenter` field is present when grouped by data center. This dataset is sparse, meaning only keys with non-zero values are included.

botstringBot identifier for which data was recorded. Present only when grouped by bot.
bot_edge_requests_allowed_countintegerCount of edge requests where a bot was detected and the request was allowed by the configured policy.
bot_edge_requests_blocked_countintegerCount of edge requests where a bot was detected and the request was blocked by the configured policy.
bot_edge_requests_challenge_token_valid_countintegerCount of edge requests where a bot was detected and the client making the request has already solved a challenge issued by the configured policy.
bot_edge_requests_challenged_countintegerCount of edge requests where a bot was detected and a client challenge was issued for the request by the configured policy.
datacenterstringDatacenter (POP) for which data was recorded. Present only when grouped by datacenter.
timestampstringTimestamp for the time series being reported.
metaobjectMeta information about the scope of the current response and optional additional information for subsequent requests.

Bot-request metrics response metadata

Meta information about the scope of the current response and optional additional information for subsequent requests.

fromstringAn RFC-8339-formatted date and time string indicating the inclusive start of the query time range.
group_bystringList of dimensions (comma-separated) being summed over in the results.
limitintegerThe maximum number of results to return. Defaults to 1000.
next_cursorstringOptional string that can be used to request the next page of results, if any.
tostringAn RFC-8339-formatted date and time indicating the exclusive end of the query time range.

Endpoints

Get per-service historical time series metrics for bot requests broken down by bot-type

GET/metrics/bots/entities/service_id/granularity