Project: Sentry (Observability and Analysis / Observability)
File: api.md

Host: https://sentry.io/api/0 Authors. @cmanallen @joshferge How to read this document. This document is structured by resource with each resource having actions that can be performed against it. Every action that either accepts a request or returns a response WILL document the full interchange format. Clients may opt to restrict response data or provide a subset of the request data. The API may or may not accept partial payloads. Parameters field (optional, string) environment (optional, string) project (optional, string) sort (optional, string) Default: -startedAt Members: + projectId + -projectId + startedAt + -startedAt + finishedAt + -finishedAt + duration + -duration + countErrors + -countErrors statsPeriod (optional, string) - A positive integer suffixed with a unit type. Default: 7d Members: + s + m + h + d + w start (optional, string) - ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) end (optional, string) - ISO 8601 format. Required if `start` is set. per_page (optional, number) Default: 10 offset (optional, number) Default: 0 query (optional, string) - Search query with space-separated field/value pairs. ie: `?query=count_errors:>2 AND duration:<1h`. queryReferrer(optional, string) - Specify the page which this query is being made from. Some fields in the API response have their own dedicated parameters, or are otherwide not supported in the `query` param. They are: | Response Field | Parameter | | - | | | `environment` | `?environment=` | | `project_id` | `?project=` | | `started_at` | `?start=` | | `finished_at` | `?end=` | | `user.display_name` | - | You can use the following aliases to query for fields that are plural in the API response: | Response Field | Search Alias | | -- | -- | | `errorids` | `errorid` | | `releases` | `release` | | `traceids` | `trace` & `traceid` | | `urls` | `url` | Additionally, you can filter by these hidden fields. | Field | Type | Description | | -- | - | -- | | click.alt | string | The alt attribute of the HTML element. | | click.class | array[string] | An array of HTML element classes. | | click.id | string | The ID of an HTML element. | | click.label | string | The aria-label attribute of an HTML element. | | click.component_name | string | The value of the data-sentry-component attribute. | | click.role | string | The role of an HTML element. | | click.tag | string | Valid HTML5 tag name. | | click.testid | string | The data-testid of an HTML element. (omitted from public docs) | | click.textContent | string | The text-content of an HTML element. | | click.title | string | The title attribute of an HTML element. | | click.selector | string | A valid CSS selector. | | dead.selector | string | A valid CSS selector. | | rage.selector | string | A valid CSS selector. | Retrieve a collection of replays. Attributes | Column | Type | Description | | -- | -- | | | activity | number | - | | browser.name | optional[string] | - | | browser.version | optional[string] | - | | countdeadclicks | number | The number of dead clicks present in the replay. | | countrageclicks | number | The number of rage clicks present in the replay. | | count_errors | number | The number of errors associated with the replay. | | count_segments | number | The number of segments that make up the replay. | | count_urls | number | The number of urls visited in the

| | device.brand | optional[string] | - | | device.family | optional[string] | - | | device.model | optional[string] | Same search field as Events | | device.name | optional[string] | - | | dist | optional[string] | - | | duration | number | Difference of `finishedAt` and `startedAt` in seconds. | | environment | optional[string] | - | | error_ids | array[string] | - | | finished_at | string | The latest timestamp received. | | has_viewed | bool | True if the authorized user has viewed the replay. | | id | string | The ID of the Replay instance. | | is_archived | bool | Whether the replay was deleted or not. | | os.name | optional[string] | - | | os.version | optional[string] | - | | platform | string | - | | project_id | string | - | | releases | array[string] | Same search field as Events | | sdk.name | string | - | | sdk.version | string | - | | startedat | string | The **earliest** replaystart_timestamp received. | | tags | object[string, array[string]] | - | | trace_ids | array[string] | Same search field as Events | | urls | array[string] | - | | user.display_name | optional[string] | - | | user.email | optional[string] | - | | user.id | optional[string] | - | | user.ip | optional[string] | Same search field as Events | | user.username | optional[string] | - | Response 200 ```json { "data": [ { "activity": 5, "browser": { "name": "Chome", "version": "103.0.38" }, "countdeadclicks": 6, "countrageclicks": 1, "count_errors": 1, "count_segments": 0, "count_urls": 1, "device": { "brand": "Apple", "family": "iPhone", "model": "11", "name": "iPhone 11" }, "dist": null, "duration": 576, "environment": "production", "error_ids": ["7e07485f-12f9-416b-8b14-26260799b51f"], "finished_at": "2022-07-07T14:15:33.201019", "has_viewed": true, "id": "7e07485f-12f9-416b-8b14-26260799b51f", "is_archived": false, "os": { "name": "iOS", "version": "16.2" }, "platform": "Sentry", "project_id": "639195", "releases": ["version@1.4"], "sdk": { "name": "Thundercat", "version": "27.1" }, "started_at": "2022-07-07T14:05:57.909921", "tags": { "hello": ["world", "Lionel Richie"] }, "trace_ids": ["7e07485f-12f9-416b-8b14-26260799b51f"], "urls": ["/organizations/abc123/issues"], "user": { "display_name": "John Doe", "email": "john.doe@example.com", "id": "30246326", "ip": "213.164.1.114", "username": "John Doe" } } ] } ``` Parameters field (optional, string) Retrieve a single replay instance. Response 200 ```json { "data": { "activity": 5, "browser": { "name": "Chome", "version": "103.0.38" }, "countdeadclicks": 6, "countrageclicks": 1, "count_errors": 1, "count_segments": 0, "count_urls": 1, "device": { "brand": "Apple", "family": "iPhone", "model": "11", "name": "iPhone 11" }, "dist": null, "duration": 576, "environment": "production", "error_ids": ["7e07485f-12f9-416b-8b14-26260799b51f"], "finished_at": "2022-07-07T14:15:33.201019", "has_viewed": false, "id": "7e07485f-12f9-416b-8b14-26260799b51f", "os": { "name": "iOS", "version": "16.2" }, "platform": "Sentry", "project_id": "639195", "releases": ["version@1.4"], "sdk": { "name": "Thundercat", "version": "27.1" }, "started_at": "2022-07-07T14:05:57.909921", "tags": { "hello": ["world", "Lionel Richie"] }, "trace_ids": ["7e07485f-12f9-416b-8b14-26260799b51f"], "urls": ["/organizations/abc123/issues"], "user": { "display_name": "John Doe", "email": "john.doe@example.com", "id": "30246326", "ip": "213.164.1.114", "username": "John Doe" } } } ``` Deletes a replay instance. Response 204 This resource does not accept any URI parameters and is not paginated. Responses are ingested whole. Parameters timestamp (optional, number) - A UNIX timestamp (seconds since epoch) marking the last moment to render a replay for accessibility analysis. Retrieve a collection of accessibility issues. Attributes Issue Type: | Column | Type | Description | | | - | | | elements | array[IssueElement] | Array of elements matching the accessibility

