> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.botbye.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.botbye.com/_mcp/server.

# events overview

GET {base_url}/api/v1/{account_id}/projects/{project_id}/overviews/events

# 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

Reference: https://api-docs.botbye.com/bot-bye-api/protection/overview/events-overview

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/{account_id}/projects/{project_id}/overviews/events:
    get:
      operationId: events-overview
      summary: events overview
      description: >-
        # 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
      tags:
        - subpackage_overview
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: interval
          in: query
          description: >-
            (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).
          required: false
          schema:
            type: integer
        - name: interval_type
          in: query
          description: >-
            (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.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/ApiV1AccountIdProjectsProjectIdOverviewsEventsGetResponsesContentApplicationJsonSchemaItems
        '400':
          description: fail
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/ApiV1AccountIdProjectsProjectIdOverviewsEventsGetResponsesContentApplicationJsonSchemaItems
servers:
  - url: '{base_url}'
    description: '{base_url}'
components:
  schemas:
    ApiV1AccountIdProjectsProjectIdOverviewsEventsGetResponsesContentApplicationJsonSchemaItemsContext:
      type: object
      properties:
        param:
          type: string
      title: >-
        ApiV1AccountIdProjectsProjectIdOverviewsEventsGetResponsesContentApplicationJsonSchemaItemsContext
    ApiV1AccountIdProjectsProjectIdOverviewsEventsGetResponsesContentApplicationJsonSchemaItems:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
        context:
          $ref: >-
            #/components/schemas/ApiV1AccountIdProjectsProjectIdOverviewsEventsGetResponsesContentApplicationJsonSchemaItemsContext
      required:
        - message
        - code
        - type
      title: >-
        ApiV1AccountIdProjectsProjectIdOverviewsEventsGetResponsesContentApplicationJsonSchemaItems

```

## Examples



**Response**

```json
[
  {
    "day": "2024-08-24",
    "hour": 0,
    "id": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d_2024-08-24_0",
    "projectId": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d",
    "allowedReqCount": 13941,
    "declinedReqCount": 13853,
    "total": 27794
  },
  {
    "day": "2024-08-25",
    "hour": 0,
    "id": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d_2024-08-25_0",
    "projectId": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d",
    "allowedReqCount": 10361,
    "declinedReqCount": 10103,
    "total": 20464
  },
  {
    "day": "2024-08-26",
    "hour": 0,
    "id": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d_2024-08-26_0",
    "projectId": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d",
    "allowedReqCount": 9803,
    "declinedReqCount": 9830,
    "total": 19633
  },
  {
    "day": "2024-08-27",
    "hour": 0,
    "id": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d_2024-08-27_0",
    "projectId": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d",
    "allowedReqCount": 6367,
    "declinedReqCount": 6216,
    "total": 12583
  },
  {
    "day": "2024-08-28",
    "hour": 0,
    "id": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d_2024-08-28_0",
    "projectId": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d",
    "allowedReqCount": 7390,
    "declinedReqCount": 7544,
    "total": 14934
  },
  {
    "day": "2024-08-29",
    "hour": 0,
    "id": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d_2024-08-29_0",
    "projectId": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d",
    "allowedReqCount": 4439,
    "declinedReqCount": 4277,
    "total": 8716
  },
  {
    "day": "2024-08-30",
    "hour": 0,
    "id": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d_2024-08-30_0",
    "projectId": "185071d5-d4fe-4bea-93df-19d0bd8c2d0d",
    "allowedReqCount": 435,
    "declinedReqCount": 437,
    "total": 872
  }
]
```

**SDK Code**

```python Overview_eventsOverview_example
import requests

url = "https://{base_url}/api/v1/account_id/projects/project_id/overviews/events"

querystring = {"interval":"1","interval_type":"DAY"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript Overview_eventsOverview_example
const url = 'https://{base_url}/api/v1/account_id/projects/project_id/overviews/events?interval=1&interval_type=DAY';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Overview_eventsOverview_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://{base_url}/api/v1/account_id/projects/project_id/overviews/events?interval=1&interval_type=DAY"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Overview_eventsOverview_example
require 'uri'
require 'net/http'

url = URI("https://{base_url}/api/v1/account_id/projects/project_id/overviews/events?interval=1&interval_type=DAY")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Overview_eventsOverview_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{base_url}/api/v1/account_id/projects/project_id/overviews/events?interval=1&interval_type=DAY")
  .asString();
```

```php Overview_eventsOverview_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://{base_url}/api/v1/account_id/projects/project_id/overviews/events?interval=1&interval_type=DAY');

echo $response->getBody();
```

```csharp Overview_eventsOverview_example
using RestSharp;

var client = new RestClient("https://{base_url}/api/v1/account_id/projects/project_id/overviews/events?interval=1&interval_type=DAY");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Overview_eventsOverview_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://{base_url}/api/v1/account_id/projects/project_id/overviews/events?interval=1&interval_type=DAY")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```