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
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
Query Parameters:
dataset(string)REQUIRED- choices:
- logs
- profile_functions
- spans
- uptime_results
Which dataset to query, changing datasets changes the available fields that can be queried
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.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 includedquery(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 } }