Update an exploration

Update an exploration's name, chart, queries or variables, or a funnel's steps. Send only the fields you want to change. A funnel accepts the same fields as any other exploration, with one funnel_query in queries. A changed funnel is counted before it's saved, and counted again after a change to its range or chart type. The response has the same funnel_preview as creating one, or null when nothing was counted, such as after a rename. To change a funnel's steps, send queries with its one funnel_query and the full steps list, written as on create. Check each step's count in meta.funnel_preview afterwards.

PATCH https://telemetry.betterstack.com/api/v3/explorations/{id}
id string required

The ID of the exploration to update.

team_id string

Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

name string

Exploration name. Until you name the exploration, a name generated from its query is returned. The chart is named after the exploration, so you never send a chart name.

date_range_from string

Start of the default date range, such as now-3h. A funnel's range starts at now-7d by default. Once set, it can't be cleared.

date_range_to string

End of the default date range, such as now. Once set, it can't be cleared.

exploration_group_id string or null

Group this exploration belongs to. Send null or "0" to remove it from its group.

chart object

Chart settings. chart_type is required on create. A funnel's settings accept funnel_unit_name, the word the chart counts in. The chart is always placed at x: 0, y: 0, w: 12, h: 10, and its name comes from the exploration's name. Returned without an id.

chart.chart_type string

Chart type. A funnel chart can only be switched to a funnel trend chart, which shows the funnel over time, and back.
Valid values:
line_chart: Accepts sql_expression and tail_query queries.
table_chart: Accepts sql_expression queries.
bar_chart: Accepts sql_expression and tail_query queries.
number_chart: Accepts sql_expression and tail_query queries.
heatmap_chart: Accepts sql_expression queries.
anomalies_chart: Accepts tail_query queries.
pie_chart: Accepts sql_expression queries.
scatter_chart: Accepts sql_expression queries.
gauge_chart: Accepts sql_expression and tail_query queries.
tail_chart: Accepts tail_query queries.
static_text_chart: Accepts a static_text query.
map_chart: Accepts sql_expression queries.
text_chart: Accepts sql_expression and tail_query queries.
funnel_chart: Accepts a funnel_query query.
funnel_trend_chart: Accepts a funnel_query query.
hierarchy_chart: Accepts sql_expression queries.

chart.description string or null

The chart's description, or null when it has none.

chart.settings object

Display settings for the chart type, such as unit, axes, legend, stacking and decimal places. An update changes only the settings it sends and keeps the others. A setting sent as null is removed, and settings sent as null empties them. An object inside the settings, such as series_colors, changes the same way, and a list, such as series_order, is replaced whole.

chart.settings.unit string

Unit the values are shown in, such as percent, bytes or ms. Table charts use column_units instead.

chart.settings.custom_unit boolean

Whether unit is your own suffix, shown after the value as written and never scaled.

chart.settings.decimal_places integer

Number of decimal places shown.

chart.settings.time_column string

Column on the X axis, time by default. For a category bar chart it's the grouping column.

chart.settings.x_axis_type string

How the X axis is read. Usually time, value or category.

chart.settings.y_axis_type string

How the Y axis of a scatter chart is read. Usually value or category.

chart.settings.series_column string

Column that splits the data into series. On a heatmap it's the Y axis column.

chart.settings.value_columns array of strings

Result columns that hold the values to chart.

chart.settings.point_size_column string

Column that sets each point's size on a scatter chart.

chart.settings.location_column string

Column holding the location on a map chart.

chart.settings.location_label string

What a map chart's tooltip names, either the closest city or country or the value as sent. Usually automatic or original_value.

chart.settings.label_column string

Column that names each hexagon on a hierarchy chart.

chart.settings.group_by_columns array of strings

Up to two columns a hierarchy chart groups its hexagons by.

chart.settings.palette string

Color scale of a hierarchy chart. Usually green_to_red or red_to_green.

chart.settings.min_value number

Lowest value of a hierarchy chart's color scale.

chart.settings.max_value number

Highest value of a hierarchy chart's color scale.

chart.settings.link_template string

Link a hierarchy chart opens when you click a hexagon, with {{column}} placeholders.

chart.settings.y_axis_min number

Lowest value on the Y axis.

chart.settings.y_axis_max number

Highest value on the Y axis.

chart.settings.y_axis_auto_range string

How a line chart fits its Y axis when no bounds are set. Usually include_zero or fit_data.

chart.settings.y_axis_scale string

Scale of the Y axis. Usually linear or log.

chart.settings.min number

Lower bound of a gauge.

chart.settings.max number

Upper bound of a gauge, the goal value.

chart.settings.treat_missing_values string

How gaps in the data are drawn. Usually connected, disconnected, zero or previous.

chart.settings.stacking string

How series are stacked. Usually dont_stack, stack or stack_to_100.

chart.settings.orientation string

Direction of the bars on a bar chart. Usually vertical or horizontal.

chart.settings.legend string

Where the legend is shown. Usually hidden, shown_below, shown_below_with_statistics or shown_right.

chart.settings.series_colors object

Color of each series, keyed by its series_name, as a hex color such as #22c55e. Keys are yours to choose. Each value is a string.

chart.settings.series_order array of strings

Order the series are shown in, by name.

chart.settings.show_previous_period boolean

Whether a line chart also shows the previous period.

chart.settings.color_mode string

How a number chart colors its value. Usually auto, high_green, high_red or specific_words.

chart.settings.color_upper_threshold number

Upper threshold of a number chart's colors.

chart.settings.color_lower_threshold number

Lower threshold of a number chart's colors.

chart.settings.color_green_words string

Values a number chart shows in green, separated by commas.

chart.settings.color_yellow_words string

Values a number chart shows in yellow, separated by commas.

chart.settings.color_red_words string

Values a number chart shows in red, separated by commas.

chart.settings.column_units object

Unit of each table column, by column name. Keys are yours to choose. Each value is an object with unit and custom_unit.

chart.settings.column_units.<key>.unit string

Unit the column's values are shown in, such as auto, percent or bytes.

chart.settings.column_units.<key>.custom_unit boolean

Whether unit is your own suffix, shown after the value as written and never scaled.

chart.settings.percentage_highlight_columns array of strings

Table columns holding ratios from 0 to 1, shown with a bar.

chart.settings.series_unit string

Unit of a heatmap's Y axis labels.

chart.settings.series_custom_unit boolean

Whether series_unit is your own suffix.

chart.settings.heatmap_color_mode string

How a heatmap colors its cells. Usually gradient or categorized.

chart.settings.value_categories object

Label and color of each cell value of a categorized heatmap. Keys are yours to choose. Each value is an object with label and color.

chart.settings.value_categories.<key>.label string

Text shown for the value.

chart.settings.value_categories.<key>.color string

Color of the cells with the value, as a hex color such as #22c55e.

chart.settings.column_widths object

Width of each table column, by column name, as the chart editor saves it. Keys are yours to choose. Each value is a number.

chart.settings.table_width integer

Width of the table the column_widths were saved for.

chart.settings.guessed_series_colors object

Colors the chart picked for its series, keyed by series_name. Keys are yours to choose. Each value is a string.

chart.settings.label string

A legend placement the chart editor saves next to legend, such as shown_below. Charts ignore it and place the legend by legend.

chart.settings.text string

Markdown text of a text chart.

chart.settings.rowTemplates object

Live tail row format of each source, by source ID. Keys are yours to choose. Each value is a string.

chart.settings.sampling integer

Percentage of data the chart samples.

chart.settings.fresh boolean

Whether the chart skips cached results.

chart.settings.funnel_unit_name string

Word a funnel chart counts in, such as people.

chart.settings.filtered_series array of strings

Series the chart shows, by name.

chart.settings.filtered_releases array of strings

Releases the chart shows.

chart.settings.force_source_series boolean

Whether the chart shows one series per source.

chart.settings.treat_zero_values string

How zero values are drawn, keep or drop_disconnected. Defaults to keep.

chart.settings.projection string

Map projection of a map chart, such as mercator.

chart.settings.published_format string

Format a published chart is served in, json by default.

chart.settings.published_cache_for integer

Seconds a published chart's results are cached, 3 by default.

chart.settings.y_axis_annotations array of objects

Horizontal lines drawn at values on the Y axis, each with a label and color.

chart.settings.y_axis_annotations[].value number

The Y axis value the line is drawn at.

chart.settings.y_axis_annotations[].label string

Text shown next to the line.

chart.settings.y_axis_annotations[].color string

The line's color, as a hex color such as #22c55e. Left out, the line is gray.

chart.settings.x_axis_annotations array of objects

Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it.

chart.settings.x_axis_annotations[].value string

The X axis value the line is drawn at, a time or a number.

chart.settings.x_axis_annotations[].label string

Text shown next to the line.

chart.settings.x_axis_annotations[].color string

The line's color, as a hex color such as #22c55e. Left out, the line is gray.

queries array of objects

The chart's queries, oldest first. Updating an exploration replaces all of its queries. Each query accepts only the keys its query_type uses. A sql_expression query uses sql_query and source_variable. A tail_query uses where_condition and source_variable. A static_text query uses static_text, and a funnel_query uses funnel_query. A key another type uses, or more than one query on a chart other than line_chart, is refused.

queries[].query_type string

Query type. A read-only query can't be edited, only replaced with a writable one. Responses can also hold promql_query, promql_v2_query and promql_via_llm for queries made in the web app.
Valid values:
sql_expression: A query written in SQL. You can write it through the API.
tail_query: The filter of a tail chart. You can write it through the API.
static_text: The text of a static_text_chart. You can write it through the API.
pql_expression: A query written in PQL. Read-only.
tail_query_builder: A tail chart's query made in the query builder. Read-only.
query_builder: A query made in the query builder. Read-only.
funnel_query: A funnel's one query. You can write it through the API.

queries[].name string

The query's name.

queries[].sql_query string

The SQL the query runs. Present for sql_expression, pql_expression, query_builder, tail_query_builder and funnel_query queries, and omitted when not set. Read-only except for sql_expression.

queries[].pql_query string

The PQL the query is written in. Present only for pql_expression queries.

queries[].where_condition string

The query's filter. Present only for tail_query and tail_query_builder queries, and omitted when not set.

queries[].static_text string

The query's Markdown content. Present only for static_text queries, and omitted when not set.

queries[].source_variable string

The sources the query reads, either the name of a source variable, such as source, or source: followed by specific sources, each a table name or <source_id>:<type>, such as source:1729445:exceptions for one source's errors. Defaults to source on create.

queries[].x_axis array of objects

X-axis blocks of a query_builder or tail_query_builder query. Read-only.

queries[].x_axis[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].x_axis[].value string

The column or field the block reads, such as dt.

queries[].x_axis[].type string

The value's data type, such as datetime.

queries[].x_axis[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].x_axis[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].x_axis[].value_type string

rate to chart the value's rate of change.

queries[].x_axis[].operator string

The comparison of a filter block.

queries[].x_axis[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].x_axis[].condition_value string

The value a filter block compares against.

queries[].x_axis[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].x_axis[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].x_axis[].direction string

The sort direction of an order block, asc or desc.

queries[].x_axis[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].x_axis[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].x_axis[].schema string

The source's storage layout, row_based or column_based.

queries[].y_axis array of objects

Y-axis blocks of a query_builder or tail_query_builder query. Read-only.

queries[].y_axis[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].y_axis[].value string

The column or field the block reads, such as dt.

queries[].y_axis[].type string

The value's data type, such as datetime.

queries[].y_axis[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].y_axis[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].y_axis[].value_type string

rate to chart the value's rate of change.

queries[].y_axis[].operator string

The comparison of a filter block.

