Query events
org:read
Path parameters
The ID or slug of the organization.
Query parameters
The fields to include in the response. Repeat this parameter for multiple fields. Examples:
field=id&field=title&field=count(). See Available fields below.A Sentry search query to filter results. Supports the same syntax as the Sentry UI search bar. Examples:
error.type:TypeError— filter by exception typetransaction:/api/users/— filter by transaction namerelease:2.0.0— filter by release versionuser.email:[email protected]— filter by user
Filter by project ID. Repeat for multiple projects.
Filter by environment name (e.g.
production, staging).A relative time window. Examples:
24h, 7d, 14d, 30d. Cannot be combined with start/end.ISO 8601 start of the time range. Requires
end.ISO 8601 end of the time range. Requires
start.Sort order. Prefix with
- for descending. Example: -count() or transaction.duration.Number of results to return. Maximum is 100. Defaults to 50.
Pagination cursor from the
Link response header.An optional string identifying the caller, used for query attribution.
Example request
Example response
Response fields
An array of event objects containing the requested fields.
Metadata about the response, including a
fields map of field names to their data types.Available fields
Event fields
| Field | Type | Description |
|---|---|---|
id | string | Event ID |
title | string | Event title |
message | string | Raw event message |
platform | string | Platform (e.g. python) |
timestamp | string | Event timestamp |
release | string | Release version |
dist | string | Release distribution |
environment | string | Environment name |
user.id | string | User ID |
user.email | string | User email |
user.username | string | Username |
user.ip | string | User IP address |
transaction | string | Transaction name |
error.type | array | Exception type(s) |
error.value | array | Exception message(s) |
stack.filename | array | Stack frame filenames |
stack.function | array | Stack frame functions |
level | string | Severity level |
project | string | Project slug |
issue | string | Issue ID |
os.name | string | OS name |
browser.name | string | Browser name |
device.family | string | Device family |
Aggregation functions
Use aggregation functions when you need summary statistics across events:| Function | Description | Example |
|---|---|---|
count() | Total number of events | count() |
count_unique(field) | Number of unique values | count_unique(user.email) |
avg(field) | Average value | avg(transaction.duration) |
sum(field) | Sum of values | sum(transaction.duration) |
min(field) | Minimum value | min(transaction.duration) |
max(field) | Maximum value | max(transaction.duration) |
p50(field) | 50th percentile | p50(transaction.duration) |
p75(field) | 75th percentile | p75(transaction.duration) |
p95(field) | 95th percentile | p95(transaction.duration) |
p99(field) | 99th percentile | p99(transaction.duration) |
failure_rate() | Rate of failed transactions | failure_rate() |
apdex(threshold) | Apdex score | apdex(300) |
eps() | Events per second | eps() |
epm() | Events per minute | epm() |