Create a data view
- Base URL
-
https://{kibana_url}
- POST /api/data_views/v2
- POST /s/{space_id}/api/data_views/v2
Creates a data view and returns it. Kibana generates the data view ID. If a data view with the same name already exists, the request fails with a conflict.
Required privileges
- Privileges indexPatterns:manage
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
-
field_filtersstring[] · max items: 10000 -
Field filters can be used to exclude one or more fields when fetching a document. They may contain wildcards, such as
user*which filters fields starting with 'user'. -
field_settingsmap string to anyOf -
Settings for individual fields, keyed by field name. To change how Kibana displays a field from the backing indices, set its label, description, format, or popularity. To define a runtime field, use the runtime field name and set
type. -
index_patternstring · min length: 1required -
The index pattern (Elasticsearch index expression) to use as the data source. Example: "my-index-*".
Responses
The data view was created.
-
dataobjectrequired -
Defines an stored data source with a mandatory index pattern and optional settings like id, name, show hidden indices and field settings.
-
field_filtersstring[] · max items: 10000 -
Field filters can be used to exclude one or more fields when fetching a document. They may contain wildcards, such as
user*which filters fields starting with 'user'. -
field_settingsmap string to anyOf -
Settings for individual fields, keyed by field name. To change how Kibana displays a field from the backing indices, set its label, description, format, or popularity. To define a runtime field, use the runtime field name and set
type. -
idstring · min length: 1 · max length: 256 -
Kibana provides a unique identifier for each data view, or you can create your own.
-
index_patternstring · min length: 1required -
The index pattern (Elasticsearch index expression) to use as the data source. Example: "my-index-*".
The request is invalid, for example when a field format type does not exist.
forbidden
A data view with the same name already exists.