queries[].y_axis[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].y_axis[].condition_value string

The value a filter block compares against.

queries[].y_axis[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].y_axis[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].y_axis[].direction string

The sort direction of an order block, asc or desc.

queries[].y_axis[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].y_axis[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].y_axis[].schema string

The source's storage layout, row_based or column_based.

queries[].point_size array of objects

Point size blocks of a query_builder or tail_query_builder query. Read-only.

queries[].point_size[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].point_size[].value string

The column or field the block reads, such as dt.

queries[].point_size[].type string

The value's data type, such as datetime.

queries[].point_size[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].point_size[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].point_size[].value_type string

rate to chart the value's rate of change.

queries[].point_size[].operator string

The comparison of a filter block.

queries[].point_size[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].point_size[].condition_value string

The value a filter block compares against.

queries[].point_size[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].point_size[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].point_size[].direction string

The sort direction of an order block, asc or desc.

queries[].point_size[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].point_size[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].point_size[].schema string

The source's storage layout, row_based or column_based.

queries[].coordinates array of objects

Coordinate blocks of a query_builder or tail_query_builder query. Read-only.

queries[].coordinates[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].coordinates[].value string

The column or field the block reads, such as dt.

queries[].coordinates[].type string

The value's data type, such as datetime.

queries[].coordinates[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].coordinates[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].coordinates[].value_type string

rate to chart the value's rate of change.

queries[].coordinates[].operator string

The comparison of a filter block.

queries[].coordinates[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].coordinates[].condition_value string

The value a filter block compares against.

queries[].coordinates[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].coordinates[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].coordinates[].direction string

The sort direction of an order block, asc or desc.

queries[].coordinates[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].coordinates[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].coordinates[].schema string

The source's storage layout, row_based or column_based.

queries[].filters array of objects

Filter blocks of a query_builder or tail_query_builder query. Read-only.

queries[].filters[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].filters[].value string

The column or field the block reads, such as dt.

queries[].filters[].type string

The value's data type, such as datetime.

queries[].filters[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].filters[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].filters[].value_type string

rate to chart the value's rate of change.

queries[].filters[].operator string

The comparison of a filter block.

queries[].filters[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].filters[].condition_value string

The value a filter block compares against.

queries[].filters[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].filters[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].filters[].direction string

The sort direction of an order block, asc or desc.

queries[].filters[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].filters[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].filters[].schema string

The source's storage layout, row_based or column_based.

queries[].where array of objects

Where blocks of a query_builder or tail_query_builder query. Read-only.

queries[].where[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].where[].value string

The column or field the block reads, such as dt.

queries[].where[].type string

The value's data type, such as datetime.

queries[].where[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].where[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].where[].value_type string

rate to chart the value's rate of change.

queries[].where[].operator string

The comparison of a filter block.

queries[].where[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].where[].condition_value string

The value a filter block compares against.

queries[].where[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].where[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].where[].direction string

The sort direction of an order block, asc or desc.

queries[].where[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].where[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].where[].schema string

The source's storage layout, row_based or column_based.

queries[].group_by array of objects

Grouping blocks of a query_builder or tail_query_builder query. Read-only.

queries[].group_by[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].group_by[].value string

The column or field the block reads, such as dt.

queries[].group_by[].type string

The value's data type, such as datetime.

queries[].group_by[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].group_by[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].group_by[].value_type string

rate to chart the value's rate of change.

queries[].group_by[].operator string

The comparison of a filter block.

queries[].group_by[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].group_by[].condition_value string

The value a filter block compares against.

queries[].group_by[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].group_by[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].group_by[].direction string

The sort direction of an order block, asc or desc.

queries[].group_by[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].group_by[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].group_by[].schema string

The source's storage layout, row_based or column_based.

queries[].having array of objects

Having blocks of a query_builder or tail_query_builder query. Read-only.

queries[].having[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].having[].value string

The column or field the block reads, such as dt.

queries[].having[].type string

The value's data type, such as datetime.

queries[].having[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].having[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].having[].value_type string

rate to chart the value's rate of change.

queries[].having[].operator string

The comparison of a filter block.

queries[].having[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].having[].condition_value string

The value a filter block compares against.

queries[].having[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].having[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].having[].direction string

The sort direction of an order block, asc or desc.

queries[].having[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].having[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].having[].schema string

The source's storage layout, row_based or column_based.

queries[].order_by array of objects

Ordering blocks of a query_builder or tail_query_builder query. Read-only.

queries[].order_by[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].order_by[].value string

The column or field the block reads, such as dt.

queries[].order_by[].type string

The value's data type, such as datetime.

queries[].order_by[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].order_by[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].order_by[].value_type string

rate to chart the value's rate of change.

queries[].order_by[].operator string

The comparison of a filter block.

queries[].order_by[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].order_by[].condition_value string

The value a filter block compares against.

queries[].order_by[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].order_by[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].order_by[].direction string

The sort direction of an order block, asc or desc.

queries[].order_by[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].order_by[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].order_by[].schema string

The source's storage layout, row_based or column_based.

queries[].funnel_query object

A funnel's steps, session field and breakdown. Present only for funnel_query queries. An update changes only the fields you send.

queries[].funnel_query.steps array of objects

The funnel's steps in journey order, 2 to 32. An update with steps replaces every step.

queries[].funnel_query.steps[].name string

Step name shown on the chart. Defaults to Step <n>.

queries[].funnel_query.steps[].conditions string required

Live tail query that the step's events match, such as payload.meta.path="/cart".

queries[].funnel_query.session_field string

Field that ties one journey's events together. Defaults to session_id. Use user.id to follow an identified user. An empty value resets it to session_id.

queries[].funnel_query.breakdown_field string

Field each step is split by, such as contexts.browser.name. An empty value removes the breakdown.

variables array of objects

