Upsert a data view
- Base URL
-
https://{kibana_url}
- PUT /api/data_views/v2/{id}
- PUT /s/{space_id}/api/data_views/v2/{id}
Creates the data view with the ID in the path, or replaces its definition if it already exists. Returns 201 when the request creates a data view and 200 when it replaces one. A replacement removes any optional property you omit, such as time_field.
Required authorization
- 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
updated
-
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-*".
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-*".
invalid request
forbidden
conflict