Search visualizations

Base URL
https://{kibana_url}
  • GET /api/visualizations
Auth

Returns a paginated list of Lens visualizations matching the optional query text.

Query parameters

fields string[] · max items: 100

The saved object fields to include in each result. When omitted, all fields are returned.

search_fields string[] · max items: 100

The fields to match the query text against. Defaults to title when omitted.

query string

Text to match against search_fields.

page number · min: 1 · default: 1

The page of results to return.

per_page number · min: 1 · max: 1000 · default: 20

The number of results to return per page.

Responses

Ok

application/json
data object[] · max items: 1000 required
data union anyOf required
Any of:
type enum required
Values: metric
breakdown_by union anyOf
Any of:
operation enum required
Values: date_histogram
collapse_by union anyOf

Aggregation function used to collapse a breakdown dimension into a single value.

Values: avg sum max min
columns number · default: 3

Number of columns.

drop_partial_intervals boolean · default: false

When true, drops partial intervals from the results.

field string required

Field to be used for the date histogram.

include_empty_rows boolean · default: true

When true, includes empty rows in the results.

label string

Label for the operation

suggested_interval string · default: auto

Suggested time interval.

use_original_time_range boolean · default: false

When true, uses the original time range instead of the current query time range.

data_source union oneOf required
One of: (determined by type)
type: data_view_reference
type enum required
Values: data_view_reference
ref_id string required

The id of the Kibana data view to use as the data source. Example: "my-data-view".

description string

The description of the chart. Optional. Any string value or undefined.

filters union[] · max items: 100

Filters applied to the panel

ignore_global_filters boolean · default: false

When true, ignores global filters when fetching data for this layer. Defaults to false.

metrics union anyOf[] · min items: 1 · max items: 2 required

Metric dimensions to display. The first must be a primary metric; an optional second must be a secondary metric.

Any of:
type enum required
Values: primary
apply_color_to enum

Color target: value colors the metric text, background colors the cell or panel background.

Values: value background
background_chart union anyOf

Secondary visualization displayed behind the primary metric value, either a bar chart (with optional max value) or a trend line.

Any of:
type enum required
Values: bar
max_value union anyOf required

Metric dimension configuration, supporting field-based aggregations (count, sum, average, median, standard deviation, unique count, last value), percentile operations, time-series operations (differences, moving average, cumulative sum, counter rate), and mathematical formulas.

Any of:
operation enum required
Values: formula
filter object

A KQL or Lucene query that filters panel data. Applied on top of any dashboard-level filters.

expression string required

A query expression in KQL or Lucene syntax

language enum · default: kql

Query language: kql (Kibana Query Language) or lucene. Defaults to kql.

Values: kql lucene
format union anyOf

Number display format for the dimension value.

Same options as format in Terms Operation
formula string required

Formula

label string

Label for the operation

reduced_time_range string

Reduced time range

time_scale enum

Time scale

Values: s m h d
orientation enum

Orientation

Values: horizontal vertical
color union anyOf · default: { "type": "auto" }

Color configuration for the primary metric value or background.

Any of:

Dynamic color mapping by numeric range, with support for absolute and percentage-based ranges and for named palettes.

subtitle string

Subtitle below the primary metric value.

query object

A KQL or Lucene query that filters panel data. Applied on top of any dashboard-level filters.

expression string required

A query expression in KQL or Lucene syntax

language enum · default: kql

Query language: kql (Kibana Query Language) or lucene. Defaults to kql.

Values: kql lucene
sampling number · min: 0 · max: 1 · default: 1

Sampling factor between 0 (no sampling) and 1 (full sampling).

styling object

Visual chart styling options

density enum · default: default

Density preset for the metric chart layout. Use compact for a compact layout, or default for increased padding, element spacing, and font size.

Values: compact default
icon object

Icon configuration for the metric chart

alignment enum · default: right

Icon alignment. Accepted values: left, right. Defaults to right.

Values: left right
name enum required

Icon name

Values: alert asterisk bell bolt bug compute editor_comment flag globe heart map_marker pin sort_down sort_up star_empty tag temperature
primary object
labels object

Labels (title and subtitle) configuration

alignment enum · default: left

Horizontal alignment for the title and subtitle text. Accepted values: left, center, right. Defaults to left.

Values: left center right
position enum · default: bottom

Position of the primary metric value (top, middle, or bottom).

Values: top middle bottom
value object

Primary metric value configuration

alignment enum · default: right

Alignment for the primary metric value. Accepted values: left, center, right. Defaults to right.

Values: left center right
sizing enum · default: auto

Controls how the primary value text is sized within the panel. 'auto' selects a font size from predefined breakpoints based on panel height, then shrinks if the text overflows horizontally. 'fill' scales the text to be as large as possible, filling all available space.

Values: auto fill
secondary object
label object
placement enum · default: before

How the secondary metric name is shown: before the value, after the value, or in a tooltip. Ignored when the label is not visible.

Values: before after tooltip
visible boolean · default: false

When true, displays the secondary metric name as its label.

value object

Secondary metric value configuration

alignment enum · default: right

Alignment for secondary values. Accepted values: left, center, right. Defaults to right.

Values: left center right
tags string[] · max items: 1000 · default: []

Tag IDs to associate with this visualization.

title string

The title of the chart displayed in the panel. Optional. Any string value or undefined.

id string required
meta object required
created_at string

Timestamp when the object was created (ISO 8601).

created_by string

User profile ID of the user who created the object.

managed boolean

When true, the object is managed by Kibana and cannot be edited by users.

owner string

Identifier of the plugin or team that owns this object.

updated_at string

Timestamp when the object was last updated (ISO 8601).

updated_by string

User profile ID of the user who last updated the object.

version string

Internal version identifier for optimistic concurrency control.

meta object required
page number · min: 1 · default: 1

The returned page of results.

per_page number · min: 1 · max: 1000 · default: 20

The number of results returned per page.

total number required

The total number of results matching the query.

400

Malformed request

401

Unauthorized

403

Forbidden

500

Internal Server Error

Base URL
https://{kibana_url}