mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* initial pass at changing urls and anchors * update api.asciidoc * upate a few more anchor tags * upate a few more anchor tags * update data view api docs * Update delete.asciidoc * Update default-get.asciidoc * add redirects * fix redirects * remove duplicate redirect Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Matthew Kime <matt@mattki.me>
This commit is contained in:
parent
7d3331fb2a
commit
b21ab19adc
20 changed files with 234 additions and 174 deletions
|
@ -72,7 +72,7 @@ Check out <DocLink id="kibDevDocsKPTTutorial" text="the KibanaPageTemplate tutor
|
|||
|
||||
### Index Patterns
|
||||
|
||||
<DocLink id="kibDataPlugin" section="index-patterns-api" text="Index Patterns" /> are a high-level, space-aware
|
||||
<DocLink id="kibDataPlugin" section="data-views-api" text="Index Patterns" /> are a high-level, space-aware
|
||||
abstraction layer that sits above Data Streams and Elasticsearch indices. Index Patterns provide users
|
||||
the ability to define and customize the data they wish to search and filter on, on a per-space basis.
|
||||
For example, users can specify a set of indices, and they can customize the field list with runtime fields,
|
||||
|
|
|
@ -83,4 +83,4 @@ await data.indexPatterns.delete(dataViewId);
|
|||
|
||||
### Data view HTTP API
|
||||
|
||||
Rest-like HTTP CRUD+ API - [docs](https://www.elastic.co/guide/en/kibana/master/index-patterns-api.html)
|
||||
Rest-like HTTP CRUD+ API - [docs](https://www.elastic.co/guide/en/kibana/master/data-views-api.html)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
deprecated::[7.15.0,Both of these APIs have been deprecated in favor of <<saved-objects-api-import>> and <<saved-objects-api-export>>.]
|
||||
|
||||
Import and export dashboards with the corresponding saved objects, such as visualizations, saved
|
||||
searches, and index patterns.
|
||||
searches, and data views.
|
||||
|
||||
WARNING: Do not write documents directly to the `.kibana` index. When you write directly
|
||||
to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions.
|
||||
|
|
42
docs/api/data-views.asciidoc
Normal file
42
docs/api/data-views.asciidoc
Normal file
|
@ -0,0 +1,42 @@
|
|||
[[data-views-api]]
|
||||
== Data views API
|
||||
|
||||
experimental[] Manage data views, formerly known as {kib} index patterns.
|
||||
|
||||
WARNING: Do not write documents directly to the `.kibana` index. When you write directly
|
||||
to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions.
|
||||
|
||||
WARNING: Use the data views APIs for managing data views instead of lower-level <<saved-objects-api, saved objects API>>.
|
||||
|
||||
The following data views APIs are available:
|
||||
|
||||
* Data views
|
||||
** <<data-views-api-get, Get data view API>> to retrieve a single data view
|
||||
** <<data-views-api-create, Create data view API>> to create data view
|
||||
** <<data-views-api-update, Update data view API>> to partially updated data view
|
||||
** <<data-views-api-delete, Delete data view API>> to delete a data view
|
||||
* Default data views
|
||||
** <<data-views-api-default-get, Get default data view API>> to retrieve a default data view
|
||||
** <<data-views-api-default-set, Set default data view API>> to set a default data view
|
||||
* Fields
|
||||
** <<data-views-fields-api-update, Update data view field>> to change field metadata, such as `count`, `customLabel` and `format`
|
||||
* Runtime fields
|
||||
** <<data-views-runtime-field-api-get, Get runtime field API>> to retrieve a runtime field
|
||||
** <<data-views-runtime-field-api-create, Create runtime field API>> to create a runtime field
|
||||
** <<data-views-runtime-field-api-upsert, Upsert runtime field API>> to create or update a runtime field
|
||||
** <<data-views-runtime-field-api-update, Update runtime field API>> to partially update an existing runtime field
|
||||
** <<data-views-runtime-field-api-delete, Delete runtime field API>> to delete a runtime field
|
||||
|
||||
include::data-views/get.asciidoc[]
|
||||
include::data-views/create.asciidoc[]
|
||||
include::data-views/update.asciidoc[]
|
||||
include::data-views/delete.asciidoc[]
|
||||
include::data-views/default-get.asciidoc[]
|
||||
include::data-views/default-set.asciidoc[]
|
||||
include::data-views/update-fields.asciidoc[]
|
||||
include::data-views/runtime-fields/get.asciidoc[]
|
||||
include::data-views/runtime-fields/create.asciidoc[]
|
||||
include::data-views/runtime-fields/upsert.asciidoc[]
|
||||
include::data-views/runtime-fields/update.asciidoc[]
|
||||
include::data-views/runtime-fields/delete.asciidoc[]
|
||||
|
|
@ -1,45 +1,45 @@
|
|||
[[index-patterns-api-create]]
|
||||
=== Create index pattern API
|
||||
[[data-views-api-create]]
|
||||
=== Create data view API
|
||||
++++
|
||||
<titleabbrev>Create index pattern</titleabbrev>
|
||||
<titleabbrev>Create data view</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Create {kib} index patterns.
|
||||
experimental[] Create data views.
|
||||
|
||||
[[index-patterns-api-create-request]]
|
||||
[[data-views-api-create-request]]
|
||||
==== Request
|
||||
|
||||
`POST <kibana host>:<port>/api/index_patterns/index_pattern`
|
||||
|
||||
`POST <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern`
|
||||
|
||||
[[index-patterns-api-create-path-params]]
|
||||
[[data-views-api-create-path-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
[[index-patterns-api-create-body-params]]
|
||||
[[data-views-api-create-body-params]]
|
||||
==== Request body
|
||||
|
||||
`override`:: (Optional, boolean) Overrides an existing index pattern if an
|
||||
index pattern with the provided title already exists. The default is `false`.
|
||||
`override`:: (Optional, boolean) Overrides an existing data view if a
|
||||
data view with the provided title already exists. The default is `false`.
|
||||
|
||||
`refresh_fields`:: (Optional, boolean) Reloads index pattern fields after
|
||||
the index pattern is stored. The default is `false`.
|
||||
`refresh_fields`:: (Optional, boolean) Reloads data view fields after
|
||||
the data view is stored. The default is `false`.
|
||||
|
||||
`index_pattern`:: (Required, object) The index pattern object. All fields are optional.
|
||||
`index_pattern`:: (Required, object) The data view object. All fields are optional.
|
||||
|
||||
[[index-patterns-api-create-request-codes]]
|
||||
[[data-views-api-create-request-codes]]
|
||||
==== Response code
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[index-patterns-api-create-example]]
|
||||
[[data-views-api-create-example]]
|
||||
==== Examples
|
||||
|
||||
Create an index pattern with a custom title:
|
||||
Create a data view with a custom title:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -67,7 +67,7 @@ $ curl -X POST api/index_patterns/index_pattern
|
|||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
At creation, all index pattern fields are optional:
|
||||
At creation, all data view fields are optional:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -92,7 +92,7 @@ $ curl -X POST api/index_patterns/index_pattern
|
|||
// KIBANA
|
||||
|
||||
|
||||
The API returns the index pattern object:
|
||||
The API returns the data view object:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,34 +1,34 @@
|
|||
[[index-patterns-api-default-get]]
|
||||
=== Get default index pattern API
|
||||
[[data-views-api-default-get]]
|
||||
=== Get default data view API
|
||||
++++
|
||||
<titleabbrev>Get default index pattern</titleabbrev>
|
||||
<titleabbrev>Get default data view</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Retrieve a default index pattern ID. Kibana UI uses default index pattern unless user picks a different one.
|
||||
experimental[] Retrieve a default data view ID. Kibana UI uses the default data view unless user picks a different one.
|
||||
|
||||
[[index-patterns-api-default-get-request]]
|
||||
[[data-views-api-default-get-request]]
|
||||
==== Request
|
||||
|
||||
`GET <kibana host>:<port>/api/index_patterns/default`
|
||||
|
||||
`GET <kibana host>:<port>/s/<space_id>/api/index_patterns/default`
|
||||
|
||||
[[index-patterns-api-default-get-params]]
|
||||
[[data-views-api-default-get-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
[[index-patterns-api-default-get-codes]]
|
||||
[[data-views-api-default-get-codes]]
|
||||
==== Response code
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[index-patterns-api-default-get-example]]
|
||||
[[data-views-api-default-get-example]]
|
||||
==== Example
|
||||
|
||||
Retrieve the default index pattern id:
|
||||
Retrieve the default data view id:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -36,7 +36,7 @@ $ curl -X GET api/index_patterns/default
|
|||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
The API returns an ID of a default index pattern:
|
||||
The API returns an ID of a default data view:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -45,7 +45,7 @@ The API returns an ID of a default index pattern:
|
|||
}
|
||||
--------------------------------------------------
|
||||
|
||||
In case there is no default index pattern, the API returns:
|
||||
In case there is no default data view, the API returns:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,43 +1,43 @@
|
|||
[[index-patterns-api-default-set]]
|
||||
=== Set default index pattern API
|
||||
[[data-views-api-default-set]]
|
||||
=== Set default data view API
|
||||
++++
|
||||
<titleabbrev>Set default index pattern</titleabbrev>
|
||||
<titleabbrev>Set default data view</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Set a default index pattern ID. Kibana UI will use default index pattern unless user picks a different one.
|
||||
experimental[] Set a default data view ID. Kibana UI will use the default data view unless user picks a different one.
|
||||
The API doesn't validate if given `index_pattern_id` is a valid id.
|
||||
|
||||
[[index-patterns-api-default-set-request]]
|
||||
[[data-views-api-default-set-request]]
|
||||
==== Request
|
||||
|
||||
`POST <kibana host>:<port>/api/index_patterns/default`
|
||||
|
||||
`POST <kibana host>:<port>/s/<space_id>/api/index_patterns/default`
|
||||
|
||||
[[index-patterns-api-default-set-params]]
|
||||
[[data-views-api-default-set-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
[[index-patterns-api-default-set-body]]
|
||||
[[data-views-api-default-set-body]]
|
||||
==== Request body
|
||||
|
||||
`index_pattern_id`:: (Required, `string` or `null`) Sets a default index pattern id. Use `null` to unset a default index pattern.
|
||||
`index_pattern_id`:: (Required, `string` or `null`) Sets a default data view id. Use `null` to unset a default data view.
|
||||
|
||||
`force`:: (Optional, boolean) Updates existing default index pattern id. The default is `false`.
|
||||
`force`:: (Optional, boolean) Updates existing default data view id. The default is `false`.
|
||||
|
||||
|
||||
[[index-patterns-api-default-set-codes]]
|
||||
[[data-views-api-default-set-codes]]
|
||||
==== Response code
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[index-patterns-api-default-set-example]]
|
||||
[[data-views-api-default-set-example]]
|
||||
==== Example
|
||||
|
||||
Set the default index pattern id if none is set:
|
||||
Set the default data view id if none is set:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -49,7 +49,7 @@ $ curl -X POST api/index_patterns/default
|
|||
// KIBANA
|
||||
|
||||
|
||||
Upsert the default index pattern:
|
||||
Upsert the default data view:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -61,7 +61,7 @@ $ curl -X POST api/index_patterns/default
|
|||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
Unset the default index pattern:
|
||||
Unset the default data view:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,38 +1,38 @@
|
|||
[[index-patterns-api-delete]]
|
||||
=== Delete index pattern API
|
||||
[[data-views-api-delete]]
|
||||
=== Delete data view API
|
||||
++++
|
||||
<titleabbrev>Delete index pattern</titleabbrev>
|
||||
<titleabbrev>Delete data view</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Delete {kib} index patterns.
|
||||
experimental[] Delete data views.
|
||||
|
||||
WARNING: Once you delete an index pattern, _it cannot be recovered_.
|
||||
WARNING: Once you delete a data view, _it cannot be recovered_.
|
||||
|
||||
[[index-patterns-api-delete-request]]
|
||||
[[data-views-api-delete-request]]
|
||||
==== Request
|
||||
|
||||
`DELETE <kibana host>:<port>/api/index_patterns/index_pattern/<id>`
|
||||
|
||||
`DELETE <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<id>`
|
||||
|
||||
[[index-patterns-api-delete-path-params]]
|
||||
[[data-views-api-delete-path-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
`id`::
|
||||
(Required, string) The ID of the index pattern you want to delete.
|
||||
(Required, string) The ID of the data view you want to delete.
|
||||
|
||||
[[index-patterns-api-delete-response-codes]]
|
||||
[[data-views-api-delete-response-codes]]
|
||||
==== Response code
|
||||
|
||||
`200`::
|
||||
Indicates that index pattern is deleted. Returns an empty response body.
|
||||
Indicates that data view is deleted. Returns an empty response body.
|
||||
|
||||
==== Example
|
||||
|
||||
Delete an index pattern object with the `my-pattern` ID:
|
||||
Delete a data view object with the `my-pattern` ID:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,40 +1,40 @@
|
|||
[[index-patterns-api-get]]
|
||||
=== Get index pattern API
|
||||
[[data-views-api-get]]
|
||||
=== Get data view API
|
||||
++++
|
||||
<titleabbrev>Get index pattern</titleabbrev>
|
||||
<titleabbrev>Get data view</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Retrieve a single {kib} index pattern by ID.
|
||||
experimental[] Retrieve a single data view by ID.
|
||||
|
||||
[[index-patterns-api-get-request]]
|
||||
[[data-views-api-get-request]]
|
||||
==== Request
|
||||
|
||||
`GET <kibana host>:<port>/api/index_patterns/index_pattern/<id>`
|
||||
|
||||
`GET <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<id>`
|
||||
|
||||
[[index-patterns-api-get-params]]
|
||||
[[data-views-api-get-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
`id`::
|
||||
(Required, string) The ID of the index pattern you want to retrieve.
|
||||
(Required, string) The ID of the data view you want to retrieve.
|
||||
|
||||
[[index-patterns-api-get-codes]]
|
||||
[[data-views-api-get-codes]]
|
||||
==== Response code
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
`404`::
|
||||
The specified index pattern and ID doesn't exist.
|
||||
The specified data view and ID doesn't exist.
|
||||
|
||||
[[index-patterns-api-get-example]]
|
||||
[[data-views-api-get-example]]
|
||||
==== Example
|
||||
|
||||
Retrieve the index pattern object with the `my-pattern` ID:
|
||||
Retrieve the data view object with the `my-pattern` ID:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -42,7 +42,7 @@ $ curl -X GET api/index_patterns/index_pattern/my-pattern
|
|||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
The API returns an index pattern object:
|
||||
The API returns a data view object:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,4 +1,4 @@
|
|||
[[index-patterns-runtime-field-api-create]]
|
||||
[[data-views-runtime-field-api-create]]
|
||||
=== Create runtime field API
|
||||
++++
|
||||
<titleabbrev>Create runtime field</titleabbrev>
|
||||
|
@ -6,23 +6,23 @@
|
|||
|
||||
experimental[] Create a runtime field
|
||||
|
||||
[[index-patterns-runtime-field-create-request]]
|
||||
[[data-views-runtime-field-create-request]]
|
||||
==== Request
|
||||
|
||||
`POST <kibana host>:<port>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field`
|
||||
|
||||
`POST <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field`
|
||||
|
||||
[[index-patterns-runtime-field-create-params]]
|
||||
[[data-views-runtime-field-create-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
`index_pattern_id`::
|
||||
(Required, string) The ID of the index pattern.
|
||||
(Required, string) The ID of the data view.
|
||||
|
||||
[[index-patterns-runtime-field-create-body]]
|
||||
[[data-views-runtime-field-create-body]]
|
||||
==== Request body
|
||||
|
||||
`name`:: (Required, string) The name for a runtime field.
|
||||
|
@ -30,10 +30,10 @@ experimental[] Create a runtime field
|
|||
`runtimeField`:: (Required, object) The runtime field definition object.
|
||||
|
||||
|
||||
[[index-patterns-runtime-field-create-example]]
|
||||
[[data-views-runtime-field-create-example]]
|
||||
==== Examples
|
||||
|
||||
Create a runtime field on an index pattern:
|
||||
Create a runtime field on a data view:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -50,7 +50,7 @@ $ curl -X POST api/index_patterns/index_pattern/<index_pattern_id>/runtime_field
|
|||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
The API returns created runtime field object and update index pattern object:
|
||||
The API returns created runtime field object and updated data view object:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,26 +1,26 @@
|
|||
[[index-patterns-runtime-field-api-delete]]
|
||||
[[data-views-runtime-field-api-delete]]
|
||||
=== Delete runtime field API
|
||||
++++
|
||||
<titleabbrev>Delete runtime field</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Delete a runtime field from an index pattern.
|
||||
experimental[] Delete a runtime field from a data view.
|
||||
|
||||
[[index-patterns-runtime-field-api-delete-request]]
|
||||
[[data-views-runtime-field-api-delete-request]]
|
||||
==== Request
|
||||
|
||||
`DELETE <kibana host>:<port>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field/<name>`
|
||||
|
||||
`DELETE <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field/<name>`
|
||||
|
||||
[[index-patterns-runtime-field-api-delete-path-params]]
|
||||
[[data-views-runtime-field-api-delete-path-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
`index_pattern_id`::
|
||||
(Required, string) The ID of the index pattern your want to delete a runtime field from.
|
||||
(Required, string) The ID of the data view your want to delete a runtime field from.
|
||||
|
||||
`name`::
|
||||
(Required, string) The name of the runtime field you want to delete.
|
||||
|
@ -28,7 +28,7 @@ experimental[] Delete a runtime field from an index pattern.
|
|||
|
||||
==== Example
|
||||
|
||||
Delete a runtime field from an index pattern:
|
||||
Delete a runtime field from a data view:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,4 +1,4 @@
|
|||
[[index-patterns-runtime-field-api-get]]
|
||||
[[data-views-runtime-field-api-get]]
|
||||
=== Get runtime field API
|
||||
++++
|
||||
<titleabbrev>Get runtime field</titleabbrev>
|
||||
|
@ -6,30 +6,30 @@
|
|||
|
||||
experimental[] Get a runtime field
|
||||
|
||||
[[index-patterns-runtime-field-get-request]]
|
||||
[[data-views-runtime-field-get-request]]
|
||||
==== Request
|
||||
|
||||
`GET <kibana host>:<port>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field/<name>`
|
||||
|
||||
`GET <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field/<name>`
|
||||
|
||||
[[index-patterns-runtime-field-get-params]]
|
||||
[[data-views-runtime-field-get-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
`index_pattern_id`::
|
||||
(Required, string) The ID of the index pattern.
|
||||
(Required, string) The ID of the data view.
|
||||
|
||||
`name`::
|
||||
(Required, string) The name of the runtime field you want to retrieve.
|
||||
|
||||
|
||||
[[index-patterns-runtime-field-get-example]]
|
||||
[[data-views-runtime-field-get-example]]
|
||||
==== Example
|
||||
|
||||
Retrieve a runtime field named `foo` of index pattern with the `my-pattern` ID:
|
||||
Retrieve a runtime field named `foo` of data view with the `my-pattern` ID:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,4 +1,4 @@
|
|||
[[index-patterns-runtime-field-api-update]]
|
||||
[[data-views-runtime-field-api-update]]
|
||||
=== Update runtime field API
|
||||
++++
|
||||
<titleabbrev>Update runtime field</titleabbrev>
|
||||
|
@ -6,26 +6,26 @@
|
|||
|
||||
experimental[] Update an existing runtime field
|
||||
|
||||
[[index-patterns-runtime-field-update-request]]
|
||||
[[data-views-runtime-field-update-request]]
|
||||
==== Request
|
||||
|
||||
`POST <kibana host>:<port>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field/<name>`
|
||||
|
||||
`POST <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field/<name>`
|
||||
|
||||
[[index-patterns-runtime-field-update-params]]
|
||||
[[data-views-runtime-field-update-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
`index_pattern_id`::
|
||||
(Required, string) The ID of the index pattern.
|
||||
(Required, string) The ID of the data view.
|
||||
|
||||
`name`::
|
||||
(Required, string) The name of the runtime field you want to update.
|
||||
|
||||
[[index-patterns-runtime-field-update-body]]
|
||||
[[data-views-runtime-field-update-body]]
|
||||
==== Request body
|
||||
|
||||
`runtimeField`:: (Required, object) The runtime field definition object.
|
||||
|
@ -37,10 +37,10 @@ You can update following fields:
|
|||
|
||||
|
||||
|
||||
[[index-patterns-runtime-field-update-example]]
|
||||
[[data-views-runtime-field-update-example]]
|
||||
==== Examples
|
||||
|
||||
Update an existing runtime field on an index pattern:
|
||||
Update an existing runtime field on a data view:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -55,7 +55,7 @@ $ curl -X POST api/index_patterns/index_pattern/<index_pattern_id>/runtime_field
|
|||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
The API returns updated runtime field object and updated index pattern object:
|
||||
The API returns updated runtime field object and updated data view object:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,4 +1,4 @@
|
|||
[[index-patterns-runtime-field-api-upsert]]
|
||||
[[data-views-runtime-field-api-upsert]]
|
||||
=== Upsert runtime field API
|
||||
++++
|
||||
<titleabbrev>Upsert runtime field</titleabbrev>
|
||||
|
@ -6,23 +6,23 @@
|
|||
|
||||
experimental[] Create or update an existing runtime field
|
||||
|
||||
[[index-patterns-runtime-field-upsert-request]]
|
||||
[[data-views-runtime-field-upsert-request]]
|
||||
==== Request
|
||||
|
||||
`PUT <kibana host>:<port>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field`
|
||||
|
||||
`PUT <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<index_pattern_id>/runtime_field`
|
||||
|
||||
[[index-patterns-runtime-field-upsert-params]]
|
||||
[[data-views-runtime-field-upsert-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
`index_pattern_id`::
|
||||
(Required, string) The ID of the index pattern.
|
||||
(Required, string) The ID of the data view.
|
||||
|
||||
[[index-patterns-runtime-field-upsert-body]]
|
||||
[[data-views-runtime-field-upsert-body]]
|
||||
==== Request body
|
||||
|
||||
`name`:: (Required, string) The name for a new runtime field or a name of an existing runtime field.
|
||||
|
@ -30,10 +30,10 @@ experimental[] Create or update an existing runtime field
|
|||
`runtimeField`:: (Required, object) The runtime field definition object.
|
||||
|
||||
|
||||
[[index-patterns-runtime-field-upsert-example]]
|
||||
[[data-views-runtime-field-upsert-example]]
|
||||
==== Examples
|
||||
|
||||
Create or update an existing runtime field on an index pattern:
|
||||
Create or update an existing runtime field on a data view:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -50,7 +50,7 @@ $ curl -X PUT api/index_patterns/index_pattern/<index_pattern_id>/runtime_field
|
|||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
The API returns created or updated runtime field object and updated index pattern object:
|
||||
The API returns created or updated runtime field object and updated data view object:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,43 +1,43 @@
|
|||
[[index-patterns-fields-api-update]]
|
||||
=== Update index pattern fields API
|
||||
[[data-views-fields-api-update]]
|
||||
=== Update data view fields API
|
||||
++++
|
||||
<titleabbrev>Update index pattern fields metadata</titleabbrev>
|
||||
<titleabbrev>Update data view fields metadata</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Update fields presentation metadata, such as `count`,
|
||||
`customLabel`, and `format`. You can update multiple fields in one request. Updates
|
||||
are merged with persisted metadata. To remove existing metadata, specify `null` as the value.
|
||||
|
||||
[[index-patterns-fields-api-update-request]]
|
||||
[[data-views-fields-api-update-request]]
|
||||
==== Request
|
||||
|
||||
`POST <kibana host>:<port>/api/index_patterns/index_pattern/<id>/fields`
|
||||
|
||||
`POST <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<id>/fields`
|
||||
|
||||
[[index-patterns-fields-api-update-path-params]]
|
||||
[[data-views-fields-api-update-path-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
`id`::
|
||||
(Required, string) The ID of the index pattern fields you want to update.
|
||||
(Required, string) The ID of the data view fields you want to update.
|
||||
|
||||
[[index-patterns-fields-api-update-request-body]]
|
||||
[[data-views-fields-api-update-request-body]]
|
||||
==== Request body
|
||||
|
||||
`fields`::
|
||||
(Required, object) the field object
|
||||
|
||||
|
||||
[[index-patterns-fields-api-update-errors-codes]]
|
||||
[[data-views-fields-api-update-errors-codes]]
|
||||
==== Response code
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[index-patterns-fields-api-update-example]]
|
||||
[[data-views-fields-api-update-example]]
|
||||
==== Examples
|
||||
|
||||
Set popularity `count` for field `foo`:
|
||||
|
@ -89,7 +89,7 @@ $ curl -X POST api/saved_objects/index-pattern/my-pattern/fields
|
|||
// KIBANA
|
||||
|
||||
|
||||
The endpoint returns the updated index pattern object:
|
||||
The endpoint returns the updated data view object:
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
{
|
|
@ -1,36 +1,36 @@
|
|||
[[index-patterns-api-update]]
|
||||
=== Update index pattern API
|
||||
[[data-views-api-update]]
|
||||
=== Update data view API
|
||||
++++
|
||||
<titleabbrev>Update index pattern</titleabbrev>
|
||||
<titleabbrev>Update data view</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Update part of an index pattern. Only the specified fields are updated in the
|
||||
index pattern. Unspecified fields stay as they are persisted.
|
||||
experimental[] Update part of an data view. Only the specified fields are updated in the
|
||||
data view. Unspecified fields stay as they are persisted.
|
||||
|
||||
[[index-patterns-api-update-request]]
|
||||
[[data-views-api-update-request]]
|
||||
==== Request
|
||||
|
||||
`POST <kibana host>:<port>/api/index_patterns/index_pattern/<id>`
|
||||
|
||||
`POST <kibana host>:<port>/s/<space_id>/api/index_patterns/index_pattern/<id>`
|
||||
|
||||
[[index-patterns-api-update-path-params]]
|
||||
[[data-views-api-update-path-params]]
|
||||
==== Path parameters
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
`id`::
|
||||
(Required, string) The ID of the index pattern you want to update.
|
||||
(Required, string) The ID of the data view you want to update.
|
||||
|
||||
[[index-patterns-api-update-request-body]]
|
||||
[[data-views-api-update-request-body]]
|
||||
==== Request body
|
||||
|
||||
`refresh_fields`:: (Optional, boolean) Reloads the index pattern fields after
|
||||
the index pattern is updated. The default is `false`.
|
||||
`refresh_fields`:: (Optional, boolean) Reloads the data view fields after
|
||||
the data view is updated. The default is `false`.
|
||||
|
||||
`index_pattern`::
|
||||
(Required, object) The index patterns fields you want to update.
|
||||
(Required, object) The data view fields you want to update.
|
||||
+
|
||||
|
||||
You can partially update the following fields:
|
||||
|
@ -43,16 +43,16 @@ You can partially update the following fields:
|
|||
* `type`
|
||||
* `typeMeta`
|
||||
|
||||
[[index-patterns-api-update-errors-codes]]
|
||||
[[data-views-api-update-errors-codes]]
|
||||
==== Response code
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[index-patterns-api-update-example]]
|
||||
[[data-views-api-update-example]]
|
||||
==== Examples
|
||||
|
||||
Update a title of the `<my-pattern>` index pattern:
|
||||
Update a title of the `<my-pattern>` data view:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -100,7 +100,7 @@ $ curl -X POST api/saved_objects/index-pattern/my-pattern
|
|||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
The API returns the updated index pattern object:
|
||||
The API returns the updated data view object:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
|
@ -1,42 +0,0 @@
|
|||
[[index-patterns-api]]
|
||||
== Index patterns APIs
|
||||
|
||||
experimental[] Manage {kib} index patterns.
|
||||
|
||||
WARNING: Do not write documents directly to the `.kibana` index. When you write directly
|
||||
to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions.
|
||||
|
||||
WARNING: Use the index patterns API for managing {kib} index patterns instead of lower-level <<saved-objects-api, saved objects API>>.
|
||||
|
||||
The following index patterns APIs are available:
|
||||
|
||||
* Index patterns
|
||||
** <<index-patterns-api-get, Get index pattern API>> to retrieve a single {kib} index pattern
|
||||
** <<index-patterns-api-create, Create index pattern API>> to create {kib} index pattern
|
||||
** <<index-patterns-api-update, Update index pattern API>> to partially updated {kib} index pattern
|
||||
** <<index-patterns-api-delete, Delete index pattern API>> to delete {kib} index pattern
|
||||
* Default index pattern
|
||||
** <<index-patterns-api-default-get, Get default index pattern API>> to retrieve a default index pattern
|
||||
** <<index-patterns-api-default-set, Set default index pattern API>> to set a default index pattern
|
||||
* Fields
|
||||
** <<index-patterns-fields-api-update, Update index pattern field>> to change field metadata, such as `count`, `customLabel` and `format`
|
||||
* Runtime fields
|
||||
** <<index-patterns-runtime-field-api-get, Get runtime field API>> to retrieve a runtime field
|
||||
** <<index-patterns-runtime-field-api-create, Create runtime field API>> to create a runtime field
|
||||
** <<index-patterns-runtime-field-api-upsert, Upsert runtime field API>> to create or update a runtime field
|
||||
** <<index-patterns-runtime-field-api-update, Update runtime field API>> to partially update an existing runtime field
|
||||
** <<index-patterns-runtime-field-api-delete, Delete runtime field API>> to delete a runtime field
|
||||
|
||||
include::index-patterns/get.asciidoc[]
|
||||
include::index-patterns/create.asciidoc[]
|
||||
include::index-patterns/update.asciidoc[]
|
||||
include::index-patterns/delete.asciidoc[]
|
||||
include::index-patterns/default-get.asciidoc[]
|
||||
include::index-patterns/default-set.asciidoc[]
|
||||
include::index-patterns/update-fields.asciidoc[]
|
||||
include::index-patterns/runtime-fields/get.asciidoc[]
|
||||
include::index-patterns/runtime-fields/create.asciidoc[]
|
||||
include::index-patterns/runtime-fields/upsert.asciidoc[]
|
||||
include::index-patterns/runtime-fields/update.asciidoc[]
|
||||
include::index-patterns/runtime-fields/delete.asciidoc[]
|
||||
|
|
@ -6,7 +6,7 @@ Manage {kib} saved objects, including dashboards, visualizations, and more.
|
|||
WARNING: Do not write documents directly to the `.kibana` index. When you write directly
|
||||
to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions.
|
||||
|
||||
NOTE: For managing {kib} index patterns, use the <<index-patterns-api, index patterns API>>.
|
||||
NOTE: For managing {kib} index patterns, use the <<data-views-api, index patterns API>>.
|
||||
|
||||
The following saved objects APIs are available:
|
||||
|
||||
|
|
|
@ -380,3 +380,63 @@ This content has moved. Refer to <<data-views>>.
|
|||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<managing-data-views>>.
|
||||
|
||||
[role="exclude",id="index-patterns-api"]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-api>>.
|
||||
|
||||
[role="exclude",id="index-patterns-api-create"]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-api-create>>.
|
||||
|
||||
[role="exclude",id="index-patterns-api-default-get"]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-api-default-get>>.
|
||||
|
||||
[role="exclude",id="index-patterns-api-default-set"]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-api-default-set>>.
|
||||
|
||||
[role="exclude",id="index-patterns-api-delete"]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-api-delete>>.
|
||||
|
||||
[role="exclude",id="index-patterns-api-get"]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-api-get>>.
|
||||
|
||||
[role="exclude",id="index-patterns-runtime-field-api-create"]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-runtime-field-api-create>>.
|
||||
|
||||
[role="exclude",id="index-patterns-runtime-field-api-delete]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-runtime-field-api-delete>>.
|
||||
|
||||
[role="exclude",id="index-patterns-runtime-field-api-get]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-runtime-field-api-get>>.
|
||||
|
||||
[role="exclude",id="index-patterns-runtime-field-api-update]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-runtime-field-api-update>>.
|
||||
|
||||
[role="exclude",id="index-patterns-runtime-field-api-upsert]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-runtime-field-api-upsert>>.
|
||||
|
||||
[role="exclude",id="index-patterns-api-update]
|
||||
== Index patterns has been renamed to data views.
|
||||
|
||||
This content has moved. Refer to <<data-views-api-update>>.
|
||||
|
|
|
@ -91,7 +91,7 @@ include::{kib-repo-dir}/api/spaces-management.asciidoc[]
|
|||
include::{kib-repo-dir}/api/role-management.asciidoc[]
|
||||
include::{kib-repo-dir}/api/session-management.asciidoc[]
|
||||
include::{kib-repo-dir}/api/saved-objects.asciidoc[]
|
||||
include::{kib-repo-dir}/api/index-patterns.asciidoc[]
|
||||
include::{kib-repo-dir}/api/data-views.asciidoc[]
|
||||
include::{kib-repo-dir}/api/alerting.asciidoc[]
|
||||
include::{kib-repo-dir}/api/actions-and-connectors.asciidoc[]
|
||||
include::{kib-repo-dir}/api/dashboard-api.asciidoc[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue