Query Discover Events in Table Format

Go to Product

Retrieves discover (also known as events) data for a given organization.

Eventsv2 Deprecation Note: Users who may be using the eventsv2 endpoint should update their requests to the events endpoint outline in this document. The eventsv2 endpoint is not a public endpoint and has no guaranteed availability. If you are not making any API calls to eventsv2, you can safely ignore this. Changes between eventsv2 and events include:

  • Field keys in the response now match the keys in the requested field param exactly.
  • The meta object in the response now shows types in the nested field object.

Aside from the url change, there are no changes to the request payload itself.

Note: This endpoint is intended to get a table of results, and is not for doing a full export of data sent to Sentry.

The field query parameter determines what fields will be selected in the data and meta keys of the endpoint response.

  • The data key contains a list of results row by row that match the query made
  • The meta key contains information about the response, including the unit or type of the fields requested

Options

Organization Id or Slug
The ID or slug of the organization the resource belongs to.
Field

The fields, functions, or equations to request for the query. At most 20 fields can be selected per request. Each field can be one of the following types:

  • A built-in key field. See possible fields in the properties table, under any field that is an event property.
    • example: field=transaction
  • A tag. Tags should use the tag[] formatting to avoid ambiguity with any fields
    • example: field=tag[isEnterprise]
  • A function which will be in the format of function_name(parameters,...). See possible functions in the query builder documentation.
    • when a function is included, Discover will group by any tags or fields
    • example: field=count_if(transaction.duration,greater,300)
  • An equation when prefixed with equation|. Read more about equations here.
    • example: field=equation|count_if(transaction.duration,greater,300) / count() * 100
End (*)
The end of the period of time for the query, expected in ISO-8601 format. For example 2001-12-14T12:34:56.7890.
Environment (*)
The name of environments to filter by.
Project (*)

The IDs of projects to filter by. -1 means all available projects. For example the following are valid parameters:

  • /?project=1234&project=56789
  • /?project=-1
Start (*)
The start of the period of time for the query, expected in ISO-8601 format. For example 2001-12-14T12:34:56.7890.
Stats Period (*)

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.

Per Page (*)
Limit the number of rows to return in the result. Default and maximum allowed is 100.
Query (*)

Filters results by using query syntax.

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

Sort (*)
What to order the results of the query by. Must be something in the field list, excluding equations.
Result Format

Specify how the response should be mapped to the table output. The following formats are available:

Structured Table: Returns a parsed table with data split into rows and columns.

  • Data:
  • Meta:

Raw Response: Returns the raw response in a single row with the following columns:

  • body: Response body
  • status: HTTP status code

Input Ports

Icon
Configuration data.

Output Ports

Icon
Result of the request depending on the selected Result Format.
Icon
Configuration data (this is the same as the input port; it is provided as passthrough for sequentially chaining nodes to declutter your workflow connections).

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.