---
title: "Get event counts with filtering"
method: GET
path: "/projects/{project_id}/events"
tags: ["Events"]
---

# Get event counts with filtering

`GET /projects/{project_id}/events`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/events`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required

## Query parameters

- `start_date` string, required
- `end_date` string, required
- `environment_id` integer
- `limit` integer
- `custom_events_only` boolean
- `aggregation_level` string

## Response `200`

Successfully retrieved event counts

- EventCount[]
  - `count` integer, required
  - `event_name` string, required
  - `percentage` number, double, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `500`: Internal server error

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