Template variables, which the queries use by name. See Query variables. An update replaces all variables, so a variable you leave out is removed, except the built-in time, start_time, end_time and source variables, which always exist. For a variable that already exists, any of default_values, sql_definition and structured_value you leave out keeps its value, unless variable_type changes, which clears them. allow_multiple_values you leave out keeps its value too. A variable sent without values gets empty values, except a source variable, which keeps its sources when you leave out both values and structured_value. sql_definition applies only to select_with_sql and multi_select_with_sql variables. allow_multiple_values is saved only for select_value and select_with_sql variables. When a variable is saved with empty values, a select_value variable gets the first of its default_values, and a string, number, boolean or sql_expression variable gets all of them. A select_with_sql variable whose sql_definition is new or changed gets the first option its SQL returns. An ISO 8601 date in a date or datetime variable is saved in values as a Unix timestamp in microseconds. A new or changed sql_definition or filter sql runs against the selected source, and the change is refused when the query fails. A source variable's values are the IDs of your sources. In a rum exploration, pick each source as its web events, <table_name>:web_events. A funnel reads one source, picked in its source variable or in source_id. A funnel's source variable that picks one source by ID reads the source as source_id does.

variables[].name string

The variable's name, used as {{name}} in queries.

variables[].variable_type string

Variable kind. A variable named source sent without variable_type is a source variable. Possible values: source, date, datetime, string, number, sql_expression, select_value, boolean, select_with_sql, multi_select_with_sql, select_predefined_sql.

variables[].values array of strings

The variable's current values as strings, or an empty array when it has none. For a source variable, these are the IDs of the selected sources.

variables[].default_values array of strings

The variable's default values as strings, or an empty array when it has none.

variables[].sql_definition string

The SQL expression whose distinct values are the options of a select_with_sql variable, such as JSONExtractString(raw, 'service'). The expression runs against the variable's source over the selected range.

variables[].structured_value object

The variable's other settings, such as the selected sources of a source variable in canonicalSourceIds and its services in serviceIds, or the saved filters of a select_predefined_sql variable. Left out when not set.

variables[].structured_value.selected_label string

Label of the selected value.

variables[].structured_value.canonicalSourceIds array of strings

Sources picked with their data type, as <source_id>:<type> such as 1729445:exceptions. Source IDs on their own, such as 1729445, go in values.

variables[].structured_value.serviceIds array of strings

Selected services of a source variable.

variables[].structured_value.filters array of objects

Saved filters, each a label and the SQL that lists its values.

variables[].structured_value.filters[].label string

The filter's label, shown in the variable's menu.

variables[].structured_value.filters[].sql string

A complete query that returns one column with the filter's options.

variables[].allow_multiple_values boolean default: false

Whether a select_value or select_with_sql variable accepts more than one value at a time.

variables[].source_ids array of strings

The IDs of the sources a source variable selects. Each must be one of your sources.

variables[].filters array of objects

The saved filters of a select_predefined_sql variable.

variables[].filters[].label string

The filter's label, shown in the variable's menu.

variables[].filters[].sql string

A complete query that returns one column with the filter's options.

variables[].selected_label string

The label of the selected filter of a select_predefined_sql variable. When not sent, the first filter is selected. A label that matches none of filters is refused.

product string

The Explore the exploration lives in. Leave it out on create to put the exploration in Telemetry's Explore. A funnel that reads only web events goes in RUM's Explore instead. Changing it moves the exploration to the other Explore.
Valid values:
telemetry: Telemetry's Explore.
rum: RUM's Explore, which reads an application's web events only.

200

Returns the updated exploration.

200 OK
{
  "data": {
    "id": "123456789",
    "type": "exploration",
    "attributes": {
      "name": "Updated Error Rate Analysis",
      "date_range_from": "now-3h",
      "date_range_to": "now",
      "exploration_group_id": "456",
      "chart": {
        "chart_type": "line_chart",
        "name": "Error Rate Analysis",
        "description": "Shows error rates across all services",
        "settings": {
          "unit": "number",
          "decimal_places": 2,
          "legend": "shown_below",
          "stacking": "dont_stack",
          "x_axis_type": "time"
        }
      },
      "queries": [
        {
          "name": "Updated Query",
          "query_type": "sql_expression",
          "sql_query": "SELECT {{time}} AS time, sum(errors) AS value FROM {{source}} WHERE dt BETWEEN {{start_time}} AND {{end_time}} GROUP BY time",
          "source_variable": "source"
        }
      ],
      "variables": [
        {
          "name": "log_level",
          "variable_type": "select_value",
          "values": [
            "error",
            "warning",
            "info"
          ],
          "default_values": [
            "error"
          ],
          "allow_multiple_values": false
        }
      ],
      "product": "rum",
      "created_at": "2026-02-20T10:00:00.000Z",
      "updated_at": "2026-02-23T14:30:00.000Z",
      "team_id": "t123",
      "team_name": "My Team"
    }
  },
  "funnel_preview": {
    "steps": [
      {
        "name": "Cart",
        "count": 200,
        "of_previous": null,
        "of_first": 1.0
      },
      {
        "name": "Purchase",
        "count": 50,
        "of_previous": 0.25,
        "of_first": 0.25
      }
    ]
  }
}
401

The API token is missing or invalid.

401 Unauthorized
{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}
403

The token is read-only, your role doesn't include Manage on Dashboards, or its scopes don't permit the action.

403 Forbidden
{
  "errors": "This API token is read-only and cannot be used for write operations."
}
404

The exploration doesn't exist, or the token can't access it.

404 Not Found
{
  "errors": "Resource with the provided ID was not found"
}
422

The new chart_type can't show the queries or doesn't support the exploration's alerts, or the request sends queries for an exploration with a read-only query type, such as PQL or query builder, without switching every such query to a writable type.

422

A rum exploration's new source variable picks a source that isn't given as its web events, or product changes to rum for an exploration that doesn't read web events only. Reported in invalid_values.variables or invalid_values.product, and nothing is changed.

