Retrieve aggregated event counts for a Sentry organization (stats_v2) grouped by outcome/category
domain: sentry.io · 5 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗
Documented steps
GET /api/0/organizations/{organization_id_or_slug}/stats_v2/ — docs: https://docs.sentry.io/api/organizations/retrieve-event-counts-for-an-organization-v2/
groupBy is REQUIRED (repeatable): outcome, category, or reason. statsPeriod sets the window ('1h', '24h', '7d', ...); field selects the metric; query filters.
Response: time-bucketed counts grouped by the requested dimension — use it to see accepted vs rate-limited vs filtered event volumes.
Requires scope org:read.
Known gotchas
Omitting groupBy returns a 400.
statsPeriod overrides start/end if both are supplied.
This measures event VOLUME/outcomes, not error contents — use project events / Discover APIs for actual error data.
Don't poll this in a tight loop — Sentry rate limits by caller identity and recommends webhooks for push-style updates (https://docs.sentry.io/api/ratelimits/).
Verified against https://docs.sentry.io/api/organizations/retrieve-event-counts-for-an-organization-v2/ on 2026-08-04.
Give your agent this knowledge — and 16,400+ more routes
One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?