declined events count
Retrieves detailed metrics about declined requests for a specific project, including counts and trend analysis. This endpoint helps you understand the volume and patterns of blocked traffic, including custom rule violations and bot detection.
Endpoint
Authentication
Requires API key authentication:
Path Parameters
Query Parameters
This endpoint supports time-based filtering parameters to specify the date range for analysis:
- Time period filters - Specify start/end dates for the analysis period
- See Pagination query parameters for additional options
Response Structure
The response returns an object containing declined request metrics and trends, or null when the
project recorded no declined requests in the requested window:
Example Response
Use Cases
- Security Monitoring: Track the volume of blocked malicious requests
- Trend Analysis: Identify increases or decreases in attack activity
- Rule Effectiveness: Measure how many requests your custom rules are blocking
- Bot Detection Metrics: Monitor automated bot traffic separately from rule-based blocks
- Alert Configuration: Set up alerts when declined request trends spike
- Security Reporting: Generate reports showing protection effectiveness over time
Understanding Trends
The trend values indicate percentage changes compared to the previous equivalent time period:
- Negative trend (e.g.,
-63.75): Declined requests decreased by 63.75% - Positive trend (e.g.,
+45.20): Declined requests increased by 45.20% - Zero trend (
0): No change from previous period
Important Notes
- Trends are calculated by comparing to the equivalent previous time period
- A decrease in
bannedValidationEventsCounttrend may indicate reduced attack activity or rule adjustments botValidationEventsCountspecifically tracks automated bot traffic detected by BotBye’s bot detection algorithmsbannedValidationEventsCountincludes requests blocked by your custom security rules- The
customerIdfield isnullfor project-level aggregations
Accepted permissions
Project → Project → InfoToken scope
Project View
Authentication
Personal access token. Create it in your BotBye account under Profile → Personal Access Tokens, tick the scopes the endpoints you call require (see each endpoint’s Token scope), and send the token in the X-Api-Key request header. A token works only for the account it was created in.
Path parameters
Query parameters
(Optional) Size of the lookback window, counted in interval_type units back from now. The default value is 1, meaning the current day (or the current hour if interval_type is HOUR). A negative value is rejected.
(Optional) Unit of the lookback window: HOUR or DAY, case-insensitive. Defaults to DAY. Any other value is rejected.

