v1

latestOpenAPI 3.0.3Apache 2.02026-07-142201861.5 MB
Releases

Retrieve Release Health Session Statistics

Returns a time series of release health session statistics for projects bound to an organization.

The interval and date range are subject to certain restrictions and rounding rules.

The date range is rounded to align with the interval, and is rounded to at least one hour. The interval can at most be one day and at least one hour currently. It has to cleanly divide one day, for rounding reasons.

Because of technical limitations, this endpoint returns at most 10000 data points. For example, if you select a 90 day window grouped by releases, you will see at most floor(10k / (90 + 1)) = 109 releases. To get more results, reduce the statsPeriod.

get/api/0/organizations/{organization_id_or_slug}/sessions/

Path parameters

organization_id_or_slugstring required

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

Query parameters

fieldstring[] required

The list of fields to query.

The available fields are

  • sum(session)
  • count_unique(user)
  • avg, p50, p75, p90, p95, p99, max applied to session.duration. For example, p99(session.duration). Session duration is no longer being recorded as of on Jan 12, 2023. Returned data may be incomplete.
  • crash_rate, crash_free_rate applied to user or session. For example, crash_free_rate(user)
startstring date-time

The start of the period of time for the query, expected in ISO-8601 format. For example, 2001-12-14T12:34:56.7890.

endstring date-time

The end of the period of time for the query, expected in ISO-8601 format. For example, 2001-12-14T12:34:56.7890.

environmentstring[]

The name of environments to filter by.

statsPeriodstring

The period of time for the query, will override the start & end parameters, a number followed by one of:

  • d for days
  • h for hours
  • m for minutes
  • s for seconds
  • w for weeks

For example, 24h, to mean query data starting from 24 hours ago to now.

The IDs or slugs of projects to filter by. Project slugs are unique within each organization. Omit this parameter to include all accessible projects. -1 is also accepted to include all accessible projects. For example, the following are valid parameters:

  • /?project=1234&project=56789
  • /?project=android&project=javascript-react
  • /?project=-1
per_pageinteger

The number of groups to return per request.

intervalstring

Resolution of the time series, given in the same format as statsPeriod.

The default and the minimum interval is 1h.

groupBystring[]

The list of properties to group by.

The available groupBy conditions are project, release, environment and session.status.

orderBystring

An optional field to order by, which must be one of the fields provided in field. Use - for descending order, for example, -sum(session)

includeTotalsinteger

Specify 0 to exclude totals from the response. The default is 1

includeSeriesinteger

Specify 0 to exclude series from the response. The default is 1

querystring

Filters results by using query syntax.

Example: query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)

Response

startstring date-time required
endstring date-time required
intervalsstring[] required
querystring required