Retrieve an Organization's Events Count by Project
Query summarized event counts by project for your Organization. Also see https://docs.sentry.io/api/organizations/retrieve-event-counts-for-an-organization-v2/ for reference.
Path Parameters
- organization_id_or_slug(string)REQUIRED
- The ID or slug of the organization the resource belongs to. 
Query Parameters:
- field(string)REQUIRED
- choices:- sum(quantity)
- sum(times_seen)
 the sum(quantity)field is bytes for attachments, and all others the 'event' count for those types of events.sum(times_seen)sums the number of times an event has been seen. For 'normal' event types, this will be equal tosum(quantity)for now. For sessions, quantity will sum the total number of events seen in a session, whiletimes_seenwill be the unique number of sessions. and for attachments,times_seenwill be the total number of attachments, while quantity will be the total sum of attachment bytes.- sum(quantity)
- sum(times_seen)
 
- statsPeriod(string)
- This defines the range of the time series, relative to now. The range is given in a - <number><unit>format. For example- 1dfor a one day range. Possible units are- mfor minutes,- hfor hours,- dfor days and- wfor weeks.You must either provide a- statsPeriod, or a- startand- end.
- interval(string)
- This is the resolution of the time series, given in the same format as - statsPeriod. The default resolution is- 1hand the minimum resolution is currently restricted to- 1has well. Intervals larger than- 1dare not supported, and the interval has to cleanly divide one day.
- start(string)
- This defines the start of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds.Use along with - endinstead of- statsPeriod.
- end(string)
- This defines the inclusive end of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds.Use along with - startinstead of- statsPeriod.
- project(array(undefined))
- The ID of the projects to filter by. 
- category(string)
- choices:- error
- transaction
- attachment
- replays
- profiles
 If filtering by attachments, you cannot filter by any other category due to quantity values becoming nonsensical (combining bytes and event counts). If filtering by error, it will automatically adddefaultandsecurityas we currently roll those two categories intoerrorfor displaying.- error
- transaction
- attachment
- replays
- profiles
 
- outcome(string)
- choices:- accepted
- filtered
- rate_limited
- invalid
- abuse
- client_discard
- cardinality_limited
 See https://docs.sentry.io/product/stats/ for more information on outcome statuses. - accepted
- filtered
- rate_limited
- invalid
- abuse
- client_discard
- cardinality_limited
 
- reason(string)
- The reason field will contain why an event was filtered/dropped. 
- download(boolean)
- Download the API response in as a csv file 
Scopes
<auth_token> requires one of the following scopes:- org:admin
- org:read
- org:write
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/stats-summary/ \ -H 'Authorization: Bearer <auth_token>'
Copied{ "start": "2023-09-19T13:00:00Z", "end": "2023-09-19T12:28:00Z", "projects": [ { "id": "1", "slug": "android-project", "stats": [ { "category": "error", "outcomes": { "accepted": 1930571, "filtered": 1934881, "rate_limited": 2506132, "invalid": 0, "abuse": 1938113, "client_discard": 1942414, "cardinality_limited": 0 }, "totals": { "dropped": 2506132, "sum(quantity)": 10252111 } }, { "category": "transaction", "outcomes": { "accepted": 1909849, "filtered": 1947142, "rate_limited": 2458946, "invalid": 0, "abuse": 1927179, "client_discard": 1931595, "cardinality_limited": 0 }, "totals": { "dropped": 2458946, "sum(quantity)": 10174711 } } ] } ] }