Create a Vega library item
- Base URL
-
https://{kibana_url}
- POST /api/vega
- POST /s/{space_id}/api/vega
Creates a new Vega library item and returns its ID, full state, and metadata.
Path parameters
-
space_idstringoptional -
An identifier for the space. If
space_idis not provided in the URL, the default space is used. Refer to Spaces for more information.
Request body
-
descriptionstring · min length: 0 · max length: 10000 -
A short description of the Vega library item.
-
filtersunion oneOf[] · max items: 100 -
Filters. Applied together with the dashboard filters to Elasticsearch and ES|QL data sources that use
%context%: true, and to Elasticsearch data sources that use%dashboard_context-*%placeholders. - One of:
-
conditionunion oneOfrequired -
A filter condition with strict operator/value type matching.
-
One of:
(determined by
operator) -
negateboolean -
When
true, the filter is negated and matches documents that do NOT satisfy the condition. Defaults tofalse. -
valueobjectrequired -
Boundary values for a range comparison.
-
formatstring -
Elasticsearch date format string applied when parsing date boundary values. For example,
strict_date_optional_timeorepoch_millis. -
controlled_bystring -
Identifier of the panel that manages this filter. When set, the filter is treated as owned by that panel.
-
disabledboolean -
When
true, the filter is inactive and does not affect query results. Defaults tofalse. -
controlled_bystring -
Identifier of the panel that manages this filter. When set, the filter is treated as owned by that panel.
-
disabledboolean -
When
true, the filter is inactive and does not affect query results. Defaults tofalse. -
fieldstring -
Field name for scripted filters where the field cannot be extracted from the DSL query.
-
is_multi_indexboolean -
When
true, the filter can be applied across multiple indices. Defaults tofalse. -
queryobject -
KQL or Lucene query. Applied together with the dashboard query to Elasticsearch and ES|QL data sources that use
%context%: true, and to Elasticsearch data sources that use%dashboard_context-*%placeholders.
A filter that evaluates a single field condition such as equality, range, or existence.
operator: is
Matches documents where field equals a single specified value.
operator: is_one_of
Matches documents where field equals any value in a provided list.
operator: range
Matches documents where field falls within a specified numeric or date range.
operator: exists
Matches documents where field exists and contains a non-null value.
A filter that combines multiple conditions or nested groups using a logical and or or operator.
A filter expressed as a raw Elasticsearch Query DSL object, used for queries that cannot be represented by condition or group filters.
A filter that applies an Elasticsearch geo query, used for geographic boundary and shape matching.
Responses
created
-
dataobjectrequired -
descriptionstring · min length: 0 · max length: 10000 -
A short description of the Vega library item.
-
filtersunion oneOf[] · max items: 100 -
Filters. Applied together with the dashboard filters to Elasticsearch and ES|QL data sources that use
%context%: true, and to Elasticsearch data sources that use%dashboard_context-*%placeholders. -
Same options as
filters -
queryobject -
KQL or Lucene query. Applied together with the dashboard query to Elasticsearch and ES|QL data sources that use
%context%: true, and to Elasticsearch data sources that use%dashboard_context-*%placeholders. -
idstringrequired -
The unique ID of the Vega library item, as returned by the create or search endpoints.
invalid request
forbidden
not found