Query Explore Events in Timeseries Format
Retrieves explore data for a given organization as a timeseries.
This endpoint can return timeseries for either 1 or many axis, and results grouped to the top events depending on the parameters passed
Note: For queries extending past 30d, spanning billions of rows, or running on projects with low
sample rates, the aggregation yAxis=count_unique() and filters on high-cardinality
fields (such as query=user.id:bc) will not return accurate results. Use these queries for rough
estimation only.
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
Query Parameters:
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(undefined))The IDs or slugs of projects to filter by. Project slugs are unique within each organization. Omit this parameter to include all accessible projects.
-1is also accepted to include all accessible projects. For example, the following are valid parameters:/?project=1234&project=56789/?project=android&project=javascript-react/?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.topEvents(integer)The number of top event results to return, must be between 1 and 10. When TopEvents is passed, both sort and groupBy are required parameters
comparisonDelta(integer)The delta in seconds to return additional offset timeseries by
interval(integer)The size of the bucket for the timeseries to have, must be a value smaller than the window being queried. If the interval is invalid a default interval will be selected instead
sort(string)What to order the results of the query by. Must be something in the
fieldlist, excluding equations.groupBy(array(string))List of fields to group by, Required for topEvents queries as this and sort determine what the top events are
yAxis(string)The aggregate field to create the timeseries for, defaults to
count()when not included.count()- Total count of events over the period.avg(field)- Average value of the field over the period.pXX(field)- Percentile value of the field over the period. One of:p50,p75,p90,p95,p99,p100.sum(field)- Sum of all values for the field over the period.min(field)- Lowest value observed for the field over the period.max(field)- Highest value observed for the field over the period.count_unique(field)- Count of unique values observed for the field over the period. See Note: regarding accuracy on sampled data.epm- Average number of events received per minute.eps- Average number of events received per second.failure_rate()- Percentage of events whosestatusindicates failure.failure_count()- Total count of events with an errorstatusover period.performance_score(field)- Web Vitals performance score for the selected measurement.opportunity_score(field)- Web Vitals opportunity score for the selected measurement.
query(string)Filters results by using query syntax.
Example:
query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)disableAggregateExtrapolation(string)- choices:
- 0
- 1
Whether to disable the use of extrapolation and return the sampled values, due to sampling the number returned may be less than the actual values sent to Sentry
preventMetricAggregates(string)- choices:
- 0
- 1
Whether to throw an error when aggregates are passed in the query or groupBy
excludeOther(string)- choices:
- 0
- 1
Only applicable with TopEvents, whether to include the 'other' timeseries which represents all the events that aren't in the top groups.
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-timeseries/ \ -H 'Authorization: Bearer <auth_token>'
Copied{ "timeSeries": [ { "values": [ { "timestamp": 1741368281123, "value": 5, "incomplete": false }, { "timestamp": 1741368281123, "value": 5, "incomplete": false } ], "yAxis": "count()", "groupBy": [ { "key": "transaction", "value": "foo" }, { "key": "project", "value": "bar" }, { "key": "tag[foo]", "value": "baz" } ], "meta": { "valueUnit": null, "valueType": "integer", "interval": 3600 } }, { "values": [ { "timestamp": 1741368281123, "value": 5, "incomplete": false }, { "timestamp": 1741368281123, "value": 5, "incomplete": false } ], "yAxis": "count()", "groupBy": [ { "key": "transaction", "value": "foo" }, { "key": "project", "value": "ball" }, { "key": "tag[foo]", "value": "baz" } ], "meta": { "valueUnit": null, "valueType": "integer", "interval": 3600 } } ], "meta": { "dataset": "spans", "start": 1741368281123, "end": 1741368281123 } }