From cf43ba2f2702bdcb857d19290931ba6bfc84ff5a Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Tue, 20 Aug 2024 10:29:06 -0700 Subject: [PATCH] [DOCS] Remove saved object and data view API pages (#190654) Co-authored-by: florent-leborgne --- docs/api/dashboard-api.asciidoc | 2 +- docs/api/dashboard/export-dashboard.asciidoc | 2 +- docs/api/dashboard/import-dashboard.asciidoc | 2 +- docs/api/data-views.asciidoc | 18 +- docs/api/data-views/create.asciidoc | 260 ------------ docs/api/data-views/default-get.asciidoc | 61 --- docs/api/data-views/default-set.asciidoc | 89 ---- docs/api/data-views/delete.asciidoc | 46 -- docs/api/data-views/get-all.asciidoc | 61 --- docs/api/data-views/get.asciidoc | 70 ---- .../data-views/runtime-fields/create.asciidoc | 63 --- .../data-views/runtime-fields/delete.asciidoc | 41 -- .../data-views/runtime-fields/get.asciidoc | 55 --- .../data-views/runtime-fields/update.asciidoc | 72 ---- .../data-views/runtime-fields/upsert.asciidoc | 67 --- docs/api/data-views/swap_references.asciidoc | 86 ---- .../swap_references_preview.asciidoc | 70 ---- docs/api/data-views/update-fields.asciidoc | 155 ------- docs/api/data-views/update.asciidoc | 121 ------ docs/api/index-patterns/create.asciidoc | 2 +- docs/api/index-patterns/default-get.asciidoc | 2 +- docs/api/index-patterns/default-set.asciidoc | 2 +- docs/api/index-patterns/get.asciidoc | 2 +- .../runtime-fields/create.asciidoc | 2 +- .../runtime-fields/delete.asciidoc | 2 +- .../runtime-fields/get.asciidoc | 2 +- .../runtime-fields/update.asciidoc | 2 +- .../runtime-fields/upsert.asciidoc | 2 +- .../api/index-patterns/update-fields.asciidoc | 2 +- docs/api/index-patterns/update.asciidoc | 2 +- docs/api/saved-objects.asciidoc | 19 +- docs/api/saved-objects/bulk_create.asciidoc | 145 ------- docs/api/saved-objects/bulk_delete.asciidoc | 111 ----- docs/api/saved-objects/bulk_get.asciidoc | 110 ----- docs/api/saved-objects/bulk_resolve.asciidoc | 192 --------- docs/api/saved-objects/bulk_update.asciidoc | 116 ----- docs/api/saved-objects/create.asciidoc | 110 ----- docs/api/saved-objects/delete.asciidoc | 56 --- docs/api/saved-objects/export.asciidoc | 138 ------ docs/api/saved-objects/find.asciidoc | 123 ------ docs/api/saved-objects/get.asciidoc | 118 ------ docs/api/saved-objects/import.asciidoc | 395 ------------------ docs/api/saved-objects/resolve.asciidoc | 148 ------- .../resolve_import_errors.asciidoc | 241 ----------- .../rotate_encryption_key.asciidoc | 112 ----- docs/api/saved-objects/update.asciidoc | 93 ----- .../managing-saved-objects.asciidoc | 3 +- .../saved-objects/saved-object-ids.asciidoc | 11 +- docs/redirects.asciidoc | 151 ++++++- docs/user/dashboard/dashboard.asciidoc | 2 +- .../security/secure-saved-objects.asciidoc | 4 +- 51 files changed, 175 insertions(+), 3586 deletions(-) delete mode 100644 docs/api/data-views/create.asciidoc delete mode 100644 docs/api/data-views/default-get.asciidoc delete mode 100644 docs/api/data-views/default-set.asciidoc delete mode 100644 docs/api/data-views/delete.asciidoc delete mode 100644 docs/api/data-views/get-all.asciidoc delete mode 100644 docs/api/data-views/get.asciidoc delete mode 100644 docs/api/data-views/runtime-fields/create.asciidoc delete mode 100644 docs/api/data-views/runtime-fields/delete.asciidoc delete mode 100644 docs/api/data-views/runtime-fields/get.asciidoc delete mode 100644 docs/api/data-views/runtime-fields/update.asciidoc delete mode 100644 docs/api/data-views/runtime-fields/upsert.asciidoc delete mode 100644 docs/api/data-views/swap_references.asciidoc delete mode 100644 docs/api/data-views/swap_references_preview.asciidoc delete mode 100644 docs/api/data-views/update-fields.asciidoc delete mode 100644 docs/api/data-views/update.asciidoc delete mode 100644 docs/api/saved-objects/bulk_create.asciidoc delete mode 100644 docs/api/saved-objects/bulk_delete.asciidoc delete mode 100644 docs/api/saved-objects/bulk_get.asciidoc delete mode 100644 docs/api/saved-objects/bulk_resolve.asciidoc delete mode 100644 docs/api/saved-objects/bulk_update.asciidoc delete mode 100644 docs/api/saved-objects/create.asciidoc delete mode 100644 docs/api/saved-objects/delete.asciidoc delete mode 100644 docs/api/saved-objects/export.asciidoc delete mode 100644 docs/api/saved-objects/find.asciidoc delete mode 100644 docs/api/saved-objects/get.asciidoc delete mode 100644 docs/api/saved-objects/import.asciidoc delete mode 100644 docs/api/saved-objects/resolve.asciidoc delete mode 100644 docs/api/saved-objects/resolve_import_errors.asciidoc delete mode 100644 docs/api/saved-objects/rotate_encryption_key.asciidoc delete mode 100644 docs/api/saved-objects/update.asciidoc diff --git a/docs/api/dashboard-api.asciidoc b/docs/api/dashboard-api.asciidoc index e8d0a829d178dc..60df46b899f143 100644 --- a/docs/api/dashboard-api.asciidoc +++ b/docs/api/dashboard-api.asciidoc @@ -1,7 +1,7 @@ [[dashboard-api]] == Import and export dashboard APIs -deprecated::[7.15.0,Both of these APIs have been deprecated in favor of <> and <>.] +deprecated::[7.15.0,Both of these APIs have been deprecated in favor of the {api-kibana}/group/endpoint-saved-objects[saved objects API].] Import and export dashboards with the corresponding saved objects, such as visualizations, saved searches, and data views. diff --git a/docs/api/dashboard/export-dashboard.asciidoc b/docs/api/dashboard/export-dashboard.asciidoc index 3a20eff0a54d25..675834a0f5561e 100644 --- a/docs/api/dashboard/export-dashboard.asciidoc +++ b/docs/api/dashboard/export-dashboard.asciidoc @@ -4,7 +4,7 @@ Export dashboard ++++ -deprecated::[7.15.0,Use <> instead.] +deprecated::[7.15.0,Use the {api-kibana}/group/endpoint-saved-objects[saved objects API] instead.] Export dashboards and corresponding saved objects. diff --git a/docs/api/dashboard/import-dashboard.asciidoc b/docs/api/dashboard/import-dashboard.asciidoc index e4817d6cb7ee9b..e4bdb3abce989a 100644 --- a/docs/api/dashboard/import-dashboard.asciidoc +++ b/docs/api/dashboard/import-dashboard.asciidoc @@ -4,7 +4,7 @@ Import dashboard ++++ -deprecated::[7.15.0,Use <> instead.] +deprecated::[7.15.0,Use the {api-kibana}/group/endpoint-saved-objects[saved objects API] instead.] Import dashboards and corresponding saved objects. diff --git a/docs/api/data-views.asciidoc b/docs/api/data-views.asciidoc index 8ee8038c2517ed..62d1546bdfd45a 100644 --- a/docs/api/data-views.asciidoc +++ b/docs/api/data-views.asciidoc @@ -3,26 +3,10 @@ Manage data views, formerly known as {kib} index patterns. -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. +For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. 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 <>. -include::data-views/get-all.asciidoc[] -include::data-views/get.asciidoc[] -include::data-views/create.asciidoc[] -include::data-views/update.asciidoc[] -include::data-views/delete.asciidoc[] -include::data-views/swap_references_preview.asciidoc[] -include::data-views/swap_references.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[] - diff --git a/docs/api/data-views/create.asciidoc b/docs/api/data-views/create.asciidoc deleted file mode 100644 index 88303e9ffe173c..00000000000000 --- a/docs/api/data-views/create.asciidoc +++ /dev/null @@ -1,260 +0,0 @@ -[[data-views-api-create]] -=== Create data view API -++++ -Create data view -++++ - -Create data views. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-api-create-request]] -==== Request - -`POST :/api/data_views/data_view` - -`POST :/s//api/data_views/data_view` - - -[[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. - - -[[data-views-api-create-body-params]] -==== Request body - -`override`:: (Optional, boolean) Overrides an existing data view if a -data view with the provided title already exists. The default is `false`. - -`data_view`:: (Required, object) The data view object. All fields are optional. - - -[[data-views-api-create-request-codes]] -==== Response code - -`200`:: - Indicates a successful call. - - -[[data-views-api-create-example]] -==== Examples - -To explore the data in the `logstash-*` indices, create a {data-source}: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view -{ - "data_view": { - "title": "logstash-*", - "name": "My Logstash Data View" - } -} --------------------------------------------------- -// KIBANA - -To create custom field formats, use the `data_view.fieldFormats` property: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view -{ - "data_view": { - "title": "logstash-*", - "name": "My Logstash data view 2", - "fieldFormats": { - "event_time": { - "id": "date_nanos" - }, - "machine.ram": { - "id": "number", - "params": { - "pattern": "0,0.[000] b" - } - } - } - } -} --------------------------------------------------- -// KIBANA - -To create custom labels, use the `data_view.fieldAttrs` property: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view -{ - "data_view": { - "title": "logstash-*", - "name": "My Logstash data view 3", - "fieldAttrs": { - "utc_time": { - "customLabel": "Time (UTC)" - } - } - } -} --------------------------------------------------- -// KIBANA - -To create a {data-source} with {ref}/runtime-search-request.html[runtime fields], use the `data_view.runtimeFieldMap` property: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view -{ - "data_view": { - "title": "logstash-*", - "name": "My Logstash data view 3", - "runtimeFieldMap": { - "runtime_shape_name": { - "type": "keyword", - "script": { - "source": "emit(doc['shape_name'].value)" - } - } - } - } -} --------------------------------------------------- -// KIBANA - -To create {data-sources} based on {ref}/xpack-rollup.html[rollup indices], use the `data_view.type` and `data_view.typeMeta` properties : - -deprecated::[8.11.0,'Rollups are deprecated and will be removed in a future version. Use {ref}/downsampling.html[downsampling] instead.'] - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view -{ - "data_view": { - "title": "logstash-*", - "name": "My Logstash rollup data view", - "type": "rollup", - "typeMeta": { - "params": { - "rollup_index": "rollup_logstash" - }, - "aggs": { - "terms": { - "geo.dest": { "agg": "terms" }, - "extension.keyword": { "agg": "terms" }, - "geo.src": { "agg": "terms" }, - "machine.os.keyword": { "agg": "terms" } - }, - "date_histogram": { - "@timestamp": { - "agg": "date_histogram", - "fixed_interval": "20m", - "delay": "10m", - "time_zone": "UTC" - } - }, - "avg": { - "memory": { "agg": "avg" }, - "bytes": { "agg": "avg" } - }, - "max": { "memory": { "agg": "max" } }, - "min": { "memory": { "agg": "min" } }, - "sum": { "memory": { "agg": "sum" } }, - "value_count": { "memory": { "agg": "value_count" } }, - "histogram": { - "machine.ram": { - "agg": "histogram", - "interval": 5 - } - } - } - } - } -} --------------------------------------------------- -// KIBANA - -The API returns the {data-source} object: - -[source,sh] --------------------------------------------------- -{ - "data_view": {...} -} --------------------------------------------------- - - -[[data-views-api-properties]] - -==== Properties of the `data_view` object: - -`title`:: -(Optional, string) Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards -(`*`). - -`name`:: -(Optional, string) The {data-source} name. - -`id`:: -(Optional, string) Saved object ID. - -`type`:: -(Optional, string) When set to `rollup`, identifies the rollup {data-sources}. - -`typeMeta`:: -(Optional, object) When you use rollup indices, contains the field list for the rollup -{data-source} API endpoints. -+ -.Properties of the typeMeta objects: -[%collapsible%open] -===== -`aggs`::: -(Required, object) A map of rollup restrictions by aggregation type and field name. - -`params`::: -(Required, object) Properties for retrieving rollup fields. -===== - -`timeFieldName`:: -(Optional, string) Timestamp field name, which you use for time-based {data-sources}. - -`sourceFilters`:: -(Optional, string[]) Array of field names you want to filter out in <>. - -`fieldAttrs`:: -(Optional, object) Map of field attributes by field name. -+ -.Properties of the fieldAttrs[fieldName] objects: -[%collapsible%open] -===== -`customLabel`:: -(Optional, string) Custom label for the field. - -`customDescription`:: -(Optional, string) Custom description for the field. Max length is 300 characters. - -`count`:: -(Optional, number) Popularity count for the field. -===== - -`runtimeFieldMap`:: -(Optional, object) Map of runtime field definitions by field name. -+ -.Properties of the runtimeFieldMap[fieldName] objects: -[%collapsible%open] -===== -`type`::: -(Required, string) Mapping type of the runtime field. For more information, check {ref}/mapping-types.html[Field data types]. - -`script.source`::: -(Required, string) Script of the runtime field. -===== - -`fieldFormats`:: -(Optional, object) Map of field formats by field name. - -`allowNoIndex`:: -(Optional, boolean) Allows the {data-source} saved object to exist before the data is available. - -`namespaces`:: -(Optional, string[]) Array of {kibana-ref}/xpack-spaces.html[space] IDs for sharing the {data-source} between multiple spaces. diff --git a/docs/api/data-views/default-get.asciidoc b/docs/api/data-views/default-get.asciidoc deleted file mode 100644 index a0b23576f5e13f..00000000000000 --- a/docs/api/data-views/default-get.asciidoc +++ /dev/null @@ -1,61 +0,0 @@ -[[data-views-api-default-get]] -=== Get default data view API -++++ -Get default data view -++++ - -Retrieve a default data view ID. Kibana UI uses the default data view unless user picks a different one. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-api-default-get-request]] -==== Request - -`GET :/api/data_views/default` - -`GET :/s//api/data_views/default` - - -[[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. - - -[[data-views-api-default-get-codes]] -==== Response code - -`200`:: -Indicates a successful call. - - -[[data-views-api-default-get-example]] -==== Example - -Retrieve the default data view id: - -[source,sh] --------------------------------------------------- -$ curl -X GET api/data_views/default --------------------------------------------------- -// KIBANA - -The API returns an ID of a default data view: - -[source,sh] --------------------------------------------------- -{ - "data_view_id": "..." -} --------------------------------------------------- - -In case there is no default data view, the API returns: - -[source,sh] --------------------------------------------------- -{ - "data_view_id": null -} --------------------------------------------------- - diff --git a/docs/api/data-views/default-set.asciidoc b/docs/api/data-views/default-set.asciidoc deleted file mode 100644 index e0e6afe5f943e9..00000000000000 --- a/docs/api/data-views/default-set.asciidoc +++ /dev/null @@ -1,89 +0,0 @@ -[[data-views-api-default-set]] -=== Set default data view API -++++ -Set default data view -++++ - -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 `data_view_id` is a valid id. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-api-default-set-request]] -==== Request - -`POST :/api/data_views/default` - -`POST :/s//api/data_views/default` - - -[[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. - - -[[data-views-api-default-set-body]] -==== Request body - -`data_view_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 data view id. The default is `false`. - - - -[[data-views-api-default-set-codes]] -==== Response code - -`200`:: -Indicates a successful call. - - -[[data-views-api-default-set-example]] -==== Example - -Set the default data view id if none is set: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/default -{ - "data_view_id": "..." -} --------------------------------------------------- -// KIBANA - - -Upsert the default data view: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/default -{ - "data_view_id": "...", - "force": true -} --------------------------------------------------- -// KIBANA - -Unset the default data view: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/default -{ - "data_view_id": null, - "force": true -} --------------------------------------------------- -// KIBANA - -The API returns: - -[source,sh] --------------------------------------------------- -{ - "acknowledged": true -} --------------------------------------------------- diff --git a/docs/api/data-views/delete.asciidoc b/docs/api/data-views/delete.asciidoc deleted file mode 100644 index 271c6a48700eee..00000000000000 --- a/docs/api/data-views/delete.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -[[data-views-api-delete]] -=== Delete data view API -++++ -Delete data view -++++ - -Delete data views. - -WARNING: Once you delete a data view, _it cannot be recovered_. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-api-delete-request]] -==== Request - -`DELETE :/api/data_views/data_view/` - -`DELETE :/s//api/data_views/data_view/` - - -[[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 data view you want to delete. - - -[[data-views-api-delete-response-codes]] -==== Response code - -`200`:: - Indicates that data view is deleted. Returns an empty response body. - - -==== Example - -Delete a data view object with the `my-view` ID: - -[source,sh] --------------------------------------------------- -$ curl -X DELETE api/data_views/data_view/my-view --------------------------------------------------- -// KIBANA diff --git a/docs/api/data-views/get-all.asciidoc b/docs/api/data-views/get-all.asciidoc deleted file mode 100644 index 7475c487eb3cd4..00000000000000 --- a/docs/api/data-views/get-all.asciidoc +++ /dev/null @@ -1,61 +0,0 @@ -[[data-views-api-get-all]] -=== Get all data views API -++++ -Get all data views -++++ - -Retrieve a list of all data views. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-api-get-all-request]] -==== Request - -`GET :/api/data_views` - -`GET :/s//api/data_views` - - -[[data-views-api-get-all-codes]] -==== Response code - -`200`:: -Indicates a successful call. - - -[[data-views-api-get-all-example]] -==== Example - -Retrieve the list of data views: - -[source,sh] --------------------------------------------------- -$ curl -X GET api/data_views --------------------------------------------------- -// KIBANA - -The API returns a list of data views: - -[source,sh] --------------------------------------------------- -{ - "data_view": [ - { - "id": "e9e024f0-d098-11ec-bbe9-c753adcb34bc", - "namespaces": [ - "default" - ], - "title": "tmp*", - "type": "rollup", - "typeMeta": {} - }, - { - "id": "90943e30-9a47-11e8-b64d-95841ca0b247", - "namespaces": [ - "default" - ], - "title": "kibana_sample_data_logs" - } - ] -} --------------------------------------------------- diff --git a/docs/api/data-views/get.asciidoc b/docs/api/data-views/get.asciidoc deleted file mode 100644 index 7d8e5e6c7d2e5a..00000000000000 --- a/docs/api/data-views/get.asciidoc +++ /dev/null @@ -1,70 +0,0 @@ -[[data-views-api-get]] -=== Get data view API -++++ -Get data view -++++ - -Retrieve a single data view by ID. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-api-get-request]] -==== Request - -`GET :/api/data_views/data_view/` - -`GET :/s//api/data_views/data_view/` - - -[[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 data view you want to retrieve. - - -[[data-views-api-get-codes]] -==== Response code - -`200`:: -Indicates a successful call. - -`404`:: -The specified data view and ID doesn't exist. - - -[[data-views-api-get-example]] -==== Example - -Retrieve the data view object with the `my-view` ID: - -[source,sh] --------------------------------------------------- -$ curl -X GET api/data_views/data_view/my-view --------------------------------------------------- -// KIBANA - -The API returns a data view object: - -[source,sh] --------------------------------------------------- -{ - "data_view": { - "id": "my-view", - "version": "...", - "title": "...", - "type": "...", - "timeFieldName": "...", - "sourceFilters": [], - "fields": {}, - "typeMeta": {}, - "fieldFormats": {}, - "fieldAttrs": {}, - "runtimeFieldMap" {}, - "allowNoIndex: "..." - } -} --------------------------------------------------- diff --git a/docs/api/data-views/runtime-fields/create.asciidoc b/docs/api/data-views/runtime-fields/create.asciidoc deleted file mode 100644 index 78c5013d641e7d..00000000000000 --- a/docs/api/data-views/runtime-fields/create.asciidoc +++ /dev/null @@ -1,63 +0,0 @@ -[[data-views-runtime-field-api-create]] -=== Create runtime field API -++++ -Create runtime field -++++ - -Create a runtime field - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-runtime-field-create-request]] -==== Request - -`POST :/api/data_views/data_view//runtime_field` - -`POST :/s//api/data_views/data_view//runtime_field` - -[[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. - -`data_view_id`:: -(Required, string) The ID of the data view. - -[[data-views-runtime-field-create-body]] -==== Request body - -`name`:: (Required, string) The name for a runtime field. - -`runtimeField`:: (Required, object) The runtime field definition object. - - -[[data-views-runtime-field-create-example]] -==== Examples - -Create a runtime field on a data view: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view//runtime_field -{ - "name": "runtimeFoo", - "runtimeField": { - "type": "long", - "script": { - "source": "emit(doc["foo"].value)" - } - } -} --------------------------------------------------- -// KIBANA - -The API returns created runtime field object array and updated data view object: - -[source,sh] --------------------------------------------------- -{ - "data_view": {...}, - "fields": [...] -} --------------------------------------------------- diff --git a/docs/api/data-views/runtime-fields/delete.asciidoc b/docs/api/data-views/runtime-fields/delete.asciidoc deleted file mode 100644 index 4ac847002d27f2..00000000000000 --- a/docs/api/data-views/runtime-fields/delete.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -[[data-views-runtime-field-api-delete]] -=== Delete runtime field API -++++ -Delete runtime field -++++ - -Delete a runtime field from a data view. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-runtime-field-api-delete-request]] -==== Request - -`DELETE :/api/data_views/data_view//runtime_field/` - -`DELETE :/s//api/data_views/data_view//runtime_field/` - - -[[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. - -`data_view_id`:: -(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. - - - -==== Example - -Delete a runtime field from a data view: - -[source,sh] --------------------------------------------------- -$ curl -X DELETE api/data_views/data_view//runtime_field/ --------------------------------------------------- -// KIBANA diff --git a/docs/api/data-views/runtime-fields/get.asciidoc b/docs/api/data-views/runtime-fields/get.asciidoc deleted file mode 100644 index d87ff41b20e7dd..00000000000000 --- a/docs/api/data-views/runtime-fields/get.asciidoc +++ /dev/null @@ -1,55 +0,0 @@ -[[data-views-runtime-field-api-get]] -=== Get runtime field API -++++ -Get runtime field -++++ - -Get a runtime field - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-runtime-field-get-request]] -==== Request - -`GET :/api/data_views/data_view//runtime_field/` - -`GET :/s//api/data_views/data_view//runtime_field/` - - -[[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. - -`data_view_id`:: -(Required, string) The ID of the data view. - -`name`:: -(Required, string) The name of the runtime field you want to retrieve. - - -[[data-views-runtime-field-get-example]] -==== Example - -Retrieve a runtime field named `foo` of data view with the `my-view` ID: - -[source,sh] --------------------------------------------------- -$ curl -X GET api/data_views/data_view/my-view/runtime_field/foo --------------------------------------------------- -// KIBANA - -The API returns a runtime `field` object array, and a `runtimeField` definition object: - -[source,sh] --------------------------------------------------- -{ - "fields": [ - ... - ], - "runtimeField": { - ... - } -} --------------------------------------------------- diff --git a/docs/api/data-views/runtime-fields/update.asciidoc b/docs/api/data-views/runtime-fields/update.asciidoc deleted file mode 100644 index 6d927def2df8db..00000000000000 --- a/docs/api/data-views/runtime-fields/update.asciidoc +++ /dev/null @@ -1,72 +0,0 @@ -[[data-views-runtime-field-api-update]] -=== Update runtime field API -++++ -Update runtime field -++++ - -Update an existing runtime field - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-runtime-field-update-request]] -==== Request - -`POST :/api/data_views/data_view//runtime_field/` - -`POST :/s//api/data_views/data_view//runtime_field/` - - -[[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. - -`data_view_id`:: -(Required, string) The ID of the data view. - -`name`:: -(Required, string) The name of the runtime field you want to update. - - -[[data-views-runtime-field-update-body]] -==== Request body - -`runtimeField`:: (Required, object) The runtime field definition object. - -You can update following fields: - -* `type` -* `script` - - - - -[[data-views-runtime-field-update-example]] -==== Examples - -Update an existing runtime field on a data view: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view//runtime_field/ -{ - "runtimeField": { - "script": { - "source": "emit(doc["bar"].value)" - } - } -} --------------------------------------------------- -// KIBANA - -The API returns updated runtime field object array and updated data view object: - -[source,sh] --------------------------------------------------- -{ - "data_view": {...}, - "fields": [...] -} --------------------------------------------------- - diff --git a/docs/api/data-views/runtime-fields/upsert.asciidoc b/docs/api/data-views/runtime-fields/upsert.asciidoc deleted file mode 100644 index 31490d1de23f3d..00000000000000 --- a/docs/api/data-views/runtime-fields/upsert.asciidoc +++ /dev/null @@ -1,67 +0,0 @@ -[[data-views-runtime-field-api-upsert]] -=== Upsert runtime field API -++++ -Upsert runtime field -++++ - -Create or update an existing runtime field - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-runtime-field-upsert-request]] -==== Request - -`PUT :/api/data_views/data_view//runtime_field` - -`PUT :/s//api/data_views/data_view//runtime_field` - - -[[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. - -`data_view_id`:: -(Required, string) The ID of the data view. - - -[[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. - -`runtimeField`:: (Required, object) The runtime field definition object. - - - -[[data-views-runtime-field-upsert-example]] -==== Examples - -Create or update an existing runtime field on a data view: - -[source,sh] --------------------------------------------------- -$ curl -X PUT api/data_views/data_view//runtime_field -{ - "name": "runtimeFoo", - "runtimeField": { - "type": "long", - "script": { - "source": "emit(doc["foo"].value)" - } - } -} --------------------------------------------------- -// KIBANA - -The API returns created or updated runtime field object array and updated data view object: - -[source,sh] --------------------------------------------------- -{ - "data_view": {...}, - "fields": [...] -} --------------------------------------------------- - diff --git a/docs/api/data-views/swap_references.asciidoc b/docs/api/data-views/swap_references.asciidoc deleted file mode 100644 index 93bdc1aaa20b2a..00000000000000 --- a/docs/api/data-views/swap_references.asciidoc +++ /dev/null @@ -1,86 +0,0 @@ -[[data-views-api-swap-references]] -=== Swap references data view API -++++ -Swap references -++++ - -Swap saved object references - -[WARNING] -==== -Misuse can break large numbers of saved objects! Practicing with a backup is recommended. -==== - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[NOTE] -==== -For the most up-to-date API details, refer to the -{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification]. -==== - -[[data-views-api-swap-references-request]] -==== Request - -`POST :/api/data_views/swap_references` - -`POST :/s//api/data_views/swap_references` - - -[[data-views-api-swap-references-request-body]] -==== Request body - -`fromId`:: -(Required, string) Saved object reference to change. - -`toId`:: -(Required, string) New saved object reference value to replace the old. - -`delete`:: - (Optional, boolean) Deletes referenced saved object if all references are removed. - -`fromType`:: - (Optional, string) Specify the type of the saved object reference to alter. Default is `index-pattern` for data view. - -`forId`:: -(Optional, string or string[]) Limit the affected saved objects to one or more by IDs. - -`forType`:: - (Optional, string) Limit the affected saved objects by type. - -[[data-views-api-swap-references-errors-codes]] -==== Response code - -`200`:: -Indicates a successful call. - -[[data-views-api-swap-references-example]] -==== Examples - -Swap references to data view id "abcd-efg" with "xyz-123": - -[source,sh] --------------------------------------------------- -$ curl -X api/data_views/swap_references -{ - "fromId" : "abcd-efg", - "toId" : "xyz-123", - "delete" : true // optional, removes data view which is no longer referenced -} - --------------------------------------------------- -// KIBANA - -The API returns a list of affected saved objects: - -[source,sh] --------------------------------------------------- -{ - result: [{ id: "123", type: "visualization" }], - deleteStatus: { - remainingRefs: 0, - deletePerformed: true - } -} --------------------------------------------------- - diff --git a/docs/api/data-views/swap_references_preview.asciidoc b/docs/api/data-views/swap_references_preview.asciidoc deleted file mode 100644 index 6772f5de3050f9..00000000000000 --- a/docs/api/data-views/swap_references_preview.asciidoc +++ /dev/null @@ -1,70 +0,0 @@ -[[data-views-api-swap-references-preview]] -=== Swap references preview data view API -++++ -Swap references preview -++++ - -Swap saved object references preview - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-api-swap-references-preview-request]] -==== Request - -`POST :/api/data_views/swap_references/_preview` - -`POST :/s//api/data_views/swap_references/_preview` - - -[[data-views-api-swap-references-preview-request-body]] -==== Request body - -`fromId`:: -(Required, string) Saved object reference to change. - -`toId`:: -(Required, string) New saved object reference value to replace the old. - -`delete`:: - (Optional, boolean) Deletes referenced saved object if all references are removed. - -`fromType`:: - (Optional, string) Specify the type of the saved object reference to alter. Default is `index-pattern` for data view. - -`forId`:: -(Optional, string or string[]) Limit the affected saved objects to one or more by IDs. - -`forType`:: - (Optional, string) Limit the affected saved objects by type. - -[[data-views-api-swap-references-preview-errors-codes]] -==== Response code - -`200`:: -Indicates a successful call. - -[[data-views-api-swap-references-preview-example]] -==== Examples - -Preview swapping references to data view id "abcd-efg" with "xyz-123": - -[source,sh] --------------------------------------------------- -$ curl -X api/data_views/swap_references/_preview -{ - "fromId" : "abcd-efg", - "toId" : "xyz-123" -} - --------------------------------------------------- -// KIBANA - -The API returns a list of affected saved objects: - -[source,sh] --------------------------------------------------- -{ - result: [{ id: "123", type: "visualization" }], -} --------------------------------------------------- - diff --git a/docs/api/data-views/update-fields.asciidoc b/docs/api/data-views/update-fields.asciidoc deleted file mode 100644 index 6c118a04190e57..00000000000000 --- a/docs/api/data-views/update-fields.asciidoc +++ /dev/null @@ -1,155 +0,0 @@ -[[data-views-fields-api-update]] -=== Update data view fields API -++++ -Update data view fields metadata -++++ - -Update fields presentation metadata, such as `count`, -`customLabel`, `customDescription`, 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. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-fields-api-update-request]] -==== Request - -`POST :/api/data_views/data_view//fields` - -`POST :/s//api/data_views/data_view//fields` - - -[[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 data view fields you want to update. - - -[[data-views-fields-api-update-request-body]] -==== Request body - -`fields`:: -(Required, object) the field object - - - -[[data-views-fields-api-update-errors-codes]] -==== Response code - -`200`:: -Indicates a successful call. - - -[[data-views-fields-api-update-example]] -==== Examples - -Set popularity `count` for field `foo`: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view/my-view/fields -{ - "fields": { - "foo": { - "count": 123 - } - } -} --------------------------------------------------- -// KIBANA - -Change a simple field format: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view/my-view/fields -{ - "fields": { - "foo": { - "format": { - "id": "bytes" - } - } - } -} --------------------------------------------------- -// KIBANA - -Change a complex field format: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view/my-view/fields -{ - "fields": { - "foo": { - "format": { - "id": "static_lookup", - "params": { - "lookupEntries": [ - { - "key": "1", - "value": "100" - }, - { - "key": "2", - "value": "200" - } - ], - "unknownKeyValue": "5000" - } - } - } - } -} --------------------------------------------------- -// KIBANA - -Update multiple metadata fields in one request: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view/my-view/fields -{ - "fields": { - "foo": { - "count": 123, - "customLabel": "Foo" - }, - "bar": { - "customLabel": "Bar", - "customDescription": "Bar Custom description" - } - } -} --------------------------------------------------- -// KIBANA - -Use `null` value to delete metadata: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view/my-pattern/fields -{ - "fields": { - "foo": { - "customLabel": null - } - } -} --------------------------------------------------- -// KIBANA - -The endpoint returns the updated data view object: - -[source,sh] --------------------------------------------------- -{ - "data_view": { - - } -} --------------------------------------------------- diff --git a/docs/api/data-views/update.asciidoc b/docs/api/data-views/update.asciidoc deleted file mode 100644 index 8537f090a72c5c..00000000000000 --- a/docs/api/data-views/update.asciidoc +++ /dev/null @@ -1,121 +0,0 @@ -[[data-views-api-update]] -=== Update data view API -++++ -Update data view -++++ - -Update part of an data view. Only the specified fields are updated in the -data view. Unspecified fields stay as they are persisted. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-data-views[data view APIs]. - -[[data-views-api-update-request]] -==== Request - -`POST :/api/data_views/data_view/` - -`POST :/s//api/data_views/data_view/` - - -[[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 data view you want to update. - - -[[data-views-api-update-request-body]] -==== Request body - -`refresh_fields`:: (Optional, boolean) Reloads the data view fields after -the data view is updated. The default is `false`. - -`data_view`:: - (Required, object) The data view fields you want to update. -+ - -You can partially update the following fields: - -* `title` -* `name` -* `timeFieldName` -* `fields` -* `sourceFilters` -* `fieldFormatMap` -* `type` -* `typeMeta` - - -[[data-views-api-update-errors-codes]] -==== Response code - -`200`:: - Indicates a successful call. - - -[[data-views-api-update-example]] -==== Examples - -Update a title of the `` data view: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view/my-view -{ - "data_view": { - "title": "some-other-view-*" - } -} --------------------------------------------------- -// KIBANA - -Customize the update behavior: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view/my-view -{ - "refresh_fields": true, - "data_view": { - "fields": {} - } -} --------------------------------------------------- -// KIBANA - - -All update fields are optional, but you can specify the following fields: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/data_views/data_view/my-view -{ - "data_view": { - "title": "...", - "name": "...", - "timeFieldName": "...", - "sourceFilters": [], - "fieldFormats": {}, - "type": "...", - "typeMeta": {}, - "fields": {}, - "runtimeFieldMap": {} - } -} --------------------------------------------------- -// KIBANA - -The API returns the updated data view object: - -[source,sh] --------------------------------------------------- -{ - "data_view": { - - } -} --------------------------------------------------- - diff --git a/docs/api/index-patterns/create.asciidoc b/docs/api/index-patterns/create.asciidoc index 0e912543364560..21b03ab4bb2944 100644 --- a/docs/api/index-patterns/create.asciidoc +++ b/docs/api/index-patterns/create.asciidoc @@ -4,7 +4,7 @@ Create index pattern ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Create {kib} index patterns. diff --git a/docs/api/index-patterns/default-get.asciidoc b/docs/api/index-patterns/default-get.asciidoc index fb27ef000c6a05..f000d09188c87d 100644 --- a/docs/api/index-patterns/default-get.asciidoc +++ b/docs/api/index-patterns/default-get.asciidoc @@ -4,7 +4,7 @@ Get default index pattern ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Retrieve a default index pattern ID. Kibana UI uses default index pattern unless user picks a different one. diff --git a/docs/api/index-patterns/default-set.asciidoc b/docs/api/index-patterns/default-set.asciidoc index 3a9e91001d36e3..0df2be0bcd16b0 100644 --- a/docs/api/index-patterns/default-set.asciidoc +++ b/docs/api/index-patterns/default-set.asciidoc @@ -4,7 +4,7 @@ Set default index pattern ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Set a default index pattern ID. Kibana UI will use default index pattern unless user picks a different one. The API doesn't validate if given `index_pattern_id` is a valid id. diff --git a/docs/api/index-patterns/get.asciidoc b/docs/api/index-patterns/get.asciidoc index 3ae3eb4a84eb5a..d627a3efe4a1c5 100644 --- a/docs/api/index-patterns/get.asciidoc +++ b/docs/api/index-patterns/get.asciidoc @@ -4,7 +4,7 @@ Get index pattern ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Retrieve a single {kib} index pattern by ID. diff --git a/docs/api/index-patterns/runtime-fields/create.asciidoc b/docs/api/index-patterns/runtime-fields/create.asciidoc index bd50a5a66dcb68..f1d1182bb83ac9 100644 --- a/docs/api/index-patterns/runtime-fields/create.asciidoc +++ b/docs/api/index-patterns/runtime-fields/create.asciidoc @@ -4,7 +4,7 @@ Create runtime field ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Create a runtime field diff --git a/docs/api/index-patterns/runtime-fields/delete.asciidoc b/docs/api/index-patterns/runtime-fields/delete.asciidoc index 838954abe8b3fc..5eac2058ecea7f 100644 --- a/docs/api/index-patterns/runtime-fields/delete.asciidoc +++ b/docs/api/index-patterns/runtime-fields/delete.asciidoc @@ -4,7 +4,7 @@ Delete runtime field ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API]instead.] experimental[] Delete a runtime field from an index pattern. diff --git a/docs/api/index-patterns/runtime-fields/get.asciidoc b/docs/api/index-patterns/runtime-fields/get.asciidoc index 155267fa40e443..f087ee3e4c6504 100644 --- a/docs/api/index-patterns/runtime-fields/get.asciidoc +++ b/docs/api/index-patterns/runtime-fields/get.asciidoc @@ -4,7 +4,7 @@ Get runtime field ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Get a runtime field diff --git a/docs/api/index-patterns/runtime-fields/update.asciidoc b/docs/api/index-patterns/runtime-fields/update.asciidoc index 9879b8b4573292..5862e9a33cf205 100644 --- a/docs/api/index-patterns/runtime-fields/update.asciidoc +++ b/docs/api/index-patterns/runtime-fields/update.asciidoc @@ -4,7 +4,7 @@ Update runtime field ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Update an existing runtime field diff --git a/docs/api/index-patterns/runtime-fields/upsert.asciidoc b/docs/api/index-patterns/runtime-fields/upsert.asciidoc index cd15f8c63b5d8b..b62ba4cd576593 100644 --- a/docs/api/index-patterns/runtime-fields/upsert.asciidoc +++ b/docs/api/index-patterns/runtime-fields/upsert.asciidoc @@ -4,7 +4,7 @@ Upsert runtime field ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Create or update an existing runtime field diff --git a/docs/api/index-patterns/update-fields.asciidoc b/docs/api/index-patterns/update-fields.asciidoc index e2655d557e929b..78cc6c80ae79b7 100644 --- a/docs/api/index-patterns/update-fields.asciidoc +++ b/docs/api/index-patterns/update-fields.asciidoc @@ -4,7 +4,7 @@ Update index pattern fields metadata ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Update fields presentation metadata, such as `count`, `customLabel`, and `format`. You can update multiple fields in one request. Updates diff --git a/docs/api/index-patterns/update.asciidoc b/docs/api/index-patterns/update.asciidoc index 809c01500b7f91..7c7b5f913e6d06 100644 --- a/docs/api/index-patterns/update.asciidoc +++ b/docs/api/index-patterns/update.asciidoc @@ -4,7 +4,7 @@ Update index pattern ++++ -deprecated::[8.0.0,Use <> instead.] +deprecated::[8.0.0,Use the {api-kibana}/group/endpoint-data-views[data views API] instead.] experimental[] Update part of an index pattern. Only the specified fields are updated in the index pattern. Unspecified fields stay as they are persisted. diff --git a/docs/api/saved-objects.asciidoc b/docs/api/saved-objects.asciidoc index 09a32558b29ff4..b8e7f00f54872d 100644 --- a/docs/api/saved-objects.asciidoc +++ b/docs/api/saved-objects.asciidoc @@ -3,24 +3,7 @@ Manage {kib} saved objects, including dashboards, visualizations, and more. -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. +For the latest details, refer to the {api-kibana}/group/endpoint-saved-objects[saved object API]. 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. - -include::saved-objects/export.asciidoc[] -include::saved-objects/import.asciidoc[] -include::saved-objects/resolve_import_errors.asciidoc[] -include::saved-objects/rotate_encryption_key.asciidoc[] -include::saved-objects/get.asciidoc[] -include::saved-objects/bulk_get.asciidoc[] -include::saved-objects/find.asciidoc[] -include::saved-objects/create.asciidoc[] -include::saved-objects/bulk_create.asciidoc[] -include::saved-objects/update.asciidoc[] -include::saved-objects/bulk_update.asciidoc[] -include::saved-objects/delete.asciidoc[] -include::saved-objects/bulk_delete.asciidoc[] -include::saved-objects/resolve.asciidoc[] -include::saved-objects/bulk_resolve.asciidoc[] - diff --git a/docs/api/saved-objects/bulk_create.asciidoc b/docs/api/saved-objects/bulk_create.asciidoc deleted file mode 100644 index 7f3e86c11106d3..00000000000000 --- a/docs/api/saved-objects/bulk_create.asciidoc +++ /dev/null @@ -1,145 +0,0 @@ -[[saved-objects-api-bulk-create]] -=== Bulk create saved objects API -++++ -Bulk create saved objects -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Create multiple {kib} saved objects. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-bulk-create-request]] -==== Request - -`POST :/api/saved_objects/_bulk_create` - -`POST :/s//api/saved_objects/_bulk_create` - - -[[saved-objects-api-bulk-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. - -[[saved-objects-api-bulk-create-query-params]] -==== Query parameters - -`overwrite`:: - (Optional, boolean) When `true`, overwrites the document with the same ID. - -[[saved-objects-api-bulk-create-request-body]] -==== Request body - -`type`:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`. - -`id`:: - (Optional, string) Specifies an ID instead of using a randomly generated ID. - -`attributes`:: - (Required, object) The data that you want to create. - -`references`:: - (Optional, array) Objects with `name`, `id`, and `type` properties that describe the other saved objects in the referenced object. To refer to the other saved object, use `name` in the attributes. Never use `id` to refer to the other saved object. `id` can be automatically updated during migrations, import, or export. - -`initialNamespaces`:: - (Optional, string array) Identifiers for the <> in which this object is created. If this is provided, the - object is created only in the explicitly defined spaces. If this is not provided, the object is created in the current space - (default behavior). -* For shareable object types (registered with `namespaceType: 'multiple'`): this option can be used to specify one or more spaces, including -the "All spaces" identifier (`'*'`). -* For isolated object types (registered with `namespaceType: 'single'` or `namespaceType: 'multiple-isolated'`): this option can only be -used to specify a single space, and the "All spaces" identifier (`'*'`) is not allowed. -* For global object types (registered with `namespaceType: 'agnostic'`): this option cannot be used. - -`version`:: - (Optional, number) Specifies the version. - -[[saved-objects-api-bulk-create-response-body]] -==== Response body - -`saved_objects`:: - (array) Top-level property the contains objects that represent the response for each of the requested objects. The order of the objects in the response is identical to the order of the objects in the request. - -Saved objects that are unable to persist are replaced with an error object. - -[[saved-objects-api-bulk-create-codes]] -==== Response code - -`200`:: - Indicates a successful call. Note, this HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual - objects will be returned in the response body. See the example below for details. - -[[saved-objects-api-bulk-create-example]] -==== Example - -Create a {data-source} with the `my-pattern` ID, and a dashboard with the `my-dashboard` ID: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_bulk_create -[ - { - "type": "index-pattern", - "id": "my-pattern", - "attributes": { - "title": "my-pattern-*" - } - }, - { - "type": "dashboard", - "id": "be3733a0-9efe-11e7-acb3-3dab96693fab", - "attributes": { - "title": "Look at my dashboard" - } - } -] --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "saved_objects": [ - { - "id": "my-pattern", - "type": "index-pattern", - "version": 1, - "attributes": { - "title": "my-pattern-*" - } - }, - { - "id": "be3733a0-9efe-11e7-acb3-3dab96693fab", - "type": "dashboard", - "error": { - "statusCode": 409, - "message": "Saved object [dashboard/be3733a0-9efe-11e7-acb3-3dab96693fab] conflict" - } - } - ] -} --------------------------------------------------- - -There is already a saved object with the `my-dashboard` ID, so only the {data-source} is created. - -[[saved-objects-api-bulk-create-conflict-errors]] -==== Conflict errors - -Starting in {kib} 8.0, saved objects can exist in multiple spaces. As a result, you may encounter different types of conflict errors when -attempting to create an object: - -* *Regular conflict*: This is a 409 error without any metadata. It means an object of that type/ID already exists. This can be - overridden by using the `overwrite: true` option. -* *Unresolvable conflict*: This is a 409 error with `isNotOverwritable: true` in its metadata. It means an object of that type/ID already - exists in a different space, and it cannot be overridden with the given parameters. To successfully overwrite this object, you must do so - in at least one space where it exists. You can specify that using the `space_id` path parameter _or_ the `initialNamespaces` parameter. -* *Alias conflict*: This is a 409 error with a `spacesWithConflictingAliases` string array in its metadata. It means a conflicting - <> for this type/ID exists in the space(s) where you attempted to create this object. A conflicting - legacy URL alias is one that points to a different type/ID. To successfully create this object, you need to first use the - <> API to disable the problematic legacy URL alias(es). diff --git a/docs/api/saved-objects/bulk_delete.asciidoc b/docs/api/saved-objects/bulk_delete.asciidoc deleted file mode 100644 index bd6b6476246c6f..00000000000000 --- a/docs/api/saved-objects/bulk_delete.asciidoc +++ /dev/null @@ -1,111 +0,0 @@ -[[saved-objects-api-bulk-delete]] -=== Bulk delete object API -++++ -Bulk delete objects -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Remove multiple {kib} saved objects. - -WARNING: Once you delete a saved object, _it cannot be recovered_. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -==== Request - -`POST :/api/saved_objects/_bulk_delete` - -`POST :/s//api/saved_objects/_bulk_delete` - -==== 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. - -==== Request body - -`type`:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`. - -`id`:: - (Required, string) The object ID to remove. - -==== Query parameters - -`force`:: - (Optional, boolean) When true, force delete objects that exist in multiple namespaces. Note that the option applies to the whole request. Use the <> to specify per-object delete behavior. -+ -TIP: Use this if you attempted to delete objects and received an HTTP 400 error with the following message: _"Unable to delete saved object that exists in multiple namespaces, use the `force` option to delete it anyway"_ -+ -WARNING: When you bulk delete objects that exist in multiple namespaces, the API also deletes <> that reference the object. These requests are batched to minimise the impact but they can place a heavy load on {kib}. Make sure you limit the number of objects that exist in multiple namespaces in a single bulk delete operation. - -==== Response code -`200`:: - Indicates a successful call. Note, this HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual - objects will be returned in the response body. Refer to the example below for details. - -==== Response body - -`statuses`:: - (array) Top-level property that contains objects that represent the response for each of the requested objects. The order of the objects in the response is identical to the order of the objects in the request. - -Saved objects that cannot be removed will include an error object. - -==== Example - -Delete three saved objects, where one of them does not exist and one exists in multiple namespaces: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_bulk_delete -[ - { - type: 'visualization', - id: 'not an id', - }, - { - type: 'dashboard', - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - { - type: 'index-pattern', - id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d', - } -] --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "statuses": [ - { - "success": false, - "id": "not an id", - "type": "visualization", - "error": { - "statusCode": 404, - "error": "Not Found", - "message": "Saved object [visualization/not an id] not found", - }, - }, - { - "success": true, - "id": "be3733a0-9efe-11e7-acb3-3dab96693fab", - "type": "dashboard", - }, - { - "success": false, - "id": "d3d7af60-4c81-11e8-b3d7-01146121b73d", - "type": "index-pattern", - "error": { - "statusCode": 400, - "error": "Bad Request", - "message": "Unable to delete saved object id: d3d7af60-4c81-11e8-b3d7-01146121b73d, type: index-pattern that exists in multiple namespaces, use the \"force\" option to delete all saved objects: Bad Request", - }, - } - ] -} --------------------------------------------------- diff --git a/docs/api/saved-objects/bulk_get.asciidoc b/docs/api/saved-objects/bulk_get.asciidoc deleted file mode 100644 index eb18856ceca449..00000000000000 --- a/docs/api/saved-objects/bulk_get.asciidoc +++ /dev/null @@ -1,110 +0,0 @@ -[[saved-objects-api-bulk-get]] -=== Bulk get objects API -++++ -Bulk get objects -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Retrieve multiple {kib} saved objects by ID. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-bulk-get-request]] -==== Request - -`POST :/api/saved_objects/_bulk_get` - -`POST :/s//api/saved_objects/_bulk_get` - -[[saved-objects-api-bulk-get-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. - -[[saved-objects-api-bulk-get-request-body]] -==== Request Body - -`type`:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`. - -`id`:: - (Required, string) ID of the retrieved object. The ID includes the {kib} unique identifier or a custom identifier. - -`fields`:: - (Optional, array) The fields to return in the `attributes` key of the object response. - -`namespaces`:: - (Optional, string array) Identifiers for the <> in which to search for this object. If this is provided, the object - is searched for only in the explicitly defined spaces. If this is not provided, the object is searched for in the current space (default - behavior). -* For shareable object types (registered with `namespaceType: 'multiple'`): this option can be used to specify one or more spaces, including -the "All spaces" identifier (`'*'`). -* For isolated object types (registered with `namespaceType: 'single'` or `namespaceType: 'multiple-isolated'`): this option can only be -used to specify a single space, and the "All spaces" identifier (`'*'`) is not allowed. -* For global object types (registered with `namespaceType: 'agnostic'`): this option cannot be used. - -[[saved-objects-api-bulk-get-response-body]] -==== Response body - -`saved_objects`:: - (array) Top-level property containing objects that represent the response for each of the requested objects. The order of the objects in the response is identical to the order of the objects in the request. - -Saved objects that are unable to persist are replaced with an error object. - -[[saved-objects-api-bulk-get-body-codes]] -==== Response code - -`200`:: - Indicates a successful call. Note, this HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual - objects will be returned in the response body. See the example below for details. - -[[saved-objects-api-bulk-get-body-example]] -==== Example - -Retrieve a {data-source} with the `my-pattern` ID, and a dashboard with the `my-dashboard` ID: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_bulk_get -[ - { - "type": "index-pattern", - "id": "my-pattern" - }, - { - "type": "dashboard", - "id": "be3733a0-9efe-11e7-acb3-3dab96693fab" - } -] --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "saved_objects": [ - { - "id": "my-pattern", - "type": "index-pattern", - "version": 1, - "attributes": { - "title": "my-pattern-*" - } - }, - { - "id": "my-dashboard", - "type": "dashboard", - "error": { - "statusCode": 404, - "message": "Not found" - } - } - ] -} --------------------------------------------------- - -Only the {data-source} exists. diff --git a/docs/api/saved-objects/bulk_resolve.asciidoc b/docs/api/saved-objects/bulk_resolve.asciidoc deleted file mode 100644 index 64a3a437e53770..00000000000000 --- a/docs/api/saved-objects/bulk_resolve.asciidoc +++ /dev/null @@ -1,192 +0,0 @@ -[[saved-objects-api-bulk-resolve]] -=== Bulk resolve objects API -++++ -Bulk resolve objects -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Retrieve multiple {kib} saved objects by ID, using any legacy URL aliases if they exist. - -Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new -features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that -object can be retrieved via the Bulk Resolve API using either its new ID or its old ID. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-bulk-resolve-request]] -==== Request - -`POST :/api/saved_objects/_bulk_resolve` - -`POST :/s//api/saved_objects/_bulk_resolve` - -[[saved-objects-api-bulk-resolve-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. - -[[saved-objects-api-bulk-resolve-request-body]] -==== Request Body - -`type`:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`. - -`id`:: - (Required, string) ID of the retrieved object. The ID includes the {kib} unique identifier or a custom identifier. - -[[saved-objects-api-bulk-resolve-response-body]] -==== Response body - -`resolved_objects`:: - (array) Top-level property containing objects that represent the response for each of the requested objects. The order of the objects in the response is identical to the order of the objects in the request. - -Saved objects that {kib} fails to find are replaced with an error object and an "exactMatch" outcome. The rationale behind the outcome is -that "exactMatch" is the default outcome, and the outcome only changes if an alias is found. This behavior is unique to `_bulk_resolve`; the -<> will return only an HTTP error instead. - -[[saved-objects-api-bulk-resolve-body-codes]] -==== Response code - -`200`:: - Indicates a successful call. Note, this HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual - objects will be returned in the response body. See the example below for details. - -[[saved-objects-api-bulk-resolve-body-example]] -==== Example - -Retrieve an index pattern with the `my-pattern` ID, and a dashboard with the `my-dashboard` ID: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_bulk_resolve -[ - { - "type": "index-pattern", - "id": "my-pattern" - }, - { - "type": "dashboard", - "id": "be3733a0-9efe-11e7-acb3-3dab96693fab" - } -] --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "resolved_objects": [ - { - "saved_object": { - "id": "my-pattern", - "type": "index-pattern", - "version": 1, - "attributes": { - "title": "my-pattern-*" - } - }, - "outcome": "exactMatch" - }, - { - "saved_object": { - "id": "my-dashboard", - "type": "dashboard", - "error": { - "statusCode": 404, - "message": "Not found" - } - }, - "outcome": "exactMatch" - } - ] -} --------------------------------------------------- - -Only the index pattern exists, the dashboard was not found. - -[NOTE] -==== -In addition to `saved_object`, several fields can be returned: - -* `outcome` (required string) -- One of the following values: - - `"exactMatch"` -- One document exactly matched the given ID. - - `"aliasMatch"` -- One document with a legacy URL alias matched the given ID; in this case the `saved_object.id` field is different than - the given ID. - - `"conflict"` -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the - `saved_object` object is the exact match, and the `saved_object.id` field is the same as the given ID. -* `alias_target_id` (optional string) -- If the `outcome` is `"aliasMatch"` or `"conflict"`, the response will also include the - `alias_target_id` field. This means that an alias was found for another object, and it describes that other object's ID. -* `alias_purpose` (optional string) -- If the `outcome` is `"aliasMatch"` or `"conflict"`, the response will also include the - `alias_purpose` field. This indicates why the alias was created, and it can be used to change the client behavior accordingly. One of the - following values: `"savedObjectConversion"`, `"savedObjectImport"` - -Client-side code uses these fields to behave differently depending on the `outcome` -- <>. -==== - -Retrieve a dashboard object in the `testspace` by ID: - -[source,sh] --------------------------------------------------- -$ curl -X GET s/testspace/api/saved_objects/resolve/dashboard/7adfa750-4c81-11e8-b3d7-01146121b73d --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "resolved_objects": [ - { - "saved_object": { - "id": "7adfa750-4c81-11e8-b3d7-01146121b73d", - "type": "dashboard", - "updated_at": "2019-07-23T00:11:07.059Z", - "version": "WzQ0LDFd", - "attributes": { - "title": "[Flights] Global Flight Dashboard", - "hits": 0, - "description": "Analyze mock flight data for ES-Air, Logstash Airways, Kibana Airlines and JetBeats", - "panelsJSON": "[ . . . ]", - "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", - "version": 1, - "timeRestore": true, - "timeTo": "now", - "timeFrom": "now-24h", - "refreshInterval": { - "display": "15 minutes", - "pause": false, - "section": 2, - "value": 900000 - }, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - } - }, - "references": [ - { - "name": "panel_0", - "type": "visualization", - "id": "aeb212e0-4c84-11e8-b3d7-01146121b73d" - }, - . . . - { - "name": "panel_18", - "type": "visualization", - "id": "ed78a660-53a0-11e8-acbd-0be0ad9d822b" - } - ], - "migrationVersion": { - "dashboard": "7.0.0" - } - }, - "outcome": "conflict", - "alias_target_id": "05becb88-e214-439a-a2ac-15fc783b5d01" - } - ] -} --------------------------------------------------- diff --git a/docs/api/saved-objects/bulk_update.asciidoc b/docs/api/saved-objects/bulk_update.asciidoc deleted file mode 100644 index 099b12d092eab9..00000000000000 --- a/docs/api/saved-objects/bulk_update.asciidoc +++ /dev/null @@ -1,116 +0,0 @@ -[[saved-objects-api-bulk-update]] -=== Bulk update object API -++++ -Bulk update objects -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Update the attributes for multiple existing {kib} saved objects. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-bulk-update-request]] -==== Request - -`PUT :/api/saved_objects/_bulk_update` - -`PUT :/s//api/saved_objects/_bulk_update` - -[[saved-objects-api-bulk-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. - -[[saved-objects-api-bulk-update-request-body]] -==== Request body - -`type`:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`. - -`id`:: - (Required, string) The object ID to update. - -`attributes`:: - (Required, object) The data to persist. -+ -WARNING: When you update, attributes are not validated, which allows you to pass arbitrary and ill-formed data into the API and break {kib}. Make sure any data that you send to the API is properly formed. - -`references`:: - (Optional, array) Objects with `name`, `id`, and `type` properties that describe the other saved objects this object references. To refer to the other saved object, use `name` in the attributes, but never the `id`, which automatically updates during migrations or import/export. - -`version`:: - (Optional, number) Ensures the version matches that of the persisted object. - -`namespace`:: (Optional, string) Identifier for the space in which to update this object. If this is defined, it will supersede the space ID that is in the URL. - -[[saved-objects-api-bulk-update-codes]] -==== Response code - -`200`:: - Indicates a successful call. Note, this HTTP response code indicates that the bulk operation succeeded. Errors pertaining to individual - objects will be returned in the response body. Refer to the example below for details. - -[[saved-objects-api-bulk-update-example]] -==== Example - -Update three saved objects, where one of them does not exist: - -[source,sh] --------------------------------------------------- -$ curl -X PUT api/saved_objects/_bulk_update -[ - { - type: 'visualization', - id: 'not an id', - attributes: { - title: 'An existing visualization', - }, - }, - { - type: 'dashboard', - id: 'be3733a0-9efe-11e7-acb3-3dab96693fab', - attributes: { - title: 'An existing dashboard', - }, - { - type: 'index-pattern', - id: 'logstash-*', - attributes: { title: 'my-logstash-pattern' } - } -] --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -[ - { - "type": "visualization", - "id": "not an id", - "error": { - "statusCode": 404, - "error": "Not Found", - "message": "Saved object [visualization/not an id] not found", - }, - }, - { - "type": "dashboard", - "id": "be3733a0-9efe-11e7-acb3-3dab96693fab", - "version": 2, - "attributes": { - "title": "An existing dashboard", - }, - }, - { - "type": "index-pattern", - "id": "logstash-*", - "attributes": { - "title": "my-logstash-pattern", - } - } -] --------------------------------------------------- diff --git a/docs/api/saved-objects/create.asciidoc b/docs/api/saved-objects/create.asciidoc deleted file mode 100644 index 8e77be4776ecc6..00000000000000 --- a/docs/api/saved-objects/create.asciidoc +++ /dev/null @@ -1,110 +0,0 @@ -[[saved-objects-api-create]] -=== Create saved objects API -++++ -Create saved objects -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Create {kib} saved objects. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-create-request]] -==== Request - -`POST :/api/saved_objects/` - -`POST :/api/saved_objects//` - -`POST :/s//api/saved_objects/` - -`POST :/s//api/saved_objects//` - -[[saved-objects-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. - -``:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`. - -``:: - (Optional, string) Specifies an ID instead of using a randomly generated ID. - -[[saved-objects-api-create-query-params]] -==== Query parameters - -`overwrite`:: - (Optional, boolean) When true, overwrites the document with the same ID. - -[[saved-objects-api-create-request-body]] -==== Request body - -`attributes`:: - (Required, object) The data that you want to create. -+ -WARNING: When you create saved objects, attributes are not validated, which allows you to pass -arbitrary and ill-formed data into the API that can break {kib}. Make sure -any data that you send to the API is properly formed. - -`references`:: - (Optional, array) Objects with `name`, `id`, and `type` properties that describe the other saved objects that this object references. Use `name` in attributes to refer to the other saved object, but never the `id`, which can update automatically during migrations or import/export. - -`initialNamespaces`:: - (Optional, string array) Identifiers for the <> in which this object is created. If this is provided, the - object is created only in the explicitly defined spaces. If this is not provided, the object is created in the current space - (default behavior). -* For shareable object types (registered with `namespaceType: 'multiple'`): this option can be used to specify one or more spaces, including -the "All spaces" identifier (`'*'`). -* For isolated object types (registered with `namespaceType: 'single'` or `namespaceType: 'multiple-isolated'`): this option can only be -used to specify a single space, and the "All spaces" identifier (`'*'`) is not allowed. -* For global object types (registered with `namespaceType: 'agnostic'): this option cannot be used. - -[[saved-objects-api-create-request-codes]] -==== Response code - -`200`:: - Indicates a successful call. - -`409`:: - Indicates a <>. - -[[saved-objects-api-create-example]] -==== Example - -[source,sh] --------------------------------------------------- -$ curl -X POST api/index_patterns/index-pattern/my-pattern -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' -{ - "attributes": { - "title": "my-pattern-*" - } -}' --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "id": "my-pattern", <1> - "type": "index-pattern", - "version": 1, - "attributes": { - "title": "my-pattern-*" - } -} --------------------------------------------------- - -<1> When `my-pattern` is unspecified in the path, a unique ID is automatically generated. - -[[saved-objects-api-create-conflict-errors]] -==== Conflict errors - -Starting in {kib} 8.0, saved objects can exist in multiple spaces. As a result, you may encounter different types of conflict errors when -attempting to create an object. If you encounter a 409 error that cannot be overridden by using the `overwrite: true` option, you are likely -hitting a different type of conflict error. The Create API response is limited and does not include additional metadata. You can get more -details about this error by using the <> instead. diff --git a/docs/api/saved-objects/delete.asciidoc b/docs/api/saved-objects/delete.asciidoc deleted file mode 100644 index 2f840b13e3bb63..00000000000000 --- a/docs/api/saved-objects/delete.asciidoc +++ /dev/null @@ -1,56 +0,0 @@ -[[saved-objects-api-delete]] -=== Delete object API -++++ -Delete object -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Remove {kib} saved objects. - -WARNING: Once you delete a saved object, _it cannot be recovered_. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-delete-request]] -==== Request - -`DELETE :/api/saved_objects//` - -`DELETE :/s//api/saved_objects//` - -[[saved-objects-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. - -`type`:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`. - -`id`:: - (Required, string) The object ID that you want to remove. - -[[saved-objects-api-delete-query-params]] -==== Query parameters - -`force`:: - (Optional, boolean) When true, forces an object to be deleted if it exists in multiple namespaces. -+ -TIP: Use this if you attempted to delete an object and received an HTTP 400 error with the following message: _"Unable to delete saved object that exists in multiple namespaces, use the `force` option to delete it anyway"_ - -[[saved-objects-api-delete-response-codes]] -==== Response code - -`200`:: - Indicates a successful call. - -==== Example - -Delete a {data-source} object with the `my-pattern` ID: - -[source,sh] --------------------------------------------------- -$ curl -X DELETE api/index_patterns/index-pattern/my-pattern --------------------------------------------------- -// KIBANA diff --git a/docs/api/saved-objects/export.asciidoc b/docs/api/saved-objects/export.asciidoc deleted file mode 100644 index efe146e8fde714..00000000000000 --- a/docs/api/saved-objects/export.asciidoc +++ /dev/null @@ -1,138 +0,0 @@ -[[saved-objects-api-export]] -=== Export objects API -++++ -Export objects -++++ - -experimental[] Retrieve sets of saved objects that you want to import into {kib}. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-export-request]] -==== Request - -`POST :/api/saved_objects/_export` - -`POST :/s//api/saved_objects/_export` - -[[saved-objects-api-export-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. - -[[saved-objects-api-export-request-request-body]] -==== Request body - -`type`:: - (Optional, array|string) The saved object types to include in the export. Use `*` to export all the types. - -`objects`:: - (Optional, array) A list of objects to export. - -`includeReferencesDeep`:: - (Optional, boolean) Includes all of the referenced objects in the exported objects. - -`excludeExportDetails`:: - (Optional, boolean) Do not add export details entry at the end of the stream. - -TIP: You must include `type` or `objects` in the request body. - -NOTE: The <> configuration setting -limits the number of saved objects which may be exported. - -[[saved-objects-api-export-request-response-body]] -==== Response body - -The format of the response body is newline delimited JSON. Each exported object is exported as a valid JSON record and separated by the newline character '\n'. - -When `excludeExportDetails=false` (the default) we append an export result details record at the end of the file after all the saved object records. The export result details object has the following format: - -[source,json] --------------------------------------------------- -{ - "exportedCount": 27, - "missingRefCount": 2, - "missingReferences": [ - { "id": "an-id", "type": "visualisation"}, - { "id": "another-id", "type": "index-pattern"} - ] -} --------------------------------------------------- - -[[export-objects-api-create-request-codes]] -==== Response code - -`200`:: - Indicates a successful call. - -[[ssaved-objects-api-create-example]] -==== Examples - -Export all {data-source} saved objects: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' -{ - "type": "index-pattern" -}' --------------------------------------------------- -// KIBANA - -Export all {data-source} saved objects and exclude the export summary from the stream: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' -{ - "type": "index-pattern", - "excludeExportDetails": true -}' --------------------------------------------------- -// KIBANA - -Export a specific saved object: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' -{ - "objects": [ - { - "type": "dashboard", - "id": "be3733a0-9efe-11e7-acb3-3dab96693fab" - } - ] -}' --------------------------------------------------- -// KIBANA - -Export a specific saved object and it's related objects: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' -{ - "objects": [ - { - "type": "dashboard", - "id": "be3733a0-9efe-11e7-acb3-3dab96693fab" - } - ], - "includeReferencesDeep": true -}' --------------------------------------------------- -// KIBANA - -Export all exportable saved objects and their related objects: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d ' -{ - "type": "*", - "includeReferencesDeep": true -}' --------------------------------------------------- -// KIBANA \ No newline at end of file diff --git a/docs/api/saved-objects/find.asciidoc b/docs/api/saved-objects/find.asciidoc deleted file mode 100644 index d5781665a198d4..00000000000000 --- a/docs/api/saved-objects/find.asciidoc +++ /dev/null @@ -1,123 +0,0 @@ -[[saved-objects-api-find]] -=== Find objects API -++++ -Find objects -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Retrieve a paginated set of {kib} saved objects by various conditions. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-find-request]] -==== Request - -`GET :/api/saved_objects/_find` - -`GET :/s//api/saved_objects/_find` - -[[saved-objects-api-find-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. - -[[saved-objects-api-find-query-params]] -==== Query Parameters - -`type`:: - (Required, array|string) The saved object types to include in the export. - -`per_page`:: - (Optional, number) The number of objects to return per page. - -`page`:: - (Optional, number) The page of objects to return. - -`search`:: - (Optional, string) An Elasticsearch {ref}/query-dsl-simple-query-string-query.html[simple_query_string] query that filters the objects in the response. - -`default_search_operator`:: - (Optional, string) The default operator to use for the `simple_query_string`. - -`search_fields`:: - (Optional, array|string) The fields to perform the `simple_query_string` parsed query against. - -`fields`:: - (Optional, array|string) The fields to return in the `attributes` key of the response. - -`sort_field`:: - (Optional, string) Sorts the response. Includes "root" and "type" fields. "root" fields exist for all saved objects, such as "updated_at". - "type" fields are specific to an object type, such as fields returned in the `attributes` key of the response. When a single type is - defined in the `type` parameter, the "root" and "type" fields are allowed, and validity checks are made in that order. When multiple types - are defined in the `type` parameter, only "root" fields are allowed. - -`has_reference`:: - (Optional, object) Filters to objects that have a relationship with the type and ID combination. - -`has_reference_operator`:: - (Optional, string) The operator to use for the `has_reference` parameter. Either `OR` or `AND`. Defaults to `OR`. - -`has_no_reference`:: - (Optional, object) Filters to objects that do not have a relationship with the type and ID combination. - -`has_no_reference_operator`:: - (Optional, string) The operator to use for the `has_no_reference` parameter. Either `OR` or `AND`. Defaults to `OR`. - -`filter`:: - (Optional, string) The filter is a KQL string with the caveat that if you filter with an attribute from your saved object type, - it should look like that: `savedObjectType.attributes.title: "myTitle"`. However, If you use a root attribute of a saved - object such as `updated_at`, you will have to define your filter like that: `savedObjectType.updated_at > 2018-12-22`. - -`aggs`:: - (Optional, string) **experimental** An aggregation structure, serialized as a string. The field format is similar to `filter`, meaning - that to use a saved object type attribute in the aggregation, the `savedObjectType.attributes.title`: "myTitle"` format - must be used. For root fields, the syntax is `savedObjectType.rootField` - -NOTE: As objects change in {kib}, the results on each page of the response also -change. Use the find API for traditional paginated results, but avoid using it to export large amounts of data. - -[[saved-objects-api-find-request-codes]] -==== Response code - -`200`:: - Indicates a successful call. - -==== Examples - -Find {data-sources} with titles that start with `my`: - -[source,sh] --------------------------------------------------- -$ curl -X GET api/saved_objects/_find?type=index-pattern&search_fields=title&search=my* --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "total": 1, - "data": [ - { - "id": "my-pattern", - "type": "index-pattern", - "version": 1, - "attributes": { - "title": "my-pattern-*" - } - } - ] -} --------------------------------------------------- - -For parameters that accept multiple values (e.g. `fields`), repeat the -query parameter for each value: - -[source,sh] --------------------------------------------------- -$ curl -X GET api/saved_objects/_find?fields=id&fields=title --------------------------------------------------- -// KIBANA diff --git a/docs/api/saved-objects/get.asciidoc b/docs/api/saved-objects/get.asciidoc deleted file mode 100644 index 2e11c4c78cc9a5..00000000000000 --- a/docs/api/saved-objects/get.asciidoc +++ /dev/null @@ -1,118 +0,0 @@ -[[saved-objects-api-get]] -=== Get object API -++++ -Get object -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Retrieve a single {kib} saved object by ID. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-get-request]] -==== Request - -`GET :/api/saved_objects//` - -`GET :/s//api/saved_objects//` - -[[saved-objects-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. - - -`type`:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`. - -`id`:: - (Required, string) The ID of the object to retrieve. - -[[saved-objects-api-get-codes]] -==== Response code - -`200`:: - Indicates a successful call. - -[[saved-objects-api-get-example]] -==== Example - -Retrieve the {data-source} object with the `my-pattern` ID: - -[source,sh] --------------------------------------------------- -$ curl -X GET api/index_patterns/index-pattern/my-pattern --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "id": "my-pattern", - "type": "index-pattern", - "version": 1, - "attributes": { - "title": "my-pattern-*" - } -} --------------------------------------------------- - -Retrieve a dashboard object in the `testspace` by ID: - -[source,sh] --------------------------------------------------- -$ curl -X GET s/testspace/api/saved_objects/dashboard/7adfa750-4c81-11e8-b3d7-01146121b73d --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "id": "7adfa750-4c81-11e8-b3d7-01146121b73d", - "type": "dashboard", - "updated_at": "2019-07-23T00:11:07.059Z", - "version": "WzQ0LDFd", - "attributes": { - "title": "[Flights] Global Flight Dashboard", - "hits": 0, - "description": "Analyze mock flight data for ES-Air, Logstash Airways, Kibana Airlines and JetBeats", - "panelsJSON": "[ . . . ]", - "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", - "version": 1, - "timeRestore": true, - "timeTo": "now", - "timeFrom": "now-24h", - "refreshInterval": { - "display": "15 minutes", - "pause": false, - "section": 2, - "value": 900000 - }, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - } - }, - "references": [ - { - "name": "panel_0", - "type": "visualization", - "id": "aeb212e0-4c84-11e8-b3d7-01146121b73d" - }, - . . . - { - "name": "panel_18", - "type": "visualization", - "id": "ed78a660-53a0-11e8-acbd-0be0ad9d822b" - } - ], - "migrationVersion": { - "dashboard": "7.0.0" - } -} --------------------------------------------------- diff --git a/docs/api/saved-objects/import.asciidoc b/docs/api/saved-objects/import.asciidoc deleted file mode 100644 index 311d83d64b7de7..00000000000000 --- a/docs/api/saved-objects/import.asciidoc +++ /dev/null @@ -1,395 +0,0 @@ -[[saved-objects-api-import]] -=== Import objects API -++++ -Import objects -++++ - -experimental[] Create sets of {kib} saved objects from a file created by the export API. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -==== Compatibility across versions -Saved objects can only be imported into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of {kib}. See the table below for compatibility examples: - -|======= -| Exporting version | Importing version | Compatible? -| 6.7.x | 6.8.x | Yes -| 6.x.x | 7.x.x | Yes -| 7.x.x | 8.x.x | Yes -| 7.1.x | 7.15.x | Yes -| 7.x.x | 6.x.x | No -| 7.15.x | 7.1.x | No -| 6.x.x | 8.x.x | No -|======= - -[[saved-objects-api-import-request]] -==== Request - -`POST :/api/saved_objects/_import` - -`POST :/s//api/saved_objects/_import` - -[[saved-objects-api-import-path-params]] -==== Path parameters - -`space_id`:: - (Optional, string) An identifier for the <>. If `space_id` is not provided in the URL, the default space is used. - -[[saved-objects-api-import-query-params]] -==== Query parameters - -`createNewCopies`:: - (Optional, boolean) Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict - errors are avoided. -+ -NOTE: This option cannot be used with the `overwrite` and `compatibilityMode` options. - -`overwrite`:: - (Optional, boolean) Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by - overwriting the destination object. -+ -NOTE: This option cannot be used with the `createNewCopies` option. - -`compatibilityMode`:: - (Optional, boolean) Applies various adjustments to the saved objects that are being imported to maintain compatibility between different {kib} - versions. Use this option only if you encounter issues with imported saved objects. -+ -NOTE: This option cannot be used with the `createNewCopies` option. - -[[saved-objects-api-import-request-body]] -==== Request body - -The request body must include the multipart/form-data type. - -`file`:: - A file exported using the export API. -+ -NOTE: The <> configuration setting -limits the number of saved objects which may be included in this file. Similarly, the -<> setting limits the overall -size of the file that can be imported. - -[[saved-objects-api-import-response-body]] -==== Response body - -`success`:: - (boolean) Indicates when the import was successfully completed. When set to `false`, some objects may not have been created. For - additional information, refer to the `errors` and `successResults` properties. - -`successCount`:: - (number) Indicates the number of successfully imported records. - -`errors`:: - (Optional, array) Indicates the import was unsuccessful and specifies the objects that failed to import. -+ -NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and -`conflict` error). - -`successResults`:: - (Optional, array) Indicates the objects that are successfully imported, with any metadata if applicable. -+ -NOTE: Objects are only created when all resolvable errors are addressed, including conflicts and missing references. For information on how -to resolve errors, refer to the <>. - -[[saved-objects-api-import-codes]] -==== Response code - -`200`:: - Indicates a successful call. - -[[saved-objects-api-import-example]] -==== Examples - -[[saved-objects-api-import-example-1]] -===== Successful import with `createNewCopies` enabled - -Import a {data-source} and dashboard: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_import?createNewCopies=true -H "kbn-xsrf: true" --form file=@file.ndjson --------------------------------------------------- -// KIBANA - -The `file.ndjson` file contains the following: - -[source,sh] --------------------------------------------------- -{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}} -{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}} --------------------------------------------------- - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "success": true, - "successCount": 2, - "successResults": [ - { - "id": "my-pattern", - "type": "index-pattern", - "destinationId": "4aba3770-0d04-45e1-9e34-4cf0fd2165ae", - "meta": { - "icon": "indexPatternApp", - "title": "my-pattern-*" - } - }, - { - "id": "my-dashboard", - "type": "dashboard", - "destinationId": "c31d1eca-9bc0-4a81-b5f9-30c442824c48", - "meta": { - "icon": "dashboardApp", - "title": "Look at my dashboard" - } - } - ] -} --------------------------------------------------- - -The result indicates a successful import, and both objects are created. Since these objects are created as new copies, each entry in the -`successResults` array includes a `destinationId` attribute. - -[[saved-objects-api-import-example-2]] -===== Successful import with `createNewCopies` disabled - -Import a {data-source} and dashboard: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_import -H "kbn-xsrf: true" --form file=@file.ndjson --------------------------------------------------- -// KIBANA - -The `file.ndjson` file contains the following: - -[source,sh] --------------------------------------------------- -{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}} -{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}} --------------------------------------------------- - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "success": true, - "successCount": 2, - "successResults": [ - { - "id": "my-pattern", - "type": "index-pattern", - "meta": { - "icon": "indexPatternApp", - "title": "my-pattern-*" - } - }, - { - "id": "my-dashboard", - "type": "dashboard", - "meta": { - "icon": "dashboardApp", - "title": "Look at my dashboard" - } - } - ] -} --------------------------------------------------- - -The result indicates a successful import, and both objects are created. - -[[saved-objects-api-import-example-3]] -===== Failed import with conflict errors - -Import a {data-source}, visualization, *Canvas* workpad, and dashboard that include saved objects: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_import -H "kbn-xsrf: true" --form file=@file.ndjson --------------------------------------------------- -// KIBANA - -The `file.ndjson` file contains the following: - -[source,sh] --------------------------------------------------- -{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}} -{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"}} -{"type":"canvas-workpad","id":"my-canvas","attributes":{"name":"Look at my canvas"}} -{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}} --------------------------------------------------- - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "success": false, - "successCount": 1, - "errors": [ - { - "id": "my-pattern", - "type": "index-pattern", - "title": "my-pattern-*", - "error": { - "type": "conflict" - }, - "meta": { - "icon": "indexPatternApp", - "title": "my-pattern-*" - } - }, - { - "id": "my-visualization", - "type": "my-vis", - "title": "Look at my visualization", - "error": { - "type": "conflict", - "destinationId": "another-vis" - }, - "meta": { - "icon": "visualizeApp", - "title": "Look at my visualization" - } - }, - { - "id": "my-canvas", - "type": "canvas-workpad", - "title": "Look at my canvas", - "error": { - "type": "ambiguous_conflict", - "destinations": [ - { - "id": "another-canvas", - "title": "Look at another canvas", - "updatedAt": "2020-07-08T16:36:32.377Z" - }, - { - "id": "yet-another-canvas", - "title": "Look at yet another canvas", - "updatedAt": "2020-07-05T12:29:54.849Z" - } - ] - }, - "meta": { - "icon": "canvasApp", - "title": "Look at my canvas" - } - } - ], - "successResults": [ - { - "id": "my-dashboard", - "type": "dashboard", - "meta": { - "icon": "dashboardApp", - "title": "Look at my dashboard" - } - } - ] -} --------------------------------------------------- - -The result indicates an unsuccessful import because the {data-source}, visualization, *Canvas* workpad, and dashboard resulted in a conflict -error: - -* A {data-source} with the same ID already exists, which resulted in a conflict error. To resolve the error, overwrite the existing object, -or skip the object. - -* A visualization with a different ID, but the same origin already exists, which resulted in a conflict error. The `destinationId` field -contains the `id` of the other visualization, which caused the conflict. The behavior is added to make sure that new objects that can be -shared between <> behave in a similar way as legacy non-shareable objects. When a shareable object is exported and then -imported into a new space, it retains its origin so that the conflicts are encountered as expected. To resolve, overwrite the specified -destination object, or skip the object. - -* Two *Canvas* workpads with different IDs, but the same origin, already exist, which resulted in a conflict error. The `destinations` array -describes the other workpads which caused the conflict. When a shareable object is exported, imported into a new space, then shared to -another space where an object of the same origin exists, the conflict error occurs. To resolve, pick a destination object to overwrite, or -skip the object. - -Objects are created when the error is resolved using the <>. - -[[saved-objects-api-import-example-4]] -===== Failed import with missing reference errors - -Import a visualization and dashboard when the {data-source} for the visualization doesn't exist: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_import -H "kbn-xsrf: true" --form file=@file.ndjson --------------------------------------------------- -// KIBANA - -The `file.ndjson` file contains the following: - -[source,sh] --------------------------------------------------- -{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"},"references":[{"name":"ref_0","type":"index-pattern","id":"my-pattern-*"}]} -{"type":"search","id":"my-search","attributes":{"title":"Look at my search"},"references":[{"name":"ref_0","type":"index-pattern","id":"another-pattern-*"}]} -{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"},"references":[{"name":"ref_0","type":"visualization","id":"my-vis"},{"name":"ref_1","type":"search","id":"my-search"}]} --------------------------------------------------- - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "success": false, - "successCount": 1, - "errors": [ - { - "id": "my-vis", - "type": "visualization", - "title": "Look at my visualization", - "error": { - "type": "missing_references", - "references": [ - { - "type": "index-pattern", - "id": "my-pattern-*" - } - ] - }, - "meta": { - "icon": "visualizeApp", - "title": "Look at my visualization" - } - }, - { - "id": "my-search", - "type": "search", - "title": "Look at my search", - "error": { - "type": "missing_references", - "references": [ - { - "type": "index-pattern", - "id": "another-pattern-*" - } - ] - }, - "meta": { - "icon": "searchApp", - "title": "Look at my search" - } - } - ], - "successResults": [ - { - "id": "my-dashboard", - "type": "dashboard", - "meta": { - "icon": "dashboardApp", - "title": "Look at my dashboard" - } - } - ] -} --------------------------------------------------- - -The result indicates an unsuccessful import because the visualization and search resulted in a missing references error. - -Objects are created when the errors are resolved using the <>. diff --git a/docs/api/saved-objects/resolve.asciidoc b/docs/api/saved-objects/resolve.asciidoc deleted file mode 100644 index 193f114eb7d5fc..00000000000000 --- a/docs/api/saved-objects/resolve.asciidoc +++ /dev/null @@ -1,148 +0,0 @@ -[[saved-objects-api-resolve]] -=== Resolve object API -++++ -Resolve object -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Retrieve a single {kib} saved object by ID, using any legacy URL alias if it exists. - -Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new -features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that -object can be retrieved via the Resolve API using either its new ID or its old ID. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-resolve-request]] -==== Request - -`GET :/api/saved_objects/resolve//` - -`GET :/s//api/saved_objects/resolve//` - -[[saved-objects-api-resolve-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. - - -`type`:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`. - -`id`:: - (Required, string) The ID of the object to retrieve. - -[[saved-objects-api-resolve-codes]] -==== Response code - -`200`:: - Indicates a successful call. - -[[saved-objects-api-resolve-example]] -==== Example - -Retrieve the {data-source} object with the `my-pattern` ID: - -[source,sh] --------------------------------------------------- -$ curl -X GET api/saved_objects/resolve/index-pattern/my-pattern --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "saved_object": { - "id": "my-pattern", - "type": "index-pattern", - "version": 1, - "attributes": { - "title": "my-pattern-*" - } - }, - "outcome": "exactMatch" -} --------------------------------------------------- - -[NOTE] -==== -In addition to `saved_object`, several fields can be returned: - -* `outcome` (required string) -- One of the following values: - - `"exactMatch"` -- One document exactly matched the given ID. - - `"aliasMatch"` -- One document with a legacy URL alias matched the given ID; in this case the `saved_object.id` field is different than - the given ID. - - `"conflict"` -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the - `saved_object` object is the exact match, and the `saved_object.id` field is the same as the given ID. -* `alias_target_id` (optional string) -- If the `outcome` is `"aliasMatch"` or `"conflict"`, the response will also include the - `alias_target_id` field. This means that an alias was found for another object, and it describes that other object's ID. -* `alias_purpose` (optional string) -- If the `outcome` is `"aliasMatch"` or `"conflict"`, the response will also include the - `alias_purpose` field. This indicates why the alias was created, and it can be used to change the client behavior accordingly. One of the - following values: `"savedObjectConversion"`, `"savedObjectImport"` - -Client-side code uses these fields to behave differently depending on the `outcome` -- <>. -==== - -Retrieve a dashboard object in the `testspace` by ID: - -[source,sh] --------------------------------------------------- -$ curl -X GET s/testspace/api/saved_objects/resolve/dashboard/7adfa750-4c81-11e8-b3d7-01146121b73d --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "saved_object": { - "id": "7adfa750-4c81-11e8-b3d7-01146121b73d", - "type": "dashboard", - "updated_at": "2019-07-23T00:11:07.059Z", - "version": "WzQ0LDFd", - "attributes": { - "title": "[Flights] Global Flight Dashboard", - "hits": 0, - "description": "Analyze mock flight data for ES-Air, Logstash Airways, Kibana Airlines and JetBeats", - "panelsJSON": "[ . . . ]", - "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", - "version": 1, - "timeRestore": true, - "timeTo": "now", - "timeFrom": "now-24h", - "refreshInterval": { - "display": "15 minutes", - "pause": false, - "section": 2, - "value": 900000 - }, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[],\"highlightAll\":true,\"version\":true}" - } - }, - "references": [ - { - "name": "panel_0", - "type": "visualization", - "id": "aeb212e0-4c84-11e8-b3d7-01146121b73d" - }, - . . . - { - "name": "panel_18", - "type": "visualization", - "id": "ed78a660-53a0-11e8-acbd-0be0ad9d822b" - } - ], - "migrationVersion": { - "dashboard": "7.0.0" - } - }, - "outcome": "conflict", - "alias_target_id": "05becb88-e214-439a-a2ac-15fc783b5d01" -} --------------------------------------------------- diff --git a/docs/api/saved-objects/resolve_import_errors.asciidoc b/docs/api/saved-objects/resolve_import_errors.asciidoc deleted file mode 100644 index 15159ffb9ca3a9..00000000000000 --- a/docs/api/saved-objects/resolve_import_errors.asciidoc +++ /dev/null @@ -1,241 +0,0 @@ -[[saved-objects-api-resolve-import-errors]] -=== Resolve import errors API -++++ -Resolve import errors -++++ - -experimental[] Resolve errors from the <>. - -To resolve errors, you can: - -* Retry certain saved objects - -* Overwrite specific saved objects - -* Change references to different saved objects - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-resolve-import-errors-request]] -==== Request - -`POST :/api/saved_objects/_resolve_import_errors` - -`POST :/s//api/saved_objects/_resolve_import_errors` - -[[saved-objects-api-resolve-import-errors-path-params]] -==== Path parameters - -`space_id`:: - (Optional, string) An identifier for the <>. When `space_id` is unspecified in the URL, the default space is used. - -[[saved-objects-api-resolve-import-errors-query-params]] -==== Query parameters - -`createNewCopies`:: - (Optional, boolean) Creates copies of the saved objects, regenerates each object ID, and resets the origin. When enabled during the - initial import, also enable when resolving import errors. - -`compatibilityMode`:: - (Optional, boolean) Applies various adjustments to the saved objects that are being imported to maintain compatibility between different {kib} - versions. When enabled during the initial import, also enable when resolving import errors. -+ -NOTE: This option cannot be used with the `createNewCopies` option. - -[[saved-objects-api-resolve-import-errors-request-body]] -==== Request body - -The request body must include the multipart/form-data type. - -`file`:: - The same file given to the import API. - -`retries`:: - (Required, array) The retry operations, which can specify how to resolve different types of errors. -+ -.Properties of `` -[%collapsible%open] -===== - `type`::: - (Required, string) The saved object type. - `id`::: - (Required, string) The saved object ID. - `overwrite`::: - (Optional, boolean) When set to `true`, the source object overwrites the conflicting destination object. When set to `false`, does - nothing. - `destinationId`::: - (Optional, string) Specifies the destination ID that the imported object should have, if different from the current ID. - `replaceReferences`::: - (Optional, array) A list of `type`, `from`, and `to` used to change the object references. - `ignoreMissingReferences`::: - (Optional, boolean) When set to `true`, ignores missing reference errors. When set to `false`, does nothing. -===== - -[[saved-objects-api-resolve-import-errors-response-body]] -==== Response body - -`success`:: - (boolean) Indicates a successful import. When set to `false`, some objects may not have been created. For additional information, refer to - the `errors` and `successResults` properties. - -`successCount`:: - (number) Indicates the number of successfully resolved records. - -`errors`:: - (Optional, array) Specifies the objects that failed to resolve. -+ -NOTE: One object can result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and a -`conflict` error. - -`successResults`:: - (Optional, array) Indicates the objects that are successfully imported, with any metadata if applicable. -+ -NOTE: Objects are only created when all resolvable errors are addressed, including conflict and missing references. To resolve errors, refer -to the <>. - -[[saved-objects-api-resolve-import-errors-codes]] -==== Response code - -`200`:: - Indicates a successful call. - -[[saved-objects-api-resolve-import-errors-example]] -==== Examples - -[[saved-objects-api-resolve-import-errors-example-1]] -===== Resolve conflict errors - -This example builds upon the <>. - -Resolve conflict errors for a {data-source}, visualization, and *Canvas* workpad by overwriting the existing saved objects: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form file=@file.ndjson --form retries='[{"type":"index-pattern","id":"my-pattern","overwrite":true},{"type":"visualization","id":"my-vis","overwrite":true,"destinationId":"another-vis"},{"type":"canvas","id":"my-canvas","overwrite":true,"destinationId":"yet-another-canvas"},{"type":"dashboard","id":"my-dashboard"}]' --------------------------------------------------- -// KIBANA - -The `file.ndjson` file contains the following: - -[source,sh] --------------------------------------------------- -{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}} -{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"}} -{"type":"canvas-workpad","id":"my-canvas","attributes":{"name":"Look at my canvas"}} -{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}} --------------------------------------------------- - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "success": true, - "successCount": 4, - "successResults": [ - { - "id": "my-pattern", - "type": "index-pattern", - "meta": { - "icon": "indexPatternApp", - "title": "my-pattern-*" - } - }, - { - "id": "my-vis", - "type": "visualization", - "destinationId": "another-vis", - "meta": { - "icon": "visualizeApp", - "title": "Look at my visualization" - } - }, - { - "id": "my-canvas", - "type": "canvas-workpad", - "destinationId": "yet-another-canvas", - "meta": { - "icon": "canvasApp", - "title": "Look at my canvas" - } - }, - { - "id": "my-dashboard", - "type": "dashboard", - "meta": { - "icon": "dashboardApp", - "title": "Look at my dashboard" - } - } - ] -} --------------------------------------------------- - -The result indicates a successful import, and all four objects were created. - -TIP: If a prior import attempt resulted in resolvable errors, you must include a retry for each object you want to import, including any -that were returned in the `successResults` array. In this example, we retried importing the dashboard accordingly. - -[[saved-objects-api-resolve-import-errors-example-2]] -===== Resolve missing reference errors - -This example builds upon the <>. - -Resolve a missing reference error for a visualization by replacing the {data-source} with another, and resolve a missing reference error for -a search by ignoring it: - -[source,sh] --------------------------------------------------- -$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form file=@file.ndjson --form retries='[{"type":"visualization","id":"my-vis","replaceReferences":[{"type":"index-pattern","from":"my-pattern-*","to":"existing-pattern"}]},{"type":"search","id":"my-search","ignoreMissingReferences":true},{"type":"dashboard","id":"my-dashboard"}]' --------------------------------------------------- -// KIBANA - -The `file.ndjson` file contains the following: - -[source,sh] --------------------------------------------------- -{"type":"visualization","id":"my-vis","attributes":{"title":"Look at my visualization"},"references":[{"name":"ref_0","type":"index-pattern","id":"my-pattern-*"}]} -{"type":"search","id":"my-search","attributes":{"title":"Look at my search"},"references":[{"name":"ref_0","type":"index-pattern","id":"another-pattern-*"}]} -{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"},"references":[{"name":"ref_0","type":"visualization","id":"my-vis"}]} --------------------------------------------------- - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "success": true, - "successCount": 3, - "successResults": [ - { - "id": "my-vis", - "type": "visualization", - "meta": { - "icon": "visualizeApp", - "title": "Look at my visualization" - } - }, - { - "id": "my-search", - "type": "search", - "meta": { - "icon": "searchApp", - "title": "Look at my search" - } - }, - { - "id": "my-dashboard", - "type": "dashboard", - "meta": { - "icon": "dashboardApp", - "title": "Look at my dashboard" - } - } - ] -} --------------------------------------------------- - -The result indicates a successful import, and all three objects were created. - -TIP: If a prior import attempt resulted in resolvable errors, you must include a retry for each object you want to import, including any -that were returned in the `successResults` array. In this example, we retried importing the dashboard accordingly. diff --git a/docs/api/saved-objects/rotate_encryption_key.asciidoc b/docs/api/saved-objects/rotate_encryption_key.asciidoc deleted file mode 100644 index 51db54f9e864cf..00000000000000 --- a/docs/api/saved-objects/rotate_encryption_key.asciidoc +++ /dev/null @@ -1,112 +0,0 @@ -[role="xpack"] -[[saved-objects-api-rotate-encryption-key]] -=== Rotate encryption key API -++++ -Rotate encryption key -++++ - -experimental[] Rotate the encryption key for encrypted saved objects. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -If a saved object cannot be decrypted using the primary encryption key, then {kib} will attempt to decrypt it using the specified <>. In most of the cases this overhead is negligible, but if you're dealing with a large number of saved objects and experiencing performance issues, you may want to rotate the encryption key. - -[IMPORTANT] -============================================================================ -Bulk key rotation can consume a considerable amount of resources and hence only user with a `superuser` role can trigger it. -============================================================================ - -[[saved-objects-api-rotate-encryption-key-request]] -==== Request - -`POST :/api/encrypted_saved_objects/_rotate_key` - -[[saved-objects-api-rotate-encryption-key-request-query-params]] -==== Query parameters - -`type`:: -(Optional, string) Limits encryption key rotation only to the saved objects with the specified type. By default, {kib} tries to rotate the encryption key for all saved object types that may contain encrypted attributes. - -`batch_size`:: -(Optional, number) Specifies a maximum number of saved objects that {kib} can process in a single batch. Bulk key rotation is an iterative process since {kib} may not be able to fetch and process all required saved objects in one go and splits processing into consequent batches. By default, the batch size is 10000, which is also a maximum allowed value. - -[[saved-objects-api-rotate-encryption-key-response-body]] -==== Response body - -`total`:: -(number) Indicates the total number of _all_ encrypted saved objects (optionally filtered by the requested `type`), regardless of the key {kib} used for encryption. - -`successful`:: -(number) Indicates the total number of _all_ encrypted saved objects (optionally filtered by the requested `type`), regardless of the key {kib} used for encryption. -+ -NOTE: In most cases, `total` will be greater than `successful` even if `failed` is zero. The reason is that {kib} may not need or may not be able to rotate encryption keys for all encrypted saved objects. - -`failed`:: -(number) Indicates the number of the saved objects that were still encrypted with one of the old encryption keys that {kib} failed to re-encrypt with the primary key. - -[[saved-objects-api-rotate-encryption-key-response-codes]] -==== Response code - -`200`:: -Indicates a successful call. - -`400`:: -Indicates that either query parameters are wrong or <> aren't configured. - -`429`:: -Indicates that key rotation is already in progress. - -[[saved-objects-api-rotate-encryption-key-example]] -==== Examples - -[[saved-objects-api-rotate-encryption-key-example-1]] -===== Encryption key rotation with default parameters - -[source,sh] --------------------------------------------------- -$ curl -X POST /api/encrypted_saved_objects/_rotate_key --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "total": 1000, - "successful": 300, - "failed": 0 -} --------------------------------------------------- - -The result indicates that the encryption key was successfully rotated for 300 out of 1000 saved objects with encrypted attributes, and 700 of the saved objects either didn't require key rotation, or were encrypted with an unknown encryption key. - -[[saved-objects-api-rotate-encryption-key-example-2]] -===== Encryption key rotation for the specific type with reduce batch size - -[IMPORTANT] -============================================================================ -Default parameters are optimized for speed. Change the parameters only when necessary. However, if you're experiencing any issues with this API, you may want to decrease a batch size or rotate the encryption keys for the specific types only. In this case, you may need to run key rotation multiple times in a row. -============================================================================ - -In this example, key rotation is performed for all saved objects with the `alert` type in batches of 5000. - -[source,sh] --------------------------------------------------- -$ curl -X POST /api/encrypted_saved_objects/_rotate_key?type=alert&batch_size=5000 --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "total": 100, - "successful": 100, - "failed": 0 -} --------------------------------------------------- - -The result indicates that the encryption key was successfully rotated for all 100 saved objects with the `alert` type. - diff --git a/docs/api/saved-objects/update.asciidoc b/docs/api/saved-objects/update.asciidoc deleted file mode 100644 index 2bee650d7295b7..00000000000000 --- a/docs/api/saved-objects/update.asciidoc +++ /dev/null @@ -1,93 +0,0 @@ -[[saved-objects-api-update]] -=== Update object API -++++ -Update object -++++ - -deprecated::[8.7.0, To be removed in an upcoming version] - -Update the attributes for existing {kib} saved objects. - -NOTE: For the latest details, refer to {api-kibana}/group/endpoint-saved-objects[saved object APIs]. - -[[saved-objects-api-update-request]] -==== Request - -`PUT :/api/saved_objects//` - -`PUT :/s//api/saved_objects//` - -[[saved-objects-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. - -`type`:: - (Required, string) Valid options include `visualization`, `dashboard`, `search`, `index-pattern`, `config`. - -`id`:: - (Required, string) The object ID to update. - -[[saved-objects-api-update-request-body]] -==== Request body - -`attributes`:: - (Required, object) The data to persist. -+ -WARNING: When you update, attributes are not validated, which allows you to pass arbitrary and ill-formed data into the API and break {kib}. Make sure any data that you send to the API is properly formed. - -`references`:: - (Optional, array) Objects with `name`, `id`, and `type` properties that describe the other saved objects this object references. To refer to the other saved object, use `name` in the attributes, but never the `id`, which automatically updates during migrations or import/export. - -`upsert`:: - (Optional, object) If specified, will create the document with the given upsert attributes if it doesn't exist. - -[[saved-objects-api-update-errors-codes]] -==== Response code - -`200`:: - Indicates a successful call. - -`404`:: - Indicates the object was not found. - -`409`:: - Indicates a <>. - -[[saved-objects-api-update-example]] -==== Example - -Update an existing {data-source} object,`my-pattern`, with a different title: - -[source,sh] --------------------------------------------------- -$ curl -X PUT api/index_patterns/index-pattern/my-pattern -{ - "attributes": { - "title": "some-other-pattern-*" - } -} --------------------------------------------------- -// KIBANA - -The API returns the following: - -[source,sh] --------------------------------------------------- -{ - "id": "my-pattern", - "type": "index-pattern", - "version": 2, - "attributes": { - "title": "some-other-pattern-*" - } -} --------------------------------------------------- - -[[saved-objects-api-update-conflict-errors]] -==== Conflict errors - -Starting in {kib} 8.0, saved objects can exist in multiple spaces. As a result, you may encounter a 409 *alias conflict* error when using -the `upsert` option. The Update API response is limited and does not include additional metadata. You can get more details about this error -by using the <> instead. diff --git a/docs/management/managing-saved-objects.asciidoc b/docs/management/managing-saved-objects.asciidoc index 7fccd6c6c93f73..df96721205d598 100644 --- a/docs/management/managing-saved-objects.asciidoc +++ b/docs/management/managing-saved-objects.asciidoc @@ -41,8 +41,7 @@ Use import and export to move objects between different {kib} instances. These actions are useful when you have multiple environments for development and production. Import and export also work well when you have a large number of objects to update and want to batch the process. -{kib} also provides <> and -<> APIs to automate this process. +{kib} also provides import and export {api-kibana}/group/endpoint-saved-objects[saved objects APIs] to automate this process. [float] diff --git a/docs/management/saved-objects/saved-object-ids.asciidoc b/docs/management/saved-objects/saved-object-ids.asciidoc index 97ab0daa953436..181bf6ee97b037 100644 --- a/docs/management/saved-objects/saved-object-ids.asciidoc +++ b/docs/management/saved-objects/saved-object-ids.asciidoc @@ -77,13 +77,12 @@ be broken. For more information, refer to {kibana-ref-all}/8.0/release-notes-8.0 If you are using the saved objects APIs directly, you should be aware of these changes: -WARNING: Some of the saved objects APIs are deprecated in 8.7.0. For more information, refer to the <> +WARNING: Some of the saved objects APIs are deprecated in 8.7.0. For more information, refer to the <> -* When using the <> or <> API, you may encounter - <> that **cannot** be overridden using the `overwrite: true` +* When using the create or bulk create API, you may encounter conflict errors that **cannot** be overridden using the `overwrite: true` option. This can occur if there is already a saved object with this ID in a _different_ space, or if there is a legacy URL alias for this ID in the same space. -* When using the <> or <> API, objects can potentially be +* When using the import or copy to space API, objects can potentially be created with a different ID as described above. -* When using the <> API, if the saved object exists in multiple spaces, it can only be deleted by using the - <>. +* When using the delete API, if the saved object exists in multiple spaces, it can only be deleted by using the + `force` option. diff --git a/docs/redirects.asciidoc b/docs/redirects.asciidoc index aa5e2390c95188..5ffdbbcf768319 100644 --- a/docs/redirects.asciidoc +++ b/docs/redirects.asciidoc @@ -766,6 +766,154 @@ Refer to {observability-guide}/apm-app-troubleshooting.html[Troubleshooting]. :!apm-docs-move-notice: +[role="exclude",id="saved-objects-api-export"] +== Export objects API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-import"] +== Import objects API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-bulk-create"] +== Bulk create saved objects API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-bulk-delete"] +== Bulk delete object API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-bulk-get"] +== Bulk get objects API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-bulk-resolve"] +== Bulk resolve objects API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-bulk-update"] +== Bulk update object API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-create"] +== Create saved objects API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-delete"] +== Delete object API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-find"] +== Find objects API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-get"] +== Get object API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-resolve-import-errors"] +== Resolve import errors API + +[role="exclude",id="saved-objects-api-resolve"] +== Resolve object API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-rotate-encryption-key"] +== Rotate encryption key API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="saved-objects-api-update"] +== Update object API + +Refer to {api-kibana}/group/endpoint-saved-objects[saved objects API]. + +[role="exclude",id="data-views-api-get-all"] +== Get all data views API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-runtime-field-api-create"] +== Create runtime field API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-runtime-field-api-delete"] +== Delete runtime field API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-runtime-field-api-get"] +== Get runtime field API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-runtime-field-api-update"] +== Update runtime field API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-runtime-field-api-upsert"] +== Upsert runtime field API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-api-create"] +== Create data view API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-api-default-get"] +== Get default data view API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-api-default-set"] +== Set default data view API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-api-delete"] +== Delete data view API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-api-get"] +== Get data view API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-api-swap-references-preview"] +== Swap references preview data view API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-api-swap-references"] +== Swap references data view API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-fields-api-update"] +== Update data view fields API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + +[role="exclude",id="data-views-api-update"] +== Update data view API + +Refer to {api-kibana}/group/endpoint-data-views[data views API]. + [role="exclude",id="create-rule-api"] == Create rule API @@ -984,4 +1132,5 @@ Refer to {api-kibana}/group/endpoint-cases[cases API]. [role="exclude",id="machine-learning-api-sync"] == Sync {ml} saved objects API -Refer to {api-kibana}/group/endpoint-ml[machine learning APIs]. \ No newline at end of file +Refer to {api-kibana}/group/endpoint-ml[machine learning APIs]. + diff --git a/docs/user/dashboard/dashboard.asciidoc b/docs/user/dashboard/dashboard.asciidoc index 36dce0e2586e55..d597cf135f3969 100644 --- a/docs/user/dashboard/dashboard.asciidoc +++ b/docs/user/dashboard/dashboard.asciidoc @@ -442,7 +442,7 @@ To share the dashboard with a larger audience, click *Share* in the toolbar. For [[import-dashboards]] == Export dashboards -To automate {kib}, you can export dashboards as NDJSON using the <>. It is important to export dashboards with all necessary references. +To automate {kib}, you can export dashboards as NDJSON using the {api-kibana}/group/endpoint-saved-objects[Export saved objects API]. It is important to export dashboards with all necessary references. -- include::tutorial-create-a-dashboard-of-lens-panels.asciidoc[] diff --git a/docs/user/security/secure-saved-objects.asciidoc b/docs/user/security/secure-saved-objects.asciidoc index d83a8ec0a23eab..b6c26a9e4ee12a 100644 --- a/docs/user/security/secure-saved-objects.asciidoc +++ b/docs/user/security/secure-saved-objects.asciidoc @@ -29,7 +29,7 @@ For help generating the encryption key, refer to the <>. +When you change an encryption key, be sure to keep the old one for some time. Although {kib} only uses a new encryption key to encrypt all new and updated data, it still may need the old one to decrypt data that was encrypted using the old key. It's possible to have multiple old keys used only for decryption. {kib} doesn't automatically re-encrypt existing saved objects with the new encryption key. Re-encryption only happens when you update existing object or use the {api-kibana}/group/endpoint-saved-objects[rotate encryption key API]. Here is how your `kibana.yml` might look if you use key rotation functionality: @@ -49,7 +49,7 @@ xpack.encryptedSavedObjects: You might also leverage this functionality if multiple {kib} instances connected to the same {es} cluster use different encryption keys. In this case, you might have a mix of saved objects encrypted with different keys, and every {kib} instance can only deal with a specific subset of objects. To fix this, you must choose a single primary encryption key for `xpack.encryptedSavedObjects.encryptionKey`, move all other encryption keys to `xpack.encryptedSavedObjects.keyRotation.decryptionOnlyKeys`, and sync this configuration across all {kib} instances. ============================================================================ -At some point, you might want to dispose of old encryption keys completely. Make sure there are no saved objects that {kib} encrypted with these encryption keys. You can use the <> to determine which existing saved objects require decryption-only keys and re-encrypt them with the primary key. +At some point, you might want to dispose of old encryption keys completely. Make sure there are no saved objects that {kib} encrypted with these encryption keys. You can use the {api-kibana}/group/endpoint-saved-objects[rotate encryption key API] to determine which existing saved objects require decryption-only keys and re-encrypt them with the primary key. [[encryption-key-docker-configuration]] ==== Docker configuration