v1

latestOpenAPI 3.0.3Apache 2.02026-07-142201861.5 MB
Discover

Edit an Organization's Discover Saved Query

Modify a saved query.

put/api/0/organizations/{organization_id_or_slug}/discover/saved/{query_id}/

Path parameters

organization_id_or_slugstring required

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

query_idinteger required

The ID of the Discover query you'd like to retrieve.

Request body

namestring required

The user-defined saved query name.

projectsinteger[]

The saved projects filter for this query.

queryDataset'discover' | 'error-events' | 'transaction-like'

The dataset you would like to query. Note: discover is a deprecated value. The allowed values are: error-events, transaction-like

  • discover
  • error-events
  • transaction-like
startstring date-time nullable

The saved start time for this saved query.

endstring date-time nullable

The saved end time for this saved query.

rangestring nullable

The saved time range period for this saved query.

fieldsstring[] nullable

The fields, functions, or equations that can be requested 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
orderbystring nullable

How to order the query results. Must be something in the field list, excluding equations.

environmentstring[] nullable

The name of environments to filter by.

querystring nullable

Filters results by using query syntax.

yAxisstring[] nullable

Aggregate functions to be plotted on the chart.

displaystring nullable

Visualization type for saved query chart. Allowed values are:

  • default
  • previous
  • top5
  • daily
  • dailytop5
  • bar
topEventsinteger nullable

Number of top events' timeseries to be visualized.

intervalstring nullable

Resolution of the time series.

Response

environmentstring[]
querystring
fieldsstring[]
widthsstring[]
conditionsstring[]
aggregationsstring[]
rangestring
startstring
endstring
orderbystring
limitstring
yAxisstring[]
displaystring
topEventsinteger
intervalstring
exploreQueryobject
idstring required
namestring required
projectsinteger[] required
versioninteger required
queryDatasetstring required
datasetSourcestring required
expiredboolean required
dateCreatedstring required
dateUpdatedstring required