| | help | string | - | | help_url | string | - | | id | string | - | | impact | Optional[enum[string]] | One of: 'minor', 'moderate', 'serious', 'critical' | | timestamp | number | - | IssueElement Type: | Column | Type | Description | | | | | | alternatives | array[IssueElementAlternative] | Array of solutions which could solve the problem. | | element | string | Array of elements matching the accessibility issue. | | target | array[string] | Array of elements matching the accessibility issue. | IssueElementAlternative Type: | Column | Type | Description | | - | | - | | id | string | String ID of the accessibility issue. | | message | string | Message explaining the problem. | Response 200 Headers X-Hits=1 Body ```json { "data": [ [ { "elements": [ { "alternatives": [ { "id": "button-has-visible-text", "message": "Element does not have inner text that is visible to screen readers" }, { "id": "aria-label", "message": "aria-label attribute does not exist or is empty" }, { "id": "aria-labelledby", "message": "aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty" }, { "id": "non-empty-title", "message": "Element has no title attribute" }, { "id": "presentational-role", "message": "Element's default semantics were not overridden with role=\"none\" or role=\"presentation\"" } ], "element": "<button class=\"svelte-19ke1iv\">", "target": ["button:nth-child(1)"] } ], "help_url": "https://dequeuniversity.com/rules/axe/4.8/button-name?application=playwright", "help": "Buttons must have discernible text", "id": "button-name", "impact": "critical", "timestamp": 1695967678108 } ] ] } ``` Parameters project (optional, string) sort (optional, string) Default: -countdeadclicks Members: countdeadclicks -countdeadclicks countrageclicks -countrageclicks statsPeriod (optional, string) - A positive integer suffixed with a unit type. Default: 7d Members: s m h d w start (optional, string) - ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) end (optional, string) - ISO 8601 format. Required if `start` is set. per_page (optional, number) Default: 10 offset (optional, number) Default: 0 Retrieve a collection of selectors. Attributes | Column | Type | Description | | - | - | -- | | countdeadclicks | number | The number of dead clicks for a given DOM element. | | countrageclicks | number | The number of rage clicks for a given DOM element. | | dom_element | string | - | | element.alt | string | - | | element.aria_label | string | - | | element.class | array[string] | - | | element.component_name | string | - | | element.id | string | - | | element.role | string | - | | element.tag | string | - | | element.testid | string | - | | element.title | string | - | | project_id | string | - | Response 200 ```json { "data": [ { "countdeadclicks": 2, "countrageclicks": 1, "dom_element": "div#myid.class1.class2", "element": { "alt": "", "aria_label": "", "class": ["class1", "class2"], "component_name": "", "id": "myid", "role": "", "tag": "div", "testid": "", "title": "" }, "project_id": "1" } ] } ``` Parameters per_page cursor download - Instruct the API to return a streaming json response Retrieve a collection of replay recording-segments. | Column | Type | Description | | | | -- | | replayId | string | - | | segmentId | number | - | | projectId | string | - | | dateAdded | string | - | Without download query argument Response 200 ```json { "data": [ { "replayId": "7e07485f-12f9-416b-8b14-26260799b51f", "segmentId": 0, "projectId": "409512", "dateAdded": "2022-07-07T14:15:33.201019" } ] } ``` With download query argument, rrweb events JSON Response 200 Content-Type application/json ```json [ [ {"type":4, "data":{"href":"https://example.com", "width":1500, "height":1200}}, {...} ], [ {...} ] ] ``` Parameters download - Instruct the API to return a streaming bytes response. Retrieve a single replay recording-segment. Without download query argument. Response 200 ```json { "data": { "replayId": "7e07485f-12f9-416b-8b14-26260799b51f", "segmentId": 0, "projectId": 409512, "dateAdded":

} } ``` With download query argument. Response 200 Content-Type application/octet-stream Returns the bytes of a replay-segment video. Response 200 ``` \x00\x00\x00 ``` Retrieve a collection of tag keys associated with the replays dataset. | Column | Type | Description | | -- | | -- | | key | string | - | | name | string | - | | totalValues | number | - | Response 200 ```json [ { "key": "plan.total_members", "name": "Plan.Total Members", "totalValues": 630661 } ] ``` Retrieve a collection of tag values associated with a tag key on the replays dataset. | Column | Type | Description | | | | -- | | key | string | - | | name | string | - | | value | string | - | | count | number | - | | lastSeen | string | - | | firstSeen | string | - | Response 200 ```json [ { "key": "plan", "name": "am1_team", "value": "am1_team", "count": 66880, "lastSeen": "2022-12-09T19:39:53Z", "firstSeen": "2022-11-25T19:40:39Z" } ] ``` Parameters: | Parameter | Type | Default | Description | | | | - | -- | | per_page | number | 100 | | | offset | number | 0 | | | query | string | 0 | Space-separated string of field, value pairs | Queryable fields: | Field | Type | Description | | -- | - | -- | | click.alt | string | The alt attribute of the HTML element. | | click.class | array[string] | An array of HTML element classes. | | click.id | string | The ID of an HTML element. | | click.label | string | The aria-label attribute of an HTML element. | | click.component_name | string | The value of the data-sentry-component attribute. | | click.role | string | The role of an HTML element. | | click.selector | string | A valid CSS selector. | | click.tag | string | Valid HTML5 tag name. | | click.testid | string | The data-testid of an HTML element. (omitted from public docs) | | click.textContent | string | The text-content of an HTML element. | | click.title | string | The title attribute of an HTML element. | Queryable fields for rage and dead clicks: | Field | Type | Description | | - | | | | dead.selector | string | A valid CSS selector. | | rage.selector | string | A valid CSS selector. | Retrieve a collection of click events associated with a replay. | Column | Type | Description | | | | | | node_id | number | RRWeb node id. | | timestamp | number | Unix timestamp of click event. | Response 200 ```json { "data": [ { "node_id": 339, "timestamp": 1681226444 } ] } ``` | Column | Type | Description | | | -- | -- | | viewed_by | array[User] | An array of user types who have viewed the replay. | Response 200 ```json { "data": { "viewed_by": [ { "id": "884411", "name": "some.body@sentry.io", "username": "d93522a35cb64c13991104bd73d44519", "email": "some.body@sentry.io", "avatarUrl": "https://gravatar.com/avatar/d93522a35cb64c13991104bd73d44519d93522a35cb64c13991104bd73d44519?s=32&d=mm", "isActive": true, "hasPasswordAuth": false, "isManaged": false, "dateJoined": "2022-07-25T23:36:29.593212Z", "lastLogin": "2024-03-14T18:11:28.740309Z", "has2fa": true, "lastActive": "2024-03-15T22:22:06.925934Z", "isSuperuser": true, "isStaff": false, "experiments": {}, "emails": [ { "id": "2231333", "email": "some.body@sentry.io", "is_verified": true } ], "avatar": { "avatarType": "upload", "avatarUuid": "499dcd0764da42a589654a2224086e67", "avatarUrl": "https://sentry.io/avatar/499dcd0764da42a589654a2224086e67/" }, "type": "user" } ] } } ``` A POST request is issued with no body. The URL and authorization context is used to construct a new viewed replay entry. Request Headers Cookie: \_ga=GA1.2.17576183... Response 204