422

The product attribute changes for an exploration in a group, and exploration_group_id doesn't name a group in the new Explore, or 0 for none. Each exploration group belongs to one Explore. Reported in invalid_values.exploration_group_id, and nothing is changed.

422

A funnel's chart type changes to one that isn't a funnel chart, or another exploration's to a funnel chart. Reported in invalid_values under chart.chart_type, and nothing is changed.

422

The changed funnel is refused as on create. Nothing is changed.

id string

The ID of the exploration.

type string

Always exploration.

name string

Exploration name. Until you name the exploration, a name generated from its query is returned. The chart is named after the exploration, so you never send a chart name.

date_range_from string

Start of the default date range, such as now-3h. A funnel's range starts at now-7d by default. Once set, it can't be cleared.

date_range_to string

End of the default date range, such as now. Once set, it can't be cleared.

exploration_group_id string or null

Group this exploration belongs to.

chart object

Chart settings. chart_type is required on create. A funnel's settings accept funnel_unit_name, the word the chart counts in. The chart is always placed at x: 0, y: 0, w: 12, h: 10, and its name comes from the exploration's name. Returned without an id.

chart.chart_type string

Chart type. A funnel chart can only be switched to a funnel trend chart, which shows the funnel over time, and back.
Valid values:
line_chart: Accepts sql_expression and tail_query queries.
table_chart: Accepts sql_expression queries.
bar_chart: Accepts sql_expression and tail_query queries.
number_chart: Accepts sql_expression and tail_query queries.
heatmap_chart: Accepts sql_expression queries.
anomalies_chart: Accepts tail_query queries.
pie_chart: Accepts sql_expression queries.
scatter_chart: Accepts sql_expression queries.
gauge_chart: Accepts sql_expression and tail_query queries.
tail_chart: Accepts tail_query queries.
static_text_chart: Accepts a static_text query.
map_chart: Accepts sql_expression queries.
text_chart: Accepts sql_expression and tail_query queries.
funnel_chart: Accepts a funnel_query query.
funnel_trend_chart: Accepts a funnel_query query.
hierarchy_chart: Accepts sql_expression queries.

chart.name string

The chart's name. Until you name the exploration, name holds a generated name instead.

chart.description string or null

The chart's description, or null when it has none.

chart.settings object

Display settings for the chart type, such as unit, axes, legend, stacking and decimal places. An update changes only the settings it sends and keeps the others.

chart.settings.unit string

Unit the values are shown in, such as percent, bytes or ms. Table charts use column_units instead.

chart.settings.custom_unit boolean

Whether unit is your own suffix, shown after the value as written and never scaled.

chart.settings.decimal_places integer

Number of decimal places shown.

chart.settings.time_column string

Column on the X axis, time by default. For a category bar chart it's the grouping column.

chart.settings.x_axis_type string

How the X axis is read. Usually time, value or category.

chart.settings.y_axis_type string

How the Y axis of a scatter chart is read. Usually value or category.

chart.settings.series_column string

Column that splits the data into series. On a heatmap it's the Y axis column.

chart.settings.value_columns array of strings

Result columns that hold the values to chart.

chart.settings.point_size_column string

Column that sets each point's size on a scatter chart.

chart.settings.location_column string

Column holding the location on a map chart.

chart.settings.location_label string

What a map chart's tooltip names, either the closest city or country or the value as sent. Usually automatic or original_value.

chart.settings.label_column string

Column that names each hexagon on a hierarchy chart.

chart.settings.group_by_columns array of strings

Up to two columns a hierarchy chart groups its hexagons by.

chart.settings.palette string

Color scale of a hierarchy chart. Usually green_to_red or red_to_green.

chart.settings.min_value number

Lowest value of a hierarchy chart's color scale.

chart.settings.max_value number

Highest value of a hierarchy chart's color scale.

chart.settings.link_template string

Link a hierarchy chart opens when you click a hexagon, with {{column}} placeholders.

chart.settings.y_axis_min number

Lowest value on the Y axis.

chart.settings.y_axis_max number

Highest value on the Y axis.

chart.settings.y_axis_auto_range string

How a line chart fits its Y axis when no bounds are set. Usually include_zero or fit_data.

chart.settings.y_axis_scale string

Scale of the Y axis. Usually linear or log.

chart.settings.min number

Lower bound of a gauge.

chart.settings.max number

Upper bound of a gauge, the goal value.

chart.settings.treat_missing_values string

How gaps in the data are drawn. Usually connected, disconnected, zero or previous.

chart.settings.stacking string

How series are stacked. Usually dont_stack, stack or stack_to_100.

chart.settings.orientation string

Direction of the bars on a bar chart. Usually vertical or horizontal.

chart.settings.legend string

Where the legend is shown. Usually hidden, shown_below, shown_below_with_statistics or shown_right.

chart.settings.series_colors object

Color of each series, keyed by its series_name, as a hex color such as #22c55e. Each value is a string.

chart.settings.series_order array of strings

Order the series are shown in, by name.

chart.settings.show_previous_period boolean

Whether a line chart also shows the previous period.

chart.settings.color_mode string

How a number chart colors its value. Usually auto, high_green, high_red or specific_words.

chart.settings.color_upper_threshold number

Upper threshold of a number chart's colors.

chart.settings.color_lower_threshold number

Lower threshold of a number chart's colors.

chart.settings.color_green_words string

Values a number chart shows in green, separated by commas.

chart.settings.color_yellow_words string

Values a number chart shows in yellow, separated by commas.

chart.settings.color_red_words string

Values a number chart shows in red, separated by commas.

chart.settings.column_units object

Unit of each table column, by column name. Each value is an object with unit and custom_unit.

chart.settings.column_units.<key>.unit string

Unit the column's values are shown in, such as auto, percent or bytes.

chart.settings.column_units.<key>.custom_unit boolean

Whether unit is your own suffix, shown after the value as written and never scaled.

