Query Explore Events in Table Format
Retrieves explore data for a given organization.
Note: This endpoint is intended to get a table of results, and is not for doing a full export of data sent to Sentry.
The field query parameter determines what fields will be selected in the data and meta keys of the endpoint response.
- The
datakey contains a list of results row by row that match thequerymade - The
metakey contains information about the response, including the unit or type of the fields requested
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
Query Parameters:
field(array(string))REQUIREDThe fields, functions, or equations to request for the query. At most 20 fields can be selected per request. Each field can be one of the following types:
- A built-in key field. See possible fields in the properties table, under any field that matches the dataset passed to the dataset parameter
- example:
field=transaction
- example:
- A tag. Tags should use the
tag[{name}, {type}]formatting to avoid ambiguity with any fields,- example:
field=tag[isEnterprise, string] - example:
field=tag[numberOfBytes, number]
- example:
- A function which will be in the format of
function_name(parameters,...). See possible functions in the query builder documentation.- when a function is included, Discover will group by any tags or fields
- example:
field=count_if(transaction.duration,greater,300)
- An equation when prefixed with
equation|. Read more about equations here.- example:
field=equation|count_if(transaction.duration,greater,300) / count() * 100
- example:
- A built-in key field. See possible fields in the properties table, under any field that matches the dataset passed to the dataset parameter
dataset(string)REQUIRED- choices:
- errors
- logs
- profile_functions
- spans
- tracemetrics
- uptime_results
Which dataset to query. The chosen dataset determines which fields are queryable.
errors- Error events.logs- Structured log events.profile_functions- Function-level Profiling data.spans- Distributed tracing span events.tracemetrics- Application Metrics.uptime_results- Uptime monitoring check results.
end(string)The end of the period of time for the query, expected in ISO-8601 format. For example,
2001-12-14T12:34:56.7890.environment(array(string))The name of environments to filter by.
project(array(integer))The IDs of projects to filter by.
-1means all available projects. For example, the following are valid parameters:/?project=1234&project=56789/?project=-1
start(string)The start of the period of time for the query, expected in ISO-8601 format. For example,
2001-12-14T12:34:56.7890.statsPeriod(string)The period of time for the query, will override the start & end parameters, a number followed by one of:
dfor dayshfor hoursmfor minutessfor secondswfor weeks
For example,
24h, to mean query data starting from 24 hours ago to now.per_page(integer)Limit the number of rows to return in the result. Default and maximum allowed is 100.
query(string)Filters results by using query syntax.
Example:
query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)sort(string)What to order the results of the query by. Must be something in the
fieldlist, excluding equations.allowAggregateConditions(boolean)If false, aggregate conditions in the query string are disallowed. Defaults to true.
cursor(string)A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.
Scopes
<auth_token> requires one of the following scopes:org:adminorg:readorg:write
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/events/ \ -H 'Authorization: Bearer <auth_token>'
Copied{ "data": [ { "count_if(transaction.duration,greater,300)": 5, "count()": 10, "equation|count_if(transaction.duration,greater,300) / count() * 100": 50, "transaction": "foo" }, { "count_if(transaction.duration,greater,300)": 3, "count()": 20, "equation|count_if(transaction.duration,greater,300) / count() * 100": 15, "transaction": "bar" }, { "count_if(transaction.duration,greater,300)": 8, "count()": 40, "equation|count_if(transaction.duration,greater,300) / count() * 100": 20, "transaction": "baz" } ], "meta": { "fields": { "count_if(transaction.duration,greater,300)": "integer", "count()": "integer", "equation|count_if(transaction.duration,greater,300) / count() * 100": "number", "transaction": "string" } } }