Retrieve Event Counts for a Project

GET /api/0/projects/{organization_slug}/{project_slug}/stats/

Caution

This endpoint may change in the future without notice.

Return a set of points representing a normalized timestamp and the number of events seen in the period.

Query ranges are limited to Sentry’s configured time-series resolutions.

Path Parameters:
  • organization_slug (string) – the slug of the organization.
  • project_slug (string) – the slug of the project.
Query Parameters:
  • stat (string) – the name of the stat to query ("received", "rejected", "blacklisted", generated)
  • since (timestamp) – a timestamp to set the start of the query in seconds since UNIX epoch.
  • until (timestamp) – a timestamp to set the end of the query in seconds since UNIX epoch.
  • resolution (string) – an explicit resolution to search for (eg: 10s). This should not be used unless you are familiar with Sentry’s internals as it’s restricted to pre-defined values.
Authentication:

required

Method:

GET

Path:

/api/0/projects/{organization_slug}/{project_slug}/stats/

Example

GET /api/0/projects/the-interstellar-jurisdiction/pump-station/stats/ HTTP/1.1
Authorization: Basic ___ENCODED_API_KEY___
Host: app.getsentry.com
HTTP/1.1 401 UNAUTHORIZED
Allow: GET, HEAD, OPTIONS
Content-Language: en
Content-Length: 27
Content-Type: application/json
Vary: Accept-Language, Cookie
Www-Authenticate: xBasic realm="api"
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block

{
  "detail": "Invalid token"
}