chart.settings.percentage_highlight_columns array of strings

Table columns holding ratios from 0 to 1, shown with a bar.

chart.settings.series_unit string

Unit of a heatmap's Y axis labels.

chart.settings.series_custom_unit boolean

Whether series_unit is your own suffix.

chart.settings.heatmap_color_mode string

How a heatmap colors its cells. Usually gradient or categorized.

chart.settings.value_categories object

Label and color of each cell value of a categorized heatmap. Each value is an object with label and color.

chart.settings.value_categories.<key>.label string

Text shown for the value.

chart.settings.value_categories.<key>.color string

Color of the cells with the value, as a hex color such as #22c55e.

chart.settings.column_widths object

Width of each table column, by column name, as the chart editor saves it. Each value is a number.

chart.settings.table_width integer

Width of the table the column_widths were saved for.

chart.settings.guessed_series_colors object

Colors the chart picked for its series, keyed by series_name. Each value is a string.

chart.settings.label string

A legend placement the chart editor saves next to legend, such as shown_below. Charts ignore it and place the legend by legend.

chart.settings.text string

Markdown text of a text chart.

chart.settings.rowTemplates object

Live tail row format of each source, by source ID. Each value is a string.

chart.settings.sampling integer

Percentage of data the chart samples.

chart.settings.fresh boolean

Whether the chart skips cached results.

chart.settings.funnel_unit_name string

Word a funnel chart counts in, such as people.

chart.settings.filtered_series array of strings

Series the chart shows, by name.

chart.settings.filtered_releases array of strings

Releases the chart shows.

chart.settings.force_source_series boolean

Whether the chart shows one series per source.

chart.settings.treat_zero_values string

How zero values are drawn, keep or drop_disconnected. Defaults to keep.

chart.settings.projection string

Map projection of a map chart, such as mercator.

chart.settings.published_format string

Format a published chart is served in, json by default.

chart.settings.published_cache_for integer

Seconds a published chart's results are cached, 3 by default.

chart.settings.y_axis_annotations array of objects

Horizontal lines drawn at values on the Y axis, each with a label and color.

chart.settings.y_axis_annotations[].value number

The Y axis value the line is drawn at.

chart.settings.y_axis_annotations[].label string

Text shown next to the line.

chart.settings.y_axis_annotations[].color string

The line's color, as a hex color such as #22c55e. Left out, the line is gray.

chart.settings.x_axis_annotations array of objects

Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it.

chart.settings.x_axis_annotations[].value string

The X axis value the line is drawn at, a time or a number.

chart.settings.x_axis_annotations[].label string

Text shown next to the line.

chart.settings.x_axis_annotations[].color string

The line's color, as a hex color such as #22c55e. Left out, the line is gray.

queries array of objects

The chart's queries, oldest first. Updating an exploration replaces all of its queries. Each query accepts only the keys its query_type uses. A sql_expression query uses sql_query and source_variable. A tail_query uses where_condition and source_variable. A static_text query uses static_text, and a funnel_query uses funnel_query. A key another type uses, or more than one query on a chart other than line_chart, is refused.

queries[].id string

The query's ID.

queries[].query_type string

Query type. A read-only query can't be edited, only replaced with a writable one. Responses can also hold promql_query, promql_v2_query and promql_via_llm for queries made in the web app.
Valid values:
sql_expression: A query written in SQL. You can write it through the API.
tail_query: The filter of a tail chart. You can write it through the API.
static_text: The text of a static_text_chart. You can write it through the API.
pql_expression: A query written in PQL. Read-only.
tail_query_builder: A tail chart's query made in the query builder. Read-only.
query_builder: A query made in the query builder. Read-only.
funnel_query: A funnel's one query. You can write it through the API.

queries[].name string

The query's name.

queries[].sql_query string

The SQL the query runs. Present for sql_expression, pql_expression, query_builder, tail_query_builder and funnel_query queries, and omitted when not set. Read-only except for sql_expression.

queries[].pql_query string

The PQL the query is written in. Present only for pql_expression queries.

queries[].where_condition string

The query's filter. Present only for tail_query and tail_query_builder queries, and omitted when not set.

queries[].static_text string

The query's Markdown content. Present only for static_text queries, and omitted when not set.

queries[].source_variable string

The sources the query reads, either the name of a source variable, such as source, or source: followed by specific sources, each a table name or <source_id>:<type>, such as source:1729445:exceptions for one source's errors. Defaults to source on create.

queries[].x_axis array of objects

X-axis blocks of a query_builder or tail_query_builder query. Read-only.

queries[].x_axis[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].x_axis[].value string

The column or field the block reads, such as dt.

queries[].x_axis[].type string

The value's data type, such as datetime.

queries[].x_axis[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].x_axis[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].x_axis[].value_type string

rate to chart the value's rate of change.

queries[].x_axis[].operator string

The comparison of a filter block.

queries[].x_axis[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].x_axis[].condition_value string

The value a filter block compares against.

queries[].x_axis[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].x_axis[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].x_axis[].direction string

The sort direction of an order block, asc or desc.

queries[].x_axis[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].x_axis[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].x_axis[].schema string

The source's storage layout, row_based or column_based.

queries[].y_axis array of objects

Y-axis blocks of a query_builder or tail_query_builder query. Read-only.

queries[].y_axis[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].y_axis[].value string

The column or field the block reads, such as dt.

queries[].y_axis[].type string

The value's data type, such as datetime.

queries[].y_axis[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].y_axis[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].y_axis[].value_type string

rate to chart the value's rate of change.

queries[].y_axis[].operator string

The comparison of a filter block.

queries[].y_axis[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].y_axis[].condition_value string

The value a filter block compares against.

queries[].y_axis[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].y_axis[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].y_axis[].direction string

The sort direction of an order block, asc or desc.

queries[].y_axis[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].y_axis[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].y_axis[].schema string

The source's storage layout, row_based or column_based.

