123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- {
- "get": {
- "tags": ["Releases"],
- "description": "Returns a time series of release health session statistics for projects bound to an organization.\n\nThe interval and date range are subject to certain restrictions and rounding rules.\n\nThe 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.",
- "operationId": "Retrieve Release Health Session Statistics",
- "parameters": [
- {
- "name": "organization_slug",
- "in": "path",
- "description": "The slug of the organization.",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "project",
- "in": "query",
- "description": "The ID of the projects to filter by.\n\nUse `-1` to include all accessible projects.",
- "required": true,
- "schema": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "style": "form",
- "explode": true
- },
- {
- "name": "field",
- "in": "query",
- "description": "The list of fields to query.\n\nThe available fields are `sum(session)`, `count_unique(user)`, and the following functions applied to the `session.duration` metric: `avg`, `p50`, `p75`, `p90`, `p95`, `p99` and `max`.\n\nFor example, `p99(session.duration)`.",
- "required": true,
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "style": "form",
- "explode": true
- },
- {
- "name": "environment",
- "in": "query",
- "description": "The name of environments to filter by.",
- "required": false,
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "style": "form",
- "explode": true
- },
- {
- "name": "groupBy",
- "in": "query",
- "description": "The list of properties to group by.\n\nThe available groupBy conditions are `project`, `release`, `environment` and `session.status`.",
- "required": false,
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "style": "form",
- "explode": true
- },
- {
- "name": "query",
- "in": "query",
- "description": "A free-form query that is applied as a filter.\n\nAn example query could be `release:\"1.1.0\" or release:\"1.2.0\"`.",
- "required": false,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "statsPeriod",
- "in": "query",
- "description": "This defines the range of the time series, relative to now.\n\nThe range is given in a `\"<number><unit>\"` format.\n\nFor example `1d` for a one day range. Possible units are `m` for minutes, `h` for hours, `d` for days and `w` for weeks.\n\nIt defaults to `90d`.",
- "required": false,
- "schema": {"type": "string"}
- },
- {
- "name": "interval",
- "in": "query",
- "description": "This is the resolution of the time series, given in the same format as `statsPeriod`.\n\nThe default resolution is `1h` and the minimum resolution is currently restricted to `1h` as well.\n\nIntervals larger than `1d` are not supported, and the interval has to cleanly divide one day.",
- "required": false,
- "schema": {"type": "string"}
- },
- {
- "name": "statsPeriodStart",
- "in": "query",
- "description": "This defines the start of the time series range, in the same format as the `interval`, relative to now.",
- "required": false,
- "schema": {"type": "string"}
- },
- {
- "name": "statsPeriodEnd",
- "in": "query",
- "description": "This defines the end of the time series range, in the same format as the `interval`, relative to now.",
- "required": false,
- "schema": {"type": "string"}
- },
- {
- "name": "start",
- "in": "query",
- "description": "This defines the start of the time series range as an explicit datetime.",
- "required": false,
- "schema": {"type": "string", "format": "date-time"}
- },
- {
- "name": "end",
- "in": "query",
- "description": "This defines the inclusive end of the time series range as an explicit datetime.",
- "required": false,
- "schema": {"type": "string", "format": "date-time"}
- }
- ],
- "responses": {
- "200": {
- "description": "Time-series Session Statistics.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "../../components/schemas/sessions.json#/Sessions"
- },
- "example": {
- "start": "2021-02-01T00:00:00Z",
- "end": "2021-02-04T00:00:00Z",
- "intervals": [
- "2021-02-01T00:00:00Z",
- "2021-02-02T00:00:00Z",
- "2021-02-03T00:00:00Z"
- ],
- "groups": [
- {
- "by": {"session.status": "healthy"},
- "totals": {"sum(session)": 1715553},
- "series": {"sum(session)": [683772, 677788, 353993]}
- },
- {
- "by": {"session.status": "abnormal"},
- "totals": {"sum(session)": 0},
- "series": {"sum(session)": [0, 0, 0]}
- },
- {
- "by": {"session.status": "crashed"},
- "totals": {"sum(session)": 383},
- "series": {"sum(session)": [33, 26, 324]}
- },
- {
- "by": {"session.status": "errored"},
- "totals": {"sum(session)": 1565},
- "series": {"sum(session)": [163, 201, 1201]}
- }
- ]
- }
- }
- }
- },
- "400": {
- "description": "Wrong Parameters",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "../../components/schemas/error.json#/ApiError"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized"
- },
- "403": {
- "description": "Forbidden"
- }
- },
- "security": [
- {
- "auth_token": ["org: read"]
- }
- ]
- }
- }
|