events overview

View as Markdown
# Get Requests Overview Retrieves aggregated request statistics for a specific project over a given time period. This endpoint provides time-series data showing allowed and declined request counts, enabling you to monitor traffic patterns and security events. ## Endpoint ``` GET {base_url}/api/v1/{account_id}/projects/{project_id}/overviews/requests ``` ## Authentication Requires API key authentication: ``` Authorization: Bearer {api_key} ``` ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `account_id` | string | Yes | Your unique BotBye account identifier | | `project_id` | string | Yes | The project identifier for which to retrieve overview data | ## Query Parameters This endpoint supports standard time-based filtering parameters to specify the date range and granularity of the data: - **Time period filters** - Specify start/end dates and aggregation level (hourly, daily, monthly) - See [Pagination query parameters](https://botbye.com/docs/api#query-parameters) for additional options ## Response Structure The response returns an array of time-series data points, each containing: | Field | Type | Description | |-------|------|-------------| | `day` | string | Date in `YYYY-MM-DD` format for the data point | | `hour` | integer | Hour interval (0-23) for hourly aggregation | | `id` | string | Unique identifier combining `projectId`, `day`, and `hour` (format: `projectId_day_hour`) | | `projectId` | string | The project identifier | | `customerId` | null | Always null for project-level data | | `allowedReqCount` | integer | Number of requests that were allowed during this period | | `declinedReqCount` | integer | Number of requests that were declined during this period | | `total` | integer | Total requests (`allowedReqCount + declinedReqCount`) | ## Example Response ```json [ { "day": "2024-08-24", "hour": 0, "id": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d_2024-08-24_0", "projectId": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d", "customerId": null, "allowedReqCount": 13941, "declinedReqCount": 13853, "total": 27794 }, { "day": "2024-08-24", "hour": 1, "id": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d_2024-08-24_1", "projectId": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d", "customerId": null, "allowedReqCount": 15234, "declinedReqCount": 12456, "total": 27690 } ] ``` ## Use Cases - **Traffic Monitoring**: Track overall request volume trends over time - **Security Dashboard**: Visualize allowed vs. declined request ratios - **Capacity Planning**: Understand peak traffic periods - **Anomaly Detection**: Identify unusual spikes in declined requests - **Performance Reporting**: Generate reports on API protection effectiveness - **Trend Analysis**: Compare traffic patterns across different time periods ## Important Notes - Data granularity depends on the time range requested (hourly for short periods, daily/monthly for longer periods) - The `customerId` field is always `null` for project-level aggregations - Use the `id` field as a unique key when storing or processing this data - Historical data availability depends on your BotBye plan's retention policy

Path parameters

account_idstringRequired
project_idstringRequired

Query parameters

intervalintegerOptional

(Optional) Defines the interval for the overview. The interval is used in conjunction with intervalType to determine the specific time span of the overview. The default value is 1, meaning the current day (or month if interval_type = month).

interval_typestringOptional

(Optional) Specifies the type of interval for the overview. This can be HOUR, DAY, MONTH. The default value is DAY, meaning the overview will cover a single day.

Response headers

Content-Lengthinteger
Connectionstring

Response

success
messagestring
codestring
typestring
contextobject

Errors

400
Bad Request Error