Create a data view
https://{kibana_url}
- POST /api/data_views/data_view
- POST /s/{space_id}/api/data_views/data_view
Refer to Spaces for more information.
Create a data view. Data views identify the Elasticsearch data you want to explore and visualize. They can point to one or more data streams, indices, or index aliases, and use optional runtime fields to compute values at query time. Note that data views are not required for ES|QL-based visualizations. To learn more, refer to the data views documentation.
Request
-
data_viewobjectrequired -
The data view object.
-
allowNoIndexboolean -
Allows the data view saved object to exist before the data is available. Defaults to
false. -
fieldAttrsmap string to object -
<string> -
countinteger -
Popularity count for the field.
-
customDescriptionstring · max: 300 -
Custom description for the field.
-
customLabelstring -
Custom label for the field.
-
fieldFormatsobject -
A map of field formats by field name.
-
fieldsobject -
idstring -
namestring -
The data view name.
-
namespacesobject -
An array of space identifiers for sharing the data view between multiple spaces.
-
runtimeFieldMapmap string to object -
sourceFiltersobject -
The array of field names you want to filter out in Discover.
-
valuestringrequired -
timeFieldNamestring -
The timestamp field name, which you use for time-based data views.
-
titlestringrequired -
Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (
*). -
typestring -
When set to
rollup, identifies the rollup data views. -
typeMeta -
When you use rollup indices, contains the field list for the rollup data view API endpoints.
-
versionstring -
overrideboolean · default: false -
Override an existing data view if a data view with the provided title already exists.
Responses
Indicates a successful call.
-
data_viewobject -
allowNoIndexboolean -
Allows the data view saved object to exist before the data is available. Defaults to
false. -
fieldAttrsmap string to object -
<string> -
countinteger -
Popularity count for the field.
-
customDescriptionstring · max: 300 -
Custom description for the field.
-
customLabelstring -
Custom label for the field.
-
fieldFormatsobject -
A map of field formats by field name.
-
fieldsobject -
idstring -
namestring -
The data view name.
-
namespacesobject -
An array of space identifiers for sharing the data view between multiple spaces.
-
runtimeFieldMapmap string to object -
sourceFiltersobject -
The array of field names you want to filter out in Discover.
-
valuestringrequired -
timeFieldNamestring -
The timestamp field name, which you use for time-based data views.
-
titlestring -
Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (
*). -
typeMetanullable -
When you use rollup indices, contains the field list for the rollup data view API endpoints.
-
versionstring
Bad request
-
errorstringrequired -
messagestringrequired -
statusCodenumberrequired