queries[].point_size array of objects

Point size blocks of a query_builder or tail_query_builder query. Read-only.

queries[].point_size[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].point_size[].value string

The column or field the block reads, such as dt.

queries[].point_size[].type string

The value's data type, such as datetime.

queries[].point_size[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].point_size[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].point_size[].value_type string

rate to chart the value's rate of change.

queries[].point_size[].operator string

The comparison of a filter block.

queries[].point_size[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].point_size[].condition_value string

The value a filter block compares against.

queries[].point_size[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].point_size[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].point_size[].direction string

The sort direction of an order block, asc or desc.

queries[].point_size[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].point_size[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].point_size[].schema string

The source's storage layout, row_based or column_based.

queries[].coordinates array of objects

Coordinate blocks of a query_builder or tail_query_builder query. Read-only.

queries[].coordinates[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].coordinates[].value string

The column or field the block reads, such as dt.

queries[].coordinates[].type string

The value's data type, such as datetime.

queries[].coordinates[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].coordinates[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].coordinates[].value_type string

rate to chart the value's rate of change.

queries[].coordinates[].operator string

The comparison of a filter block.

queries[].coordinates[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].coordinates[].condition_value string

The value a filter block compares against.

queries[].coordinates[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].coordinates[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].coordinates[].direction string

The sort direction of an order block, asc or desc.

queries[].coordinates[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].coordinates[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].coordinates[].schema string

The source's storage layout, row_based or column_based.

queries[].filters array of objects

Filter blocks of a query_builder or tail_query_builder query. Read-only.

queries[].filters[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].filters[].value string

The column or field the block reads, such as dt.

queries[].filters[].type string

The value's data type, such as datetime.

queries[].filters[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].filters[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].filters[].value_type string

rate to chart the value's rate of change.

queries[].filters[].operator string

The comparison of a filter block.

queries[].filters[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].filters[].condition_value string

The value a filter block compares against.

queries[].filters[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].filters[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].filters[].direction string

The sort direction of an order block, asc or desc.

queries[].filters[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].filters[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].filters[].schema string

The source's storage layout, row_based or column_based.

queries[].where array of objects

Where blocks of a query_builder or tail_query_builder query. Read-only.

queries[].where[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].where[].value string

The column or field the block reads, such as dt.

queries[].where[].type string

The value's data type, such as datetime.

queries[].where[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].where[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].where[].value_type string

rate to chart the value's rate of change.

queries[].where[].operator string

The comparison of a filter block.

queries[].where[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].where[].condition_value string

The value a filter block compares against.

queries[].where[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].where[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].where[].direction string

The sort direction of an order block, asc or desc.

queries[].where[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].where[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].where[].schema string

The source's storage layout, row_based or column_based.

queries[].group_by array of objects

Grouping blocks of a query_builder or tail_query_builder query. Read-only.

queries[].group_by[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].group_by[].value string

The column or field the block reads, such as dt.

queries[].group_by[].type string

The value's data type, such as datetime.

queries[].group_by[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].group_by[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].group_by[].value_type string

rate to chart the value's rate of change.

queries[].group_by[].operator string

The comparison of a filter block.

queries[].group_by[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].group_by[].condition_value string

The value a filter block compares against.

queries[].group_by[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].group_by[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].group_by[].direction string

The sort direction of an order block, asc or desc.

queries[].group_by[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].group_by[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].group_by[].schema string

The source's storage layout, row_based or column_based.

queries[].having array of objects

Having blocks of a query_builder or tail_query_builder query. Read-only.

queries[].having[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].having[].value string

The column or field the block reads, such as dt.

queries[].having[].type string

The value's data type, such as datetime.

queries[].having[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].having[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].having[].value_type string

rate to chart the value's rate of change.

queries[].having[].operator string

The comparison of a filter block.

queries[].having[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].having[].condition_value string

The value a filter block compares against.

queries[].having[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].having[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].having[].direction string

The sort direction of an order block, asc or desc.

queries[].having[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].having[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].having[].schema string

The source's storage layout, row_based or column_based.

queries[].order_by array of objects

Ordering blocks of a query_builder or tail_query_builder query. Read-only.

queries[].order_by[].explore_block_type string

What the block reads, such as count, field, json_value, json_value_from_column, special_column, virtual_field or search.

queries[].order_by[].value string

The column or field the block reads, such as dt.

queries[].order_by[].type string

The value's data type, such as datetime.

queries[].order_by[].name string

The name the block is shown with. The editor shows value when it's empty.

queries[].order_by[].measure string

The aggregation applied to the value, such as avg, count, uniq, max, min, sum or p95.

queries[].order_by[].value_type string

rate to chart the value's rate of change.

queries[].order_by[].operator string

The comparison of a filter block.

queries[].order_by[].operator_symbol string

The filter block's comparison written as a symbol.

queries[].order_by[].condition_value string

The value a filter block compares against.

queries[].order_by[].series_name string

The name a Y-axis or coordinates block's series is shown as.

queries[].order_by[].logical_operator string

How a filter block joins the filters before it, and or or. Defaults to and.

queries[].order_by[].direction string

The sort direction of an order block, asc or desc.

queries[].order_by[].interval_seconds integer

The time bucket size in seconds, for a time block on the X axis.

queries[].order_by[].kind string

metric for an aggregated value, or label for a raw dimension.

queries[].order_by[].schema string

The source's storage layout, row_based or column_based.

queries[].funnel_query object

A funnel's steps, session field and breakdown. Present only for funnel_query queries. An update changes only the fields you send.

queries[].funnel_query.steps array of objects

The funnel's steps in journey order, 2 to 32. An update with steps replaces every step.

queries[].funnel_query.steps[].name string

Step name shown on the chart. Defaults to Step <n>.

queries[].funnel_query.steps[].conditions string

Live tail query that the step's events match, such as payload.meta.path="/cart".

queries[].funnel_query.session_field string

