Retrieve Event Counts for a Project

GET /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/stats/

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. This endpoint may change in the future without notice.

Path Parameters

organization_id_or_slug (string)
REQUIRED

The ID or slug of the organization the resource belongs to.

project_id_or_slug (string)
REQUIRED

The ID or slug of the project the resource belongs to. Project slugs are unique within each organization.

Query Parameters:

stat (string)
choices:
  • blacklisted
  • generated
  • received
  • rejected

The name of the stat to query. Defaults to received.

since (number)

A UNIX timestamp (in seconds) that sets the start of the query range.

until (number)

A UNIX timestamp (in seconds) that sets the end of the query range.

resolution (string)
choices:
  • 10s
  • 1d
  • 1h

An explicit time series resolution.

Scopes

<auth_token> requires one of the following scopes:
  • project:admin
  • project:read
  • project:write
Copied
curl https://sentry.io/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/stats/ \
 -H 'Authorization: Bearer <auth_token>'
RESPONSESCHEMA
Copied
[ [ 1541455200, 1184 ], [ 1541458800, 1410 ], [ 1541462400, 1440 ], [ 1541466000, 1682 ], [ 1541469600, 1203 ], [ 1541473200, 497 ], [ 1541476800, 661 ], [ 1541480400, 1481 ], [ 1541484000, 678 ], [ 1541487600, 1857 ], [ 1541491200, 819 ], [ 1541494800, 1013 ], [ 1541498400, 1883 ], [ 1541502000, 1450 ], [ 1541505600, 1102 ], [ 1541509200, 1317 ], [ 1541512800, 1017 ], [ 1541516400, 813 ], [ 1541520000, 1189 ], [ 1541523600, 496 ], [ 1541527200, 1936 ], [ 1541530800, 1405 ], [ 1541534400, 617 ], [ 1541538000, 1533 ] ]
Was this helpful?