Field that ties one journey's events together. Defaults to session_id. Use user.id to follow an identified user. An empty value resets it to session_id.

queries[].funnel_query.breakdown_field string

Field each step is split by, such as contexts.browser.name. An empty value removes the breakdown.

queries[].funnel_query.breakdown object

The breakdown the funnel is split by, with its field in value.

queries[].funnel_query.breakdown.value string

The field each step is split by, such as contexts.browser.name.

queries[].funnel_query.breakdown.type string

The type of the breakdown field, always string.

variables array of objects

Template variables, which the queries use by name. See Query variables. An update replaces all variables, so a variable you leave out is removed, except the built-in time, start_time, end_time and source variables, which always exist. For a variable that already exists, any of default_values, sql_definition and structured_value you leave out keeps its value, unless variable_type changes, which clears them. allow_multiple_values you leave out keeps its value too. A variable sent without values gets empty values, except a source variable, which keeps its sources when you leave out both values and structured_value. sql_definition applies only to select_with_sql and multi_select_with_sql variables. allow_multiple_values is saved only for select_value and select_with_sql variables. When a variable is saved with empty values, a select_value variable gets the first of its default_values, and a string, number, boolean or sql_expression variable gets all of them. A select_with_sql variable whose sql_definition is new or changed gets the first option its SQL returns. An ISO 8601 date in a date or datetime variable is saved in values as a Unix timestamp in microseconds. A new or changed sql_definition or filter sql runs against the selected source, and the change is refused when the query fails. A source variable's values are the IDs of your sources. In a rum exploration, pick each source as its web events, <table_name>:web_events. A funnel reads one source, picked in its source variable or in source_id. A funnel's source variable that picks one source by ID reads the source as source_id does.

variables[].name string

The variable's name, used as {{name}} in queries.

variables[].variable_type string

Variable kind. A variable named source sent without variable_type is a source variable. Possible values: source, date, datetime, string, number, sql_expression, select_value, boolean, select_with_sql, multi_select_with_sql, select_predefined_sql.

variables[].values array of strings

The variable's current values as strings, or an empty array when it has none. For a source variable, these are the IDs of the selected sources.

variables[].default_values array of strings

The variable's default values as strings, or an empty array when it has none.

variables[].sql_definition string

The SQL expression whose distinct values are the options of a select_with_sql variable, such as JSONExtractString(raw, 'service'). The expression runs against the variable's source over the selected range.

variables[].structured_value object

The variable's other settings, such as the selected sources of a source variable in canonicalSourceIds and its services in serviceIds, or the saved filters of a select_predefined_sql variable. Left out when not set.

variables[].structured_value.selected_label string

Label of the selected value.

variables[].structured_value.canonicalSourceIds array of strings

Sources picked with their data type, as <source_id>:<type> such as 1729445:exceptions. Source IDs on their own, such as 1729445, go in values.

variables[].structured_value.serviceIds array of strings

Selected services of a source variable.

variables[].structured_value.filters array of objects

Saved filters, each a label and the SQL that lists its values.

variables[].structured_value.filters[].label string

The filter's label, shown in the variable's menu.

variables[].structured_value.filters[].sql string

A complete query that returns one column with the filter's options.

variables[].allow_multiple_values boolean

Whether a select_value or select_with_sql variable accepts more than one value at a time.

variables[].source_ids array of strings

The IDs of the sources a source variable selects. Each must be one of your sources.

variables[].filters array of objects

The saved filters of a select_predefined_sql variable.

variables[].filters[].label string

The filter's label, shown in the variable's menu.

variables[].filters[].sql string

A complete query that returns one column with the filter's options.

variables[].selected_label string

The label of the selected filter of a select_predefined_sql variable. When not sent, the first filter is selected. A label that matches none of filters is refused.

product string

The Explore the exploration lives in. Leave it out on create to put the exploration in Telemetry's Explore. A funnel that reads only web events goes in RUM's Explore instead. Changing it moves the exploration to the other Explore.
Valid values:
telemetry: Telemetry's Explore.
rum: RUM's Explore, which reads an application's web events only.

created_at datetime

When the exploration was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the exploration was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

team_id string

Team that owns the exploration, such as t123.

team_name string

Name of the team that owns the exploration.

funnel_preview object or null

For a funnel, how many sessions reached each step over the saved range. When the count couldn't run, only error is set, and the funnel is still saved. null when nothing was counted, such as after a rename. Left out for other explorations.

funnel_preview.steps array of objects

Each step, in journey order.

funnel_preview.steps[].name string

The step's name.

funnel_preview.steps[].count integer

How many sessions reached the step.

funnel_preview.steps[].of_previous number or null

The step's count as a share of the previous step's, from 0 to 1. null for the first step.

funnel_preview.steps[].of_first number

The step's count as a share of the first step's, from 0 to 1.

funnel_preview.breakdown object

The counts per value of the breakdown field, for its top values. Present only when the funnel has a breakdown.

funnel_preview.breakdown.field string

The field each step is split by.

funnel_preview.breakdown.value_count integer

How many distinct values the field has, which can be more than values lists.

funnel_preview.breakdown.values array of objects

The top values of the field, each with its counts.

funnel_preview.breakdown.values[].value string

A value of the breakdown field.

funnel_preview.breakdown.values[].counts array of integers

How many sessions with this value reached each step, in step order.

funnel_preview.error string

Why the funnel couldn't be counted. Present only when the count failed.

Example cURL

Update an exploration
curl --request PATCH \
  --url https://telemetry.betterstack.com/api/v3/explorations/123 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "name": "Updated Error Rate Analysis",
  "queries": [
    {
      "name": "Updated Query",
      "query_type": "sql_expression",
      "sql_query": "SELECT {{time}} AS time, sum(errors) AS value FROM {{source}} WHERE dt BETWEEN {{start_time}} AND {{end_time}} GROUP BY time",
      "source_variable": "source"
    }
  ]
}'