mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Sharing saved-objects phase 1.5 (#75444)
Added UI for sharing saved objects, and updated UI for importing and copying too
This commit is contained in:
parent
9873df8ee0
commit
6627d7d9af
320 changed files with 14490 additions and 5491 deletions
|
@ -44,7 +44,10 @@ experimental[] Retrieve a paginated set of {kib} saved objects by various condit
|
|||
(Optional, array|string) The fields to return in the `attributes` key of the response.
|
||||
|
||||
`sort_field`::
|
||||
(Optional, string) The field that sorts the response.
|
||||
(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.
|
||||
|
|
|
@ -17,13 +17,22 @@ experimental[] Create sets of {kib} saved objects from a file created by the exp
|
|||
==== 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.
|
||||
(Optional, string) An identifier for the <<xpack-spaces,space>>. 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 cannot be used with the `overwrite` option.
|
||||
|
||||
`overwrite`::
|
||||
(Optional, boolean) Overwrites saved objects.
|
||||
(Optional, boolean) Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by
|
||||
overwriting the destination object.
|
||||
+
|
||||
NOTE: This cannot be used with the `createNewCopies` option.
|
||||
|
||||
[[saved-objects-api-import-request-body]]
|
||||
==== Request body
|
||||
|
@ -37,13 +46,23 @@ The request body must include the multipart/form-data type.
|
|||
==== Response body
|
||||
|
||||
`success`::
|
||||
Top-level property that indicates if the import was successful.
|
||||
(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`::
|
||||
Indicates the number of successfully imported records.
|
||||
(number) Indicates the number of successfully imported records.
|
||||
|
||||
`errors`::
|
||||
(array) Indicates the import was unsuccessful and specifies the objects that failed to import.
|
||||
(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-example,examples>>.
|
||||
|
||||
[[saved-objects-api-import-codes]]
|
||||
==== Response code
|
||||
|
@ -51,8 +70,64 @@ The request body must include the multipart/form-data type.
|
|||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[saved-objects-api-import-example]]
|
||||
==== Examples
|
||||
|
||||
[[saved-objects-api-import-example-1]]
|
||||
===== Successful import with `createNewCopies` enabled
|
||||
|
||||
Import an index pattern 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 an index pattern and dashboard:
|
||||
|
||||
[source,sh]
|
||||
|
@ -75,11 +150,34 @@ The API returns the following:
|
|||
--------------------------------------------------
|
||||
{
|
||||
"success": true,
|
||||
"successCount": 2
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
Import an index pattern and dashboard that includes a conflict on the index pattern:
|
||||
The result indicates a successful import, and both objects are created.
|
||||
|
||||
[[saved-objects-api-import-example-3]]
|
||||
===== Failed import with conflict errors
|
||||
|
||||
Import an index pattern, visualization, *Canvas* workpad, and dashboard that include saved objects:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -92,6 +190,8 @@ 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"}}
|
||||
--------------------------------------------------
|
||||
|
||||
|
@ -110,12 +210,85 @@ The API returns the following:
|
|||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
Import a visualization and dashboard with an index pattern for the visualization reference that doesn't exist:
|
||||
The result indicates an unsuccessful import because the index pattern, visualization, *Canvas* workpad, and dashboard resulted in a conflict
|
||||
error:
|
||||
|
||||
* An index pattern 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 <<xpack-spaces,spaces>> 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-resolve-import-errors-example-1,Resolve import errors API>>.
|
||||
|
||||
[[saved-objects-api-import-example-4]]
|
||||
===== Failed import with missing reference errors
|
||||
|
||||
Import a visualization and dashboard when the index pattern for the visualization doesn't exist:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
@ -127,21 +300,23 @@ The `file.ndjson` file contains the following:
|
|||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
{"type":"visualization","id":"my-vis","attributes":{"title":"my-vis"},"references":[{"name":"ref_0","type":"index-pattern","id":"my-pattern-*"}]}
|
||||
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"},"references":[{"name":"ref_0","type":"visualization","id":"my-vis"}]}
|
||||
{"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": 0,
|
||||
"successCount": 1,
|
||||
"errors": [
|
||||
{
|
||||
"id": "my-vis",
|
||||
"type": "visualization",
|
||||
"title": "my-vis",
|
||||
"title": "Look at my visualization",
|
||||
"error": {
|
||||
"type": "missing_references",
|
||||
"references": [
|
||||
|
@ -149,14 +324,45 @@ The API returns the following:
|
|||
"type": "index-pattern",
|
||||
"id": "my-pattern-*"
|
||||
}
|
||||
],
|
||||
"blocking": [
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"icon": "visualizeApp",
|
||||
"title": "Look at my visualization"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-search",
|
||||
"type": "search",
|
||||
"title": "Look at my search",
|
||||
"error": {
|
||||
"type": "missing_references",
|
||||
"references": [
|
||||
{
|
||||
"type": "dashboard",
|
||||
"id": "my-dashboard"
|
||||
"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 <<saved-objects-api-resolve-import-errors-example-2,Resolve import errors API>>.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<titleabbrev>Resolve import errors</titleabbrev>
|
||||
++++
|
||||
|
||||
experimental[] Resolve errors from the import API.
|
||||
experimental[] Resolve errors from the <<saved-objects-api-import,Import objects API>>.
|
||||
|
||||
To resolve errors, you can:
|
||||
|
||||
|
@ -25,7 +25,14 @@ To resolve errors, you can:
|
|||
==== 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.
|
||||
(Optional, string) An identifier for the <<xpack-spaces,space>>. When `space_id` is unspecfied 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.
|
||||
|
||||
[[saved-objects-api-resolve-import-errors-request-body]]
|
||||
==== Request body
|
||||
|
@ -36,19 +43,47 @@ The request body must include the multipart/form-data type.
|
|||
The same file given to the import API.
|
||||
|
||||
`retries`::
|
||||
(array) A list of `type`, `id`, `replaceReferences`, and `overwrite` objects to retry. The property `replaceReferences` is a list of `type`, `from`, and `to` used to change the object references.
|
||||
(Required, array) The retry operations, which can specify how to resolve different types of errors.
|
||||
+
|
||||
.Properties of `<retries>`
|
||||
[%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`::
|
||||
Top-level property that indicates if the errors successfully resolved.
|
||||
(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`::
|
||||
Indicates the number of successfully resolved records.
|
||||
(number) Indicates the number of successfully resolved records.
|
||||
|
||||
`errors`::
|
||||
(array) Specifies the objects that failed to resolve.
|
||||
(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-example, examples>>.
|
||||
|
||||
[[saved-objects-api-resolve-import-errors-codes]]
|
||||
==== Response code
|
||||
|
@ -59,36 +94,16 @@ The request body must include the multipart/form-data type.
|
|||
[[saved-objects-api-resolve-import-errors-example]]
|
||||
==== Examples
|
||||
|
||||
Retry a dashboard import:
|
||||
[[saved-objects-api-resolve-import-errors-example-1]]
|
||||
===== Resolve conflict errors
|
||||
|
||||
This example builds upon the <<saved-objects-api-import-example-3,Import objects API example with conflict errors>>.
|
||||
|
||||
Resolve conflict errors for an index pattern, 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":"dashboard","id":"my-dashboard"}]'
|
||||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
The `file.ndjson` file contains the following:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}}
|
||||
--------------------------------------------------
|
||||
|
||||
The API returns the following:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"success": true,
|
||||
"successCount": 1
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
Resolve errors for a dashboard and overwrite the existing saved object:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
$ curl -X POST api/saved_objects/_resolve_import_errors -H "kbn-xsrf: true" --form file=@file.ndjson --form retries='[{"type":"dashboard","id":"my-dashboard","overwrite":true}]'
|
||||
$ 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
|
||||
|
||||
|
@ -97,6 +112,8 @@ 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"}}
|
||||
--------------------------------------------------
|
||||
|
||||
|
@ -106,15 +123,62 @@ The API returns the following:
|
|||
--------------------------------------------------
|
||||
{
|
||||
"success": true,
|
||||
"successCount": 1
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
Resolve errors for a visualization by replacing the index pattern with another:
|
||||
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 <<saved-objects-api-import-example-4,Import objects API example with missing reference errors>>.
|
||||
|
||||
Resolve a missing reference error for a visualization by replacing the index pattern 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":"missing","to":"existing"}]}]'
|
||||
$ 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
|
||||
|
||||
|
@ -122,7 +186,9 @@ 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":"missing"}]}
|
||||
{"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:
|
||||
|
@ -131,6 +197,37 @@ The API returns the following:
|
|||
--------------------------------------------------
|
||||
{
|
||||
"success": true,
|
||||
"successCount": 1
|
||||
"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.
|
||||
|
|
|
@ -24,7 +24,8 @@ You can request to overwrite any objects that already exist in the target space
|
|||
==== {api-path-parms-title}
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) The ID of the space that contains the saved objects you want to copy. When `space_id` is unspecified in the URL, the default space is used.
|
||||
(Optional, string) The ID of the space that contains the saved objects you want to copy. When `space_id` is unspecified in the URL, the
|
||||
default space is used.
|
||||
|
||||
[role="child_attributes"]
|
||||
[[spaces-api-copy-saved-objects-request-body]]
|
||||
|
@ -47,10 +48,12 @@ You can request to overwrite any objects that already exist in the target space
|
|||
=====
|
||||
|
||||
`includeReferences`::
|
||||
(Optional, boolean) When set to `true`, all saved objects related to the specified saved objects will also be copied into the target spaces. The default value is `false`.
|
||||
(Optional, boolean) When set to `true`, all saved objects related to the specified saved objects will also be copied into the target
|
||||
spaces. The default value is `false`.
|
||||
|
||||
`overwrite`::
|
||||
(Optional, boolean) When set to `true`, all conflicts are automatically overidden. When a saved object with a matching `type` and `id` exists in the target space, that version is replaced with the version from the source space. The default value is `false`.
|
||||
(Optional, boolean) When set to `true`, all conflicts are automatically overidden. When a saved object with a matching `type` and `id`
|
||||
exists in the target space, that version is replaced with the version from the source space. The default value is `false`.
|
||||
|
||||
[role="child_attributes"]
|
||||
[[spaces-api-copy-saved-objects-response-body]]
|
||||
|
@ -63,7 +66,8 @@ You can request to overwrite any objects that already exist in the target space
|
|||
[%collapsible%open]
|
||||
=====
|
||||
`success`:::
|
||||
(boolean) The copy operation was successful. When set to `false`, some objects may have been copied. For additional information, refer to the `successCount` and `errors` properties.
|
||||
(boolean) The copy operation was successful. When set to `false`, some objects may have been copied. For additional information, refer
|
||||
to the `errors` and `successResults` properties.
|
||||
|
||||
`successCount`:::
|
||||
(number) The number of objects that successfully copied.
|
||||
|
@ -71,6 +75,9 @@ You can request to overwrite any objects that already exist in the target space
|
|||
`errors`:::
|
||||
(Optional, array) The errors that occurred during the copy operation. When errors are reported, the `success` flag is set to `false`.
|
||||
+
|
||||
NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and a
|
||||
`conflict` error.
|
||||
+
|
||||
.Properties of `errors`
|
||||
[%collapsible%open]
|
||||
======
|
||||
|
@ -84,15 +91,159 @@ You can request to overwrite any objects that already exist in the target space
|
|||
.Properties of `error`
|
||||
[%collapsible%open]
|
||||
=======
|
||||
`type`:::::
|
||||
(string) The type of error. For example, `unsupported_type`, `missing_references`, or `unknown`. Errors marked as `conflict` may be resolved by using the <<spaces-api-resolve-copy-saved-objects-conflicts, Resolve copy saved objects conflicts API>>.
|
||||
`type`::::
|
||||
(string) The type of error. For example, `conflict`, `ambiguous_conflict`, `missing_references`, `unsupported_type`, or `unknown`.
|
||||
Errors marked as `conflict` or `ambiguous_conflict` may be resolved by using the <<spaces-api-resolve-copy-saved-objects-conflicts,
|
||||
Resolve copy saved objects conflicts API>>.
|
||||
`destinationId`::::
|
||||
(Optional, string) The destination ID that was used during the copy attempt. This is only present on `conflict` error types.
|
||||
`destinations`::::
|
||||
(Optional, array) A list of possible object destinations with `id`, `title`, and `updatedAt` fields to describe each one. This is
|
||||
only present on `ambiguous_conflict` error types.
|
||||
=======
|
||||
======
|
||||
|
||||
`successResults`:::
|
||||
(Optional, array) Indicates successfully copied objects, with any applicable metadata.
|
||||
+
|
||||
NOTE: Objects are created when all resolvable errors are addressed, including conflict and missing references errors. For more information,
|
||||
refer to the <<spaces-api-copy-saved-objects-example,examples>>.
|
||||
|
||||
=====
|
||||
[[spaces-api-copy-saved-objects-example]]
|
||||
==== {api-examples-title}
|
||||
|
||||
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` and `sales` spaces:
|
||||
[[spaces-api-copy-saved-objects-example-1]]
|
||||
===== Successful copy (with `createNewCopies` enabled)
|
||||
|
||||
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` space. In this example,
|
||||
the dashboard has a reference to a visualization, and that has a reference to an index pattern:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
$ curl -X POST api/spaces/_copy_saved_objects
|
||||
{
|
||||
"objects": [{
|
||||
"type": "dashboard",
|
||||
"id": "my-dashboard"
|
||||
}],
|
||||
"spaces": ["marketing"],
|
||||
"includeReferences": true,
|
||||
"createNewcopies": true
|
||||
}
|
||||
----
|
||||
// KIBANA
|
||||
|
||||
The API returns the following:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
{
|
||||
"marketing": {
|
||||
"success": true,
|
||||
"successCount": 3,
|
||||
"successResults": [
|
||||
{
|
||||
"id": "my-dashboard",
|
||||
"type": "dashboard",
|
||||
"destinationId": "1e127098-5b80-417f-b0f1-c60c8395358f",
|
||||
"meta": {
|
||||
"icon": "dashboardApp",
|
||||
"title": "Look at my dashboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-vis",
|
||||
"type": "visualization",
|
||||
"destinationId": "a610ed80-1c73-4507-9e13-d3af736c8e04",
|
||||
"meta": {
|
||||
"icon": "visualizeApp",
|
||||
"title": "Look at my visualization"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-index-pattern",
|
||||
"type": "index-pattern",
|
||||
"destinationId": "bc3c9c70-bf6f-4bec-b4ce-f4189aa9e26b",
|
||||
"meta": {
|
||||
"icon": "indexPatternApp",
|
||||
"title": "my-pattern-*"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
The result indicates a successful copy, and all three objects are created. Since these objects were created as new copies, each entry in the
|
||||
`successResults` array includes a `destinationId` attribute.
|
||||
|
||||
[[spaces-api-copy-saved-objects-example-2]]
|
||||
===== Successful copy (with `createNewCopies` disabled)
|
||||
|
||||
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` space. In this example,
|
||||
the dashboard has a reference to a visualization, and that has a reference to an index pattern:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
$ curl -X POST api/spaces/_copy_saved_objects
|
||||
{
|
||||
"objects": [{
|
||||
"type": "dashboard",
|
||||
"id": "my-dashboard"
|
||||
}],
|
||||
"spaces": ["marketing"],
|
||||
"includeReferences": true
|
||||
}
|
||||
----
|
||||
// KIBANA
|
||||
|
||||
The API returns the following:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
{
|
||||
"marketing": {
|
||||
"success": true,
|
||||
"successCount": 3,
|
||||
"successResults": [
|
||||
{
|
||||
"id": "my-dashboard",
|
||||
"type": "dashboard",
|
||||
"meta": {
|
||||
"icon": "dashboardApp",
|
||||
"title": "Look at my dashboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-vis",
|
||||
"type": "visualization",
|
||||
"meta": {
|
||||
"icon": "visualizeApp",
|
||||
"title": "Look at my visualization"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-index-pattern",
|
||||
"type": "index-pattern",
|
||||
"meta": {
|
||||
"icon": "indexPatternApp",
|
||||
"title": "my-pattern-*"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
The result indicates a successful copy, and all three objects are created.
|
||||
|
||||
[[spaces-api-copy-saved-objects-example-3]]
|
||||
===== Failed copy (with conflict errors)
|
||||
|
||||
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` and `sales` spaces. In
|
||||
this example, the dashboard has a reference to a visualization and a *Canvas* workpad, and the visualization has a reference to an index
|
||||
pattern:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
|
@ -115,35 +266,146 @@ The API returns the following:
|
|||
{
|
||||
"marketing": {
|
||||
"success": true,
|
||||
"successCount": 5
|
||||
"successCount": 4,
|
||||
"successResults": [
|
||||
{
|
||||
"id": "my-dashboard",
|
||||
"type": "dashboard",
|
||||
"meta": {
|
||||
"icon": "dashboardApp",
|
||||
"title": "Look at my dashboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-vis",
|
||||
"type": "visualization",
|
||||
"meta": {
|
||||
"icon": "visualizeApp",
|
||||
"title": "Look at my visualization"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-canvas",
|
||||
"type": "canvas-workpad",
|
||||
"meta": {
|
||||
"icon": "canvasApp",
|
||||
"title": "Look at my canvas"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-index-pattern",
|
||||
"type": "index-pattern",
|
||||
"meta": {
|
||||
"icon": "indexPatternApp",
|
||||
"title": "my-pattern-*"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"sales": {
|
||||
"success": false,
|
||||
"successCount": 4,
|
||||
"errors": [{
|
||||
"id": "my-index-pattern",
|
||||
"type": "index-pattern",
|
||||
"error": {
|
||||
"type": "conflict"
|
||||
"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 `marketing` space succeeds, but the `sales` space fails due to a conflict in the index pattern.
|
||||
The result indicates a successful copy for the `marketing` space, and an unsuccessful copy for the `sales` space because the index pattern,
|
||||
visualization, and *Canvas* workpad each resulted in a conflict error:
|
||||
|
||||
Copy a visualization with the `my-viz` ID from the `marketing` space to the `default` space:
|
||||
* An index pattern 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 spaces behave in a similar way as legacy non-shareable objects. When a shareable object is copied 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 copied 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 <<spaces-api-resolve-copy-saved-objects-conflicts-example-1,Resolve copy conflicts
|
||||
API>>.
|
||||
|
||||
[[spaces-api-copy-saved-objects-example-4]]
|
||||
===== Failed copy (with missing reference errors)
|
||||
|
||||
Copy a dashboard with the `my-dashboard` ID, including all references from the `default` space to the `marketing` space. In this example,
|
||||
the dashboard has a reference to a visualization and a *Canvas* workpad, and the visualization has a reference to an index pattern:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
$ curl -X POST s/marketing/api/spaces/_copy_saved_objects
|
||||
$ curl -X POST api/spaces/_copy_saved_objects
|
||||
{
|
||||
"objects": [{
|
||||
"type": "visualization",
|
||||
"id": "my-viz"
|
||||
"type": "dashboard",
|
||||
"id": "my-dashboard"
|
||||
}],
|
||||
"spaces": ["default"]
|
||||
"spaces": ["marketing"],
|
||||
"includeReferences": true
|
||||
}
|
||||
----
|
||||
// KIBANA
|
||||
|
@ -153,9 +415,52 @@ The API returns the following:
|
|||
[source,sh]
|
||||
----
|
||||
{
|
||||
"default": {
|
||||
"success": true,
|
||||
"successCount": 1
|
||||
"marketing": {
|
||||
"success": false,
|
||||
"successCount": 2,
|
||||
"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"
|
||||
}
|
||||
},
|
||||
]
|
||||
"successResults": [
|
||||
{
|
||||
"id": "my-dashboard",
|
||||
"type": "dashboard",
|
||||
"meta": {
|
||||
"icon": "dashboardApp",
|
||||
"title": "Look at my dashboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-canvas",
|
||||
"type": "canvas-workpad",
|
||||
"meta": {
|
||||
"icon": "canvasApp",
|
||||
"title": "Look at my canvas"
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
The result indicates an unsuccessful copy because the visualization resulted in a missing references error.
|
||||
|
||||
Objects are created when the errors are resolved using the <<spaces-api-resolve-copy-saved-objects-conflicts-example-2,Resolve copy
|
||||
conflicts API>>.
|
||||
|
|
|
@ -46,7 +46,8 @@ Execute the <<spaces-api-copy-saved-objects,copy saved objects to space API>>, w
|
|||
(Optional, boolean) When set to `true`, all saved objects related to the specified saved objects are copied into the target spaces. The `includeReferences` must be the same values used during the failed <<spaces-api-copy-saved-objects, copy saved objects to space API>> operation. The default value is `false`.
|
||||
|
||||
`retries`::
|
||||
(Required, object) The retry operations to attempt. Object keys represent the target space IDs.
|
||||
(Required, object) The retry operations to attempt, which can specify how to resolve different types of errors. Object keys represent the
|
||||
target space IDs.
|
||||
+
|
||||
.Properties of `retries`
|
||||
[%collapsible%open]
|
||||
|
@ -64,6 +65,10 @@ Execute the <<spaces-api-copy-saved-objects,copy saved objects to space API>>, w
|
|||
(Required, string) The saved object ID.
|
||||
`overwrite`::::
|
||||
(Required, boolean) When set to `true`, the saved object from the source space (desigated by the <<spaces-api-resolve-copy-saved-objects-conflicts-path-params, `space_id` path parameter>>) overwrites the conflicting object in the destination space. When set to `false`, this does nothing.
|
||||
`destinationId`::::
|
||||
(Optional, string) Specifies the destination ID that the copied object should have, if different from the current ID.
|
||||
`ignoreMissingReferences`:::
|
||||
(Optional, boolean) When set to `true`, any missing references errors are ignored. When set to `false`, does nothing.
|
||||
======
|
||||
=====
|
||||
|
||||
|
@ -86,6 +91,9 @@ Execute the <<spaces-api-copy-saved-objects,copy saved objects to space API>>, w
|
|||
`errors`:::
|
||||
(Optional, array) The errors that occurred during the copy operation. When errors are reported, the `success` flag is set to `false`.
|
||||
+
|
||||
NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and a
|
||||
`conflict` error.
|
||||
+
|
||||
|
||||
.Properties of `errors`
|
||||
[%collapsible%open]
|
||||
|
@ -104,15 +112,32 @@ Execute the <<spaces-api-copy-saved-objects,copy saved objects to space API>>, w
|
|||
[%collapsible%open]
|
||||
=======
|
||||
`type`::::
|
||||
(string) The type of error. For example, `unsupported_type`, `missing_references`, or `unknown`.
|
||||
(string) The type of error. For example, `conflict`, `ambiguous_conflict`, `missing_references`, `unsupported_type`, or `unknown`.
|
||||
`destinationId`::::
|
||||
(Optional, string) The destination ID that was used during the copy attempt. This is only present on `conflict` errors types.
|
||||
`destinations`::::
|
||||
(Optional, array) A list of possible object destinations with `id`, `title`, and `updatedAt` fields to describe each one. This is
|
||||
only present on `ambiguous_conflict` error types.
|
||||
=======
|
||||
======
|
||||
|
||||
`successResults`:::
|
||||
(Optional, array) Indicates successfully copied objects, with any applicable metadata.
|
||||
+
|
||||
NOTE: Objects are created when all resolvable errors are addressed, including conflict and missing references errors. For more information,
|
||||
refer to the <<spaces-api-resolve-copy-saved-objects-conflicts-example,examples>>.
|
||||
|
||||
=====
|
||||
|
||||
[[spaces-api-resolve-copy-saved-objects-conflicts-example]]
|
||||
==== {api-examples-title}
|
||||
|
||||
Overwrite an index pattern in the `marketing` space, and a visualization in the `sales` space:
|
||||
[[spaces-api-resolve-copy-saved-objects-conflicts-example-1]]
|
||||
===== Resolve conflict errors
|
||||
|
||||
This example builds upon the <<spaces-api-copy-saved-objects-example-3,Copy objects API example with conflict errors>>.
|
||||
|
||||
Resolve conflict errors for an index pattern, visualization, and *Canvas* workpad by overwriting the existing saved objects:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
|
@ -124,16 +149,119 @@ $ curl -X POST api/spaces/_resolve_copy_saved_objects_errors
|
|||
}],
|
||||
"includeReferences": true,
|
||||
"retries": {
|
||||
"marketing": [{
|
||||
"type": "index-pattern",
|
||||
"id": "my-pattern",
|
||||
"overwrite": true
|
||||
}],
|
||||
"sales": [{
|
||||
"type": "visualization",
|
||||
"id": "my-viz",
|
||||
"overwrite": true
|
||||
}]
|
||||
"sales": [
|
||||
{
|
||||
"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 API returns the following:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
{
|
||||
"sales": {
|
||||
"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 copy, and all four objects are created.
|
||||
|
||||
TIP: If a prior copy attempt resulted in resolvable errors, you must include a retry for each object you want to copy, including any that
|
||||
were returned in the `successResults` array. In this example, we retried copying the dashboard accordingly.
|
||||
|
||||
[[spaces-api-resolve-copy-saved-objects-conflicts-example-2]]
|
||||
===== Resolve missing reference errors
|
||||
|
||||
This example builds upon the <<spaces-api-copy-saved-objects-example-4,Copy objects API example with missing reference errors>>.
|
||||
|
||||
Resolve missing reference errors for a visualization by ignoring the error:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
$ curl -X POST api/spaces/_resolve_copy_saved_objects_errors
|
||||
{
|
||||
"objects": [{
|
||||
"type": "dashboard",
|
||||
"id": "my-dashboard"
|
||||
}],
|
||||
"includeReferences": true,
|
||||
"retries": {
|
||||
"marketing": [
|
||||
{
|
||||
"type": "visualization",
|
||||
"id": "my-vis",
|
||||
"ignoreMissingReferences": true
|
||||
},
|
||||
{
|
||||
"type": "canvas",
|
||||
"id": "my-canvas"
|
||||
},
|
||||
{
|
||||
"type": "dashboard",
|
||||
"id": "my-dashboard"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
----
|
||||
|
@ -146,11 +274,38 @@ The API returns the following:
|
|||
{
|
||||
"marketing": {
|
||||
"success": true,
|
||||
"successCount": 1
|
||||
},
|
||||
"sales": {
|
||||
"success": true,
|
||||
"successCount": 1
|
||||
"successCount": 3,
|
||||
"successResults": [
|
||||
{
|
||||
"id": "my-vis",
|
||||
"type": "visualization",
|
||||
"meta": {
|
||||
"icon": "visualizeApp",
|
||||
"title": "Look at my visualization"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "my-canvas",
|
||||
"type": "canvas-workpad",
|
||||
"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 copy and all three objects are created.
|
||||
|
||||
TIP: If a prior copy attempt resulted in resolvable errors, you must include a retry for each object you want to copy, including any that
|
||||
were returned in the `successResults` array. In this example, we retried copying the dashboard and canvas accordingly.
|
||||
|
|
|
@ -105,6 +105,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
|||
| [PluginInitializerContext](./kibana-plugin-core-public.plugininitializercontext.md) | The available core services passed to a <code>PluginInitializer</code> |
|
||||
| [SavedObject](./kibana-plugin-core-public.savedobject.md) | |
|
||||
| [SavedObjectAttributes](./kibana-plugin-core-public.savedobjectattributes.md) | The data for a Saved Object is stored as an object in the <code>attributes</code> property. |
|
||||
| [SavedObjectError](./kibana-plugin-core-public.savedobjecterror.md) | |
|
||||
| [SavedObjectReference](./kibana-plugin-core-public.savedobjectreference.md) | A reference to another saved object. |
|
||||
| [SavedObjectsBaseOptions](./kibana-plugin-core-public.savedobjectsbaseoptions.md) | |
|
||||
| [SavedObjectsBatchResponse](./kibana-plugin-core-public.savedobjectsbatchresponse.md) | |
|
||||
|
@ -115,11 +116,13 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
|||
| [SavedObjectsCreateOptions](./kibana-plugin-core-public.savedobjectscreateoptions.md) | |
|
||||
| [SavedObjectsFindOptions](./kibana-plugin-core-public.savedobjectsfindoptions.md) | |
|
||||
| [SavedObjectsFindResponsePublic](./kibana-plugin-core-public.savedobjectsfindresponsepublic.md) | Return type of the Saved Objects <code>find()</code> method.<!-- -->\*Note\*: this type is different between the Public and Server Saved Objects clients. |
|
||||
| [SavedObjectsImportAmbiguousConflictError](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.md) | Represents a failure to import due to a conflict, which can be resolved in different ways with an overwrite. |
|
||||
| [SavedObjectsImportConflictError](./kibana-plugin-core-public.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. |
|
||||
| [SavedObjectsImportError](./kibana-plugin-core-public.savedobjectsimporterror.md) | Represents a failure to import. |
|
||||
| [SavedObjectsImportMissingReferencesError](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. |
|
||||
| [SavedObjectsImportResponse](./kibana-plugin-core-public.savedobjectsimportresponse.md) | The response describing the result of an import. |
|
||||
| [SavedObjectsImportRetry](./kibana-plugin-core-public.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. |
|
||||
| [SavedObjectsImportSuccess](./kibana-plugin-core-public.savedobjectsimportsuccess.md) | Represents a successful import. |
|
||||
| [SavedObjectsImportUnknownError](./kibana-plugin-core-public.savedobjectsimportunknownerror.md) | Represents a failure to import due to an unknown reason. |
|
||||
| [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-core-public.savedobjectsimportunsupportedtypeerror.md) | Represents a failure to import due to having an unsupported saved object type. |
|
||||
| [SavedObjectsMigrationVersion](./kibana-plugin-core-public.savedobjectsmigrationversion.md) | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
|
||||
|
@ -175,6 +178,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
|||
| [SavedObjectAttribute](./kibana-plugin-core-public.savedobjectattribute.md) | Type definition for a Saved Object attribute value |
|
||||
| [SavedObjectAttributeSingle](./kibana-plugin-core-public.savedobjectattributesingle.md) | Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-core-public.savedobjectattribute.md) |
|
||||
| [SavedObjectsClientContract](./kibana-plugin-core-public.savedobjectsclientcontract.md) | SavedObjectsClientContract as implemented by the [SavedObjectsClient](./kibana-plugin-core-public.savedobjectsclient.md) |
|
||||
| [SavedObjectsNamespaceType](./kibana-plugin-core-public.savedobjectsnamespacetype.md) | The namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive: \* single (default): this type of saved object is namespace-isolated, e.g., it exists in only one namespace. \* multiple: this type of saved object is shareable, e.g., it can exist in one or more namespaces. \* agnostic: this type of saved object is global. |
|
||||
| [StartServicesAccessor](./kibana-plugin-core-public.startservicesaccessor.md) | Allows plugins to get access to APIs available in start inside async handlers, such as [App.mount](./kibana-plugin-core-public.app.mount.md)<!-- -->. Promise will not resolve until Core and plugin dependencies have completed <code>start</code>. |
|
||||
| [StringValidation](./kibana-plugin-core-public.stringvalidation.md) | Allows regex objects or a regex string |
|
||||
| [Toast](./kibana-plugin-core-public.toast.md) | |
|
||||
|
|
|
@ -7,8 +7,5 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
error?: {
|
||||
message: string;
|
||||
statusCode: number;
|
||||
};
|
||||
error?: SavedObjectError;
|
||||
```
|
||||
|
|
|
@ -15,10 +15,11 @@ export interface SavedObject<T = unknown>
|
|||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [attributes](./kibana-plugin-core-public.savedobject.attributes.md) | <code>T</code> | The data for a Saved Object is stored as an object in the <code>attributes</code> property. |
|
||||
| [error](./kibana-plugin-core-public.savedobject.error.md) | <code>{</code><br/><code> message: string;</code><br/><code> statusCode: number;</code><br/><code> }</code> | |
|
||||
| [error](./kibana-plugin-core-public.savedobject.error.md) | <code>SavedObjectError</code> | |
|
||||
| [id](./kibana-plugin-core-public.savedobject.id.md) | <code>string</code> | The ID of this Saved Object, guaranteed to be unique for all objects of the same <code>type</code> |
|
||||
| [migrationVersion](./kibana-plugin-core-public.savedobject.migrationversion.md) | <code>SavedObjectsMigrationVersion</code> | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
|
||||
| [namespaces](./kibana-plugin-core-public.savedobject.namespaces.md) | <code>string[]</code> | Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types. |
|
||||
| [originId](./kibana-plugin-core-public.savedobject.originid.md) | <code>string</code> | The ID of the saved object this originated from. This is set if this object's <code>id</code> was regenerated; that can happen during migration from a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import to ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given space. |
|
||||
| [references](./kibana-plugin-core-public.savedobject.references.md) | <code>SavedObjectReference[]</code> | A reference to another saved object. |
|
||||
| [type](./kibana-plugin-core-public.savedobject.type.md) | <code>string</code> | The type of Saved Object. Each plugin can define it's own custom Saved Object types. |
|
||||
| [updated\_at](./kibana-plugin-core-public.savedobject.updated_at.md) | <code>string</code> | Timestamp of the last time this document had been updated. |
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObject](./kibana-plugin-core-public.savedobject.md) > [originId](./kibana-plugin-core-public.savedobject.originid.md)
|
||||
|
||||
## SavedObject.originId property
|
||||
|
||||
The ID of the saved object this originated from. This is set if this object's `id` was regenerated; that can happen during migration from a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import to ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given space.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
originId?: string;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectError](./kibana-plugin-core-public.savedobjecterror.md) > [error](./kibana-plugin-core-public.savedobjecterror.error.md)
|
||||
|
||||
## SavedObjectError.error property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
error: string;
|
||||
```
|
|
@ -0,0 +1,21 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectError](./kibana-plugin-core-public.savedobjecterror.md)
|
||||
|
||||
## SavedObjectError interface
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface SavedObjectError
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [error](./kibana-plugin-core-public.savedobjecterror.error.md) | <code>string</code> | |
|
||||
| [message](./kibana-plugin-core-public.savedobjecterror.message.md) | <code>string</code> | |
|
||||
| [metadata](./kibana-plugin-core-public.savedobjecterror.metadata.md) | <code>Record<string, unknown></code> | |
|
||||
| [statusCode](./kibana-plugin-core-public.savedobjecterror.statuscode.md) | <code>number</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectError](./kibana-plugin-core-public.savedobjecterror.md) > [message](./kibana-plugin-core-public.savedobjecterror.message.md)
|
||||
|
||||
## SavedObjectError.message property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
message: string;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectError](./kibana-plugin-core-public.savedobjecterror.md) > [metadata](./kibana-plugin-core-public.savedobjecterror.metadata.md)
|
||||
|
||||
## SavedObjectError.metadata property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
metadata?: Record<string, unknown>;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectError](./kibana-plugin-core-public.savedobjecterror.md) > [statusCode](./kibana-plugin-core-public.savedobjecterror.statuscode.md)
|
||||
|
||||
## SavedObjectError.statusCode property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
statusCode: number;
|
||||
```
|
|
@ -23,6 +23,7 @@ export interface SavedObjectsFindOptions
|
|||
| [page](./kibana-plugin-core-public.savedobjectsfindoptions.page.md) | <code>number</code> | |
|
||||
| [perPage](./kibana-plugin-core-public.savedobjectsfindoptions.perpage.md) | <code>number</code> | |
|
||||
| [preference](./kibana-plugin-core-public.savedobjectsfindoptions.preference.md) | <code>string</code> | An optional ES preference value to be used for the query \* |
|
||||
| [rootSearchFields](./kibana-plugin-core-public.savedobjectsfindoptions.rootsearchfields.md) | <code>string[]</code> | The fields to perform the parsed query against. Unlike the <code>searchFields</code> argument, these are expected to be root fields and will not be modified. If used in conjunction with <code>searchFields</code>, both are concatenated together. |
|
||||
| [search](./kibana-plugin-core-public.savedobjectsfindoptions.search.md) | <code>string</code> | Search documents using the Elasticsearch Simple Query String syntax. See Elasticsearch Simple Query String <code>query</code> argument for more information |
|
||||
| [searchFields](./kibana-plugin-core-public.savedobjectsfindoptions.searchfields.md) | <code>string[]</code> | The fields to perform the parsed query against. See Elasticsearch Simple Query String <code>fields</code> argument for more information |
|
||||
| [sortField](./kibana-plugin-core-public.savedobjectsfindoptions.sortfield.md) | <code>string</code> | |
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsFindOptions](./kibana-plugin-core-public.savedobjectsfindoptions.md) > [rootSearchFields](./kibana-plugin-core-public.savedobjectsfindoptions.rootsearchfields.md)
|
||||
|
||||
## SavedObjectsFindOptions.rootSearchFields property
|
||||
|
||||
The fields to perform the parsed query against. Unlike the `searchFields` argument, these are expected to be root fields and will not be modified. If used in conjunction with `searchFields`<!-- -->, both are concatenated together.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
rootSearchFields?: string[];
|
||||
```
|
|
@ -0,0 +1,15 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportAmbiguousConflictError](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.md) > [destinations](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.destinations.md)
|
||||
|
||||
## SavedObjectsImportAmbiguousConflictError.destinations property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
destinations: Array<{
|
||||
id: string;
|
||||
title?: string;
|
||||
updatedAt?: string;
|
||||
}>;
|
||||
```
|
|
@ -0,0 +1,21 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportAmbiguousConflictError](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.md)
|
||||
|
||||
## SavedObjectsImportAmbiguousConflictError interface
|
||||
|
||||
Represents a failure to import due to a conflict, which can be resolved in different ways with an overwrite.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface SavedObjectsImportAmbiguousConflictError
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [destinations](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.destinations.md) | <code>Array<{</code><br/><code> id: string;</code><br/><code> title?: string;</code><br/><code> updatedAt?: string;</code><br/><code> }></code> | |
|
||||
| [type](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.type.md) | <code>'ambiguous_conflict'</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportAmbiguousConflictError](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.md) > [type](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.type.md)
|
||||
|
||||
## SavedObjectsImportAmbiguousConflictError.type property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
type: 'ambiguous_conflict';
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportConflictError](./kibana-plugin-core-public.savedobjectsimportconflicterror.md) > [destinationId](./kibana-plugin-core-public.savedobjectsimportconflicterror.destinationid.md)
|
||||
|
||||
## SavedObjectsImportConflictError.destinationId property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
destinationId?: string;
|
||||
```
|
|
@ -16,5 +16,6 @@ export interface SavedObjectsImportConflictError
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [destinationId](./kibana-plugin-core-public.savedobjectsimportconflicterror.destinationid.md) | <code>string</code> | |
|
||||
| [type](./kibana-plugin-core-public.savedobjectsimportconflicterror.type.md) | <code>'conflict'</code> | |
|
||||
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
error: SavedObjectsImportConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError;
|
||||
error: SavedObjectsImportConflictError | SavedObjectsImportAmbiguousConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError;
|
||||
```
|
||||
|
|
|
@ -16,8 +16,10 @@ export interface SavedObjectsImportError
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [error](./kibana-plugin-core-public.savedobjectsimporterror.error.md) | <code>SavedObjectsImportConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError</code> | |
|
||||
| [error](./kibana-plugin-core-public.savedobjectsimporterror.error.md) | <code>SavedObjectsImportConflictError | SavedObjectsImportAmbiguousConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError</code> | |
|
||||
| [id](./kibana-plugin-core-public.savedobjectsimporterror.id.md) | <code>string</code> | |
|
||||
| [meta](./kibana-plugin-core-public.savedobjectsimporterror.meta.md) | <code>{</code><br/><code> title?: string;</code><br/><code> icon?: string;</code><br/><code> }</code> | |
|
||||
| [overwrite](./kibana-plugin-core-public.savedobjectsimporterror.overwrite.md) | <code>boolean</code> | If <code>overwrite</code> is specified, an attempt was made to overwrite an existing object. |
|
||||
| [title](./kibana-plugin-core-public.savedobjectsimporterror.title.md) | <code>string</code> | |
|
||||
| [type](./kibana-plugin-core-public.savedobjectsimporterror.type.md) | <code>string</code> | |
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportError](./kibana-plugin-core-public.savedobjectsimporterror.md) > [meta](./kibana-plugin-core-public.savedobjectsimporterror.meta.md)
|
||||
|
||||
## SavedObjectsImportError.meta property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
meta: {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportError](./kibana-plugin-core-public.savedobjectsimporterror.md) > [overwrite](./kibana-plugin-core-public.savedobjectsimporterror.overwrite.md)
|
||||
|
||||
## SavedObjectsImportError.overwrite property
|
||||
|
||||
If `overwrite` is specified, an attempt was made to overwrite an existing object.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
overwrite?: boolean;
|
||||
```
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
## SavedObjectsImportError.title property
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use `meta.title` instead
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportMissingReferencesError](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.md) > [blocking](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.blocking.md)
|
||||
|
||||
## SavedObjectsImportMissingReferencesError.blocking property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
blocking: Array<{
|
||||
type: string;
|
||||
id: string;
|
||||
}>;
|
||||
```
|
|
@ -16,7 +16,6 @@ export interface SavedObjectsImportMissingReferencesError
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [blocking](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.blocking.md) | <code>Array<{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }></code> | |
|
||||
| [references](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.references.md) | <code>Array<{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }></code> | |
|
||||
| [type](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.type.md) | <code>'missing_references'</code> | |
|
||||
|
||||
|
|
|
@ -19,4 +19,5 @@ export interface SavedObjectsImportResponse
|
|||
| [errors](./kibana-plugin-core-public.savedobjectsimportresponse.errors.md) | <code>SavedObjectsImportError[]</code> | |
|
||||
| [success](./kibana-plugin-core-public.savedobjectsimportresponse.success.md) | <code>boolean</code> | |
|
||||
| [successCount](./kibana-plugin-core-public.savedobjectsimportresponse.successcount.md) | <code>number</code> | |
|
||||
| [successResults](./kibana-plugin-core-public.savedobjectsimportresponse.successresults.md) | <code>SavedObjectsImportSuccess[]</code> | |
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportResponse](./kibana-plugin-core-public.savedobjectsimportresponse.md) > [successResults](./kibana-plugin-core-public.savedobjectsimportresponse.successresults.md)
|
||||
|
||||
## SavedObjectsImportResponse.successResults property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
successResults?: SavedObjectsImportSuccess[];
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportRetry](./kibana-plugin-core-public.savedobjectsimportretry.md) > [createNewCopy](./kibana-plugin-core-public.savedobjectsimportretry.createnewcopy.md)
|
||||
|
||||
## SavedObjectsImportRetry.createNewCopy property
|
||||
|
||||
If `createNewCopy` is specified, the new object has a new (undefined) origin ID. This is only needed for the case where `createNewCopies` mode is disabled and ambiguous source conflicts are detected.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
createNewCopy?: boolean;
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportRetry](./kibana-plugin-core-public.savedobjectsimportretry.md) > [destinationId](./kibana-plugin-core-public.savedobjectsimportretry.destinationid.md)
|
||||
|
||||
## SavedObjectsImportRetry.destinationId property
|
||||
|
||||
The object ID that will be created or overwritten. If not specified, the `id` field will be used.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
destinationId?: string;
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportRetry](./kibana-plugin-core-public.savedobjectsimportretry.md) > [ignoreMissingReferences](./kibana-plugin-core-public.savedobjectsimportretry.ignoremissingreferences.md)
|
||||
|
||||
## SavedObjectsImportRetry.ignoreMissingReferences property
|
||||
|
||||
If `ignoreMissingReferences` is specified, reference validation will be skipped for this object.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
ignoreMissingReferences?: boolean;
|
||||
```
|
|
@ -16,7 +16,10 @@ export interface SavedObjectsImportRetry
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [createNewCopy](./kibana-plugin-core-public.savedobjectsimportretry.createnewcopy.md) | <code>boolean</code> | If <code>createNewCopy</code> is specified, the new object has a new (undefined) origin ID. This is only needed for the case where <code>createNewCopies</code> mode is disabled and ambiguous source conflicts are detected. |
|
||||
| [destinationId](./kibana-plugin-core-public.savedobjectsimportretry.destinationid.md) | <code>string</code> | The object ID that will be created or overwritten. If not specified, the <code>id</code> field will be used. |
|
||||
| [id](./kibana-plugin-core-public.savedobjectsimportretry.id.md) | <code>string</code> | |
|
||||
| [ignoreMissingReferences](./kibana-plugin-core-public.savedobjectsimportretry.ignoremissingreferences.md) | <code>boolean</code> | If <code>ignoreMissingReferences</code> is specified, reference validation will be skipped for this object. |
|
||||
| [overwrite](./kibana-plugin-core-public.savedobjectsimportretry.overwrite.md) | <code>boolean</code> | |
|
||||
| [replaceReferences](./kibana-plugin-core-public.savedobjectsimportretry.replacereferences.md) | <code>Array<{</code><br/><code> type: string;</code><br/><code> from: string;</code><br/><code> to: string;</code><br/><code> }></code> | |
|
||||
| [type](./kibana-plugin-core-public.savedobjectsimportretry.type.md) | <code>string</code> | |
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-public.savedobjectsimportsuccess.md) > [createNewCopy](./kibana-plugin-core-public.savedobjectsimportsuccess.createnewcopy.md)
|
||||
|
||||
## SavedObjectsImportSuccess.createNewCopy property
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> If `createNewCopy` is specified, the new object has a new (undefined) origin ID. This is only needed for the case where `createNewCopies` mode is disabled and ambiguous source conflicts are detected. When `createNewCopies` mode is permanently enabled, this field will be redundant and can be removed.
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
createNewCopy?: boolean;
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-public.savedobjectsimportsuccess.md) > [destinationId](./kibana-plugin-core-public.savedobjectsimportsuccess.destinationid.md)
|
||||
|
||||
## SavedObjectsImportSuccess.destinationId property
|
||||
|
||||
If `destinationId` is specified, the new object has a new ID that is different from the import ID.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
destinationId?: string;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-public.savedobjectsimportsuccess.md) > [id](./kibana-plugin-core-public.savedobjectsimportsuccess.id.md)
|
||||
|
||||
## SavedObjectsImportSuccess.id property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
id: string;
|
||||
```
|
|
@ -0,0 +1,25 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-public.savedobjectsimportsuccess.md)
|
||||
|
||||
## SavedObjectsImportSuccess interface
|
||||
|
||||
Represents a successful import.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface SavedObjectsImportSuccess
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [createNewCopy](./kibana-plugin-core-public.savedobjectsimportsuccess.createnewcopy.md) | <code>boolean</code> | |
|
||||
| [destinationId](./kibana-plugin-core-public.savedobjectsimportsuccess.destinationid.md) | <code>string</code> | If <code>destinationId</code> is specified, the new object has a new ID that is different from the import ID. |
|
||||
| [id](./kibana-plugin-core-public.savedobjectsimportsuccess.id.md) | <code>string</code> | |
|
||||
| [meta](./kibana-plugin-core-public.savedobjectsimportsuccess.meta.md) | <code>{</code><br/><code> title?: string;</code><br/><code> icon?: string;</code><br/><code> }</code> | |
|
||||
| [overwrite](./kibana-plugin-core-public.savedobjectsimportsuccess.overwrite.md) | <code>boolean</code> | If <code>overwrite</code> is specified, this object overwrote an existing one (or will do so, in the case of a pending resolution). |
|
||||
| [type](./kibana-plugin-core-public.savedobjectsimportsuccess.type.md) | <code>string</code> | |
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-public.savedobjectsimportsuccess.md) > [meta](./kibana-plugin-core-public.savedobjectsimportsuccess.meta.md)
|
||||
|
||||
## SavedObjectsImportSuccess.meta property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
meta: {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-public.savedobjectsimportsuccess.md) > [overwrite](./kibana-plugin-core-public.savedobjectsimportsuccess.overwrite.md)
|
||||
|
||||
## SavedObjectsImportSuccess.overwrite property
|
||||
|
||||
If `overwrite` is specified, this object overwrote an existing one (or will do so, in the case of a pending resolution).
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
overwrite?: boolean;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-public.savedobjectsimportsuccess.md) > [type](./kibana-plugin-core-public.savedobjectsimportsuccess.type.md)
|
||||
|
||||
## SavedObjectsImportSuccess.type property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
type: string;
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsNamespaceType](./kibana-plugin-core-public.savedobjectsnamespacetype.md)
|
||||
|
||||
## SavedObjectsNamespaceType type
|
||||
|
||||
The namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive: \* single (default): this type of saved object is namespace-isolated, e.g., it exists in only one namespace. \* multiple: this type of saved object is shareable, e.g., it can exist in one or more namespaces. \* agnostic: this type of saved object is global.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type SavedObjectsNamespaceType = 'single' | 'multiple' | 'agnostic';
|
||||
```
|
|
@ -9,14 +9,14 @@ Import saved objects from given stream. See the [options](./kibana-plugin-core-s
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare function importSavedObjectsFromStream({ readStream, objectLimit, overwrite, savedObjectsClient, supportedTypes, namespace, }: SavedObjectsImportOptions): Promise<SavedObjectsImportResponse>;
|
||||
export declare function importSavedObjectsFromStream({ readStream, objectLimit, overwrite, createNewCopies, savedObjectsClient, typeRegistry, namespace, }: SavedObjectsImportOptions): Promise<SavedObjectsImportResponse>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| { readStream, objectLimit, overwrite, savedObjectsClient, supportedTypes, namespace, } | <code>SavedObjectsImportOptions</code> | |
|
||||
| { readStream, objectLimit, overwrite, createNewCopies, savedObjectsClient, typeRegistry, namespace, } | <code>SavedObjectsImportOptions</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
|
|
@ -45,10 +45,10 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
|||
| [deepFreeze(object)](./kibana-plugin-core-server.deepfreeze.md) | Apply Object.freeze to a value recursively and convert the return type to Readonly variant recursively |
|
||||
| [exportSavedObjectsToStream({ types, objects, search, savedObjectsClient, exportSizeLimit, includeReferencesDeep, excludeExportDetails, namespace, })](./kibana-plugin-core-server.exportsavedobjectstostream.md) | Generates sorted saved object stream to be used for export. See the [options](./kibana-plugin-core-server.savedobjectsexportoptions.md) for more detailed information. |
|
||||
| [getFlattenedObject(rootValue)](./kibana-plugin-core-server.getflattenedobject.md) | Flattens a deeply nested object to a map of dot-separated paths pointing to all primitive values \*\*and arrays\*\* from <code>rootValue</code>.<!-- -->example: getFlattenedObject(<!-- -->{ a: { b: 1, c: \[2,3\] } }<!-- -->) // =<!-- -->> { 'a.b': 1, 'a.c': \[2,3\] } |
|
||||
| [importSavedObjectsFromStream({ readStream, objectLimit, overwrite, savedObjectsClient, supportedTypes, namespace, })](./kibana-plugin-core-server.importsavedobjectsfromstream.md) | Import saved objects from given stream. See the [options](./kibana-plugin-core-server.savedobjectsimportoptions.md) for more detailed information. |
|
||||
| [importSavedObjectsFromStream({ readStream, objectLimit, overwrite, createNewCopies, savedObjectsClient, typeRegistry, namespace, })](./kibana-plugin-core-server.importsavedobjectsfromstream.md) | Import saved objects from given stream. See the [options](./kibana-plugin-core-server.savedobjectsimportoptions.md) for more detailed information. |
|
||||
| [isRelativeUrl(candidatePath)](./kibana-plugin-core-server.isrelativeurl.md) | Determine if a url is relative. Any url including a protocol, hostname, or port is not considered relative. This means that absolute \*paths\* are considered to be relative \*urls\* |
|
||||
| [modifyUrl(url, urlModifier)](./kibana-plugin-core-server.modifyurl.md) | Takes a URL and a function that takes the meaningful parts of the URL as a key-value object, modifies some or all of the parts, and returns the modified parts formatted again as a url.<!-- -->Url Parts sent: - protocol - slashes (does the url have the //) - auth - hostname (just the name of the host, no port or auth information) - port - pathname (the path after the hostname, no query or hash, starts with a slash if there was a path) - query (always an object, even when no query on original url) - hash<!-- -->Why? - The default url library in node produces several conflicting properties on the "parsed" output. Modifying any of these might lead to the modifications being ignored (depending on which property was modified) - It's not always clear whether to use path/pathname, host/hostname, so this tries to add helpful constraints |
|
||||
| [resolveSavedObjectsImportErrors({ readStream, objectLimit, retries, savedObjectsClient, supportedTypes, namespace, })](./kibana-plugin-core-server.resolvesavedobjectsimporterrors.md) | Resolve and return saved object import errors. See the [options](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.md) for more detailed informations. |
|
||||
| [resolveSavedObjectsImportErrors({ readStream, objectLimit, retries, savedObjectsClient, typeRegistry, namespace, createNewCopies, })](./kibana-plugin-core-server.resolvesavedobjectsimporterrors.md) | Resolve and return saved object import errors. See the [options](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.md) for more detailed informations. |
|
||||
|
||||
## Interfaces
|
||||
|
||||
|
@ -161,6 +161,8 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
|||
| [SavedObjectsBulkUpdateObject](./kibana-plugin-core-server.savedobjectsbulkupdateobject.md) | |
|
||||
| [SavedObjectsBulkUpdateOptions](./kibana-plugin-core-server.savedobjectsbulkupdateoptions.md) | |
|
||||
| [SavedObjectsBulkUpdateResponse](./kibana-plugin-core-server.savedobjectsbulkupdateresponse.md) | |
|
||||
| [SavedObjectsCheckConflictsObject](./kibana-plugin-core-server.savedobjectscheckconflictsobject.md) | |
|
||||
| [SavedObjectsCheckConflictsResponse](./kibana-plugin-core-server.savedobjectscheckconflictsresponse.md) | |
|
||||
| [SavedObjectsClientProviderOptions](./kibana-plugin-core-server.savedobjectsclientprovideroptions.md) | Options to control the creation of the Saved Objects Client. |
|
||||
| [SavedObjectsClientWrapperOptions](./kibana-plugin-core-server.savedobjectsclientwrapperoptions.md) | Options passed to each SavedObjectsClientWrapperFactory to aid in creating the wrapper instance. |
|
||||
| [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. |
|
||||
|
@ -175,12 +177,14 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
|||
| [SavedObjectsFindOptions](./kibana-plugin-core-server.savedobjectsfindoptions.md) | |
|
||||
| [SavedObjectsFindResponse](./kibana-plugin-core-server.savedobjectsfindresponse.md) | Return type of the Saved Objects <code>find()</code> method.<!-- -->\*Note\*: this type is different between the Public and Server Saved Objects clients. |
|
||||
| [SavedObjectsFindResult](./kibana-plugin-core-server.savedobjectsfindresult.md) | |
|
||||
| [SavedObjectsImportAmbiguousConflictError](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.md) | Represents a failure to import due to a conflict, which can be resolved in different ways with an overwrite. |
|
||||
| [SavedObjectsImportConflictError](./kibana-plugin-core-server.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. |
|
||||
| [SavedObjectsImportError](./kibana-plugin-core-server.savedobjectsimporterror.md) | Represents a failure to import. |
|
||||
| [SavedObjectsImportMissingReferencesError](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. |
|
||||
| [SavedObjectsImportOptions](./kibana-plugin-core-server.savedobjectsimportoptions.md) | Options to control the import operation. |
|
||||
| [SavedObjectsImportResponse](./kibana-plugin-core-server.savedobjectsimportresponse.md) | The response describing the result of an import. |
|
||||
| [SavedObjectsImportRetry](./kibana-plugin-core-server.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. |
|
||||
| [SavedObjectsImportSuccess](./kibana-plugin-core-server.savedobjectsimportsuccess.md) | Represents a successful import. |
|
||||
| [SavedObjectsImportUnknownError](./kibana-plugin-core-server.savedobjectsimportunknownerror.md) | Represents a failure to import due to an unknown reason. |
|
||||
| [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-core-server.savedobjectsimportunsupportedtypeerror.md) | Represents a failure to import due to having an unsupported saved object type. |
|
||||
| [SavedObjectsIncrementCounterOptions](./kibana-plugin-core-server.savedobjectsincrementcounteroptions.md) | |
|
||||
|
@ -301,7 +305,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
|
|||
| [SavedObjectsClientFactoryProvider](./kibana-plugin-core-server.savedobjectsclientfactoryprovider.md) | Provider to invoke to retrieve a [SavedObjectsClientFactory](./kibana-plugin-core-server.savedobjectsclientfactory.md)<!-- -->. |
|
||||
| [SavedObjectsClientWrapperFactory](./kibana-plugin-core-server.savedobjectsclientwrapperfactory.md) | Describes the factory used to create instances of Saved Objects Client Wrappers. |
|
||||
| [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) | Describe a [saved object type mapping](./kibana-plugin-core-server.savedobjectstypemappingdefinition.md) field.<!-- -->Please refer to [elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html) For the mapping documentation |
|
||||
| [SavedObjectsNamespaceType](./kibana-plugin-core-server.savedobjectsnamespacetype.md) | The namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive: \* single (default): this type of saved object is namespace-isolated, e.g., it exists in only one namespace. \* multiple: this type of saved object is shareable, e.g., it can exist in one or more namespaces. \* agnostic: this type of saved object is global.<!-- -->Note: do not write logic that uses this value directly; instead, use the appropriate accessors in the [type registry](./kibana-plugin-core-server.savedobjecttyperegistry.md)<!-- -->. |
|
||||
| [SavedObjectsNamespaceType](./kibana-plugin-core-server.savedobjectsnamespacetype.md) | The namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive: \* single (default): this type of saved object is namespace-isolated, e.g., it exists in only one namespace. \* multiple: this type of saved object is shareable, e.g., it can exist in one or more namespaces. \* agnostic: this type of saved object is global. |
|
||||
| [SavedObjectUnsanitizedDoc](./kibana-plugin-core-server.savedobjectunsanitizeddoc.md) | Describes Saved Object documents from Kibana < 7.0.0 which don't have a <code>references</code> root property defined. This type should only be used in migrations. |
|
||||
| [ScopeableRequest](./kibana-plugin-core-server.scopeablerequest.md) | A user credentials container. It accommodates the necessary auth credentials to impersonate the current user.<!-- -->See [KibanaRequest](./kibana-plugin-core-server.kibanarequest.md)<!-- -->. |
|
||||
| [ServiceStatusLevel](./kibana-plugin-core-server.servicestatuslevel.md) | A convenience type that represents the union of each value in [ServiceStatusLevels](./kibana-plugin-core-server.servicestatuslevels.md)<!-- -->. |
|
||||
|
|
|
@ -9,14 +9,14 @@ Resolve and return saved object import errors. See the [options](./kibana-plugin
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare function resolveSavedObjectsImportErrors({ readStream, objectLimit, retries, savedObjectsClient, supportedTypes, namespace, }: SavedObjectsResolveImportErrorsOptions): Promise<SavedObjectsImportResponse>;
|
||||
export declare function resolveSavedObjectsImportErrors({ readStream, objectLimit, retries, savedObjectsClient, typeRegistry, namespace, createNewCopies, }: SavedObjectsResolveImportErrorsOptions): Promise<SavedObjectsImportResponse>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| { readStream, objectLimit, retries, savedObjectsClient, supportedTypes, namespace, } | <code>SavedObjectsResolveImportErrorsOptions</code> | |
|
||||
| { readStream, objectLimit, retries, savedObjectsClient, typeRegistry, namespace, createNewCopies, } | <code>SavedObjectsResolveImportErrorsOptions</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
|
|
@ -7,8 +7,5 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
error?: {
|
||||
message: string;
|
||||
statusCode: number;
|
||||
};
|
||||
error?: SavedObjectError;
|
||||
```
|
||||
|
|
|
@ -15,10 +15,11 @@ export interface SavedObject<T = unknown>
|
|||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [attributes](./kibana-plugin-core-server.savedobject.attributes.md) | <code>T</code> | The data for a Saved Object is stored as an object in the <code>attributes</code> property. |
|
||||
| [error](./kibana-plugin-core-server.savedobject.error.md) | <code>{</code><br/><code> message: string;</code><br/><code> statusCode: number;</code><br/><code> }</code> | |
|
||||
| [error](./kibana-plugin-core-server.savedobject.error.md) | <code>SavedObjectError</code> | |
|
||||
| [id](./kibana-plugin-core-server.savedobject.id.md) | <code>string</code> | The ID of this Saved Object, guaranteed to be unique for all objects of the same <code>type</code> |
|
||||
| [migrationVersion](./kibana-plugin-core-server.savedobject.migrationversion.md) | <code>SavedObjectsMigrationVersion</code> | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
|
||||
| [namespaces](./kibana-plugin-core-server.savedobject.namespaces.md) | <code>string[]</code> | Namespace(s) that this saved object exists in. This attribute is only used for multi-namespace saved object types. |
|
||||
| [originId](./kibana-plugin-core-server.savedobject.originid.md) | <code>string</code> | The ID of the saved object this originated from. This is set if this object's <code>id</code> was regenerated; that can happen during migration from a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import to ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given space. |
|
||||
| [references](./kibana-plugin-core-server.savedobject.references.md) | <code>SavedObjectReference[]</code> | A reference to another saved object. |
|
||||
| [type](./kibana-plugin-core-server.savedobject.type.md) | <code>string</code> | The type of Saved Object. Each plugin can define it's own custom Saved Object types. |
|
||||
| [updated\_at](./kibana-plugin-core-server.savedobject.updated_at.md) | <code>string</code> | Timestamp of the last time this document had been updated. |
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObject](./kibana-plugin-core-server.savedobject.md) > [originId](./kibana-plugin-core-server.savedobject.originid.md)
|
||||
|
||||
## SavedObject.originId property
|
||||
|
||||
The ID of the saved object this originated from. This is set if this object's `id` was regenerated; that can happen during migration from a legacy single-namespace type, or during import. It is only set during migration or create operations. This is used during import to ensure that ID regeneration is deterministic, so saved objects will be overwritten if they are imported multiple times into a given space.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
originId?: string;
|
||||
```
|
|
@ -18,6 +18,7 @@ export interface SavedObjectsBulkCreateObject<T = unknown>
|
|||
| [attributes](./kibana-plugin-core-server.savedobjectsbulkcreateobject.attributes.md) | <code>T</code> | |
|
||||
| [id](./kibana-plugin-core-server.savedobjectsbulkcreateobject.id.md) | <code>string</code> | |
|
||||
| [migrationVersion](./kibana-plugin-core-server.savedobjectsbulkcreateobject.migrationversion.md) | <code>SavedObjectsMigrationVersion</code> | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
|
||||
| [originId](./kibana-plugin-core-server.savedobjectsbulkcreateobject.originid.md) | <code>string</code> | Optional ID of the original saved object, if this object's <code>id</code> was regenerated |
|
||||
| [references](./kibana-plugin-core-server.savedobjectsbulkcreateobject.references.md) | <code>SavedObjectReference[]</code> | |
|
||||
| [type](./kibana-plugin-core-server.savedobjectsbulkcreateobject.type.md) | <code>string</code> | |
|
||||
| [version](./kibana-plugin-core-server.savedobjectsbulkcreateobject.version.md) | <code>string</code> | |
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsBulkCreateObject](./kibana-plugin-core-server.savedobjectsbulkcreateobject.md) > [originId](./kibana-plugin-core-server.savedobjectsbulkcreateobject.originid.md)
|
||||
|
||||
## SavedObjectsBulkCreateObject.originId property
|
||||
|
||||
Optional ID of the original saved object, if this object's `id` was regenerated
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
originId?: string;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCheckConflictsObject](./kibana-plugin-core-server.savedobjectscheckconflictsobject.md) > [id](./kibana-plugin-core-server.savedobjectscheckconflictsobject.id.md)
|
||||
|
||||
## SavedObjectsCheckConflictsObject.id property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
id: string;
|
||||
```
|
|
@ -0,0 +1,20 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCheckConflictsObject](./kibana-plugin-core-server.savedobjectscheckconflictsobject.md)
|
||||
|
||||
## SavedObjectsCheckConflictsObject interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface SavedObjectsCheckConflictsObject
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [id](./kibana-plugin-core-server.savedobjectscheckconflictsobject.id.md) | <code>string</code> | |
|
||||
| [type](./kibana-plugin-core-server.savedobjectscheckconflictsobject.type.md) | <code>string</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCheckConflictsObject](./kibana-plugin-core-server.savedobjectscheckconflictsobject.md) > [type](./kibana-plugin-core-server.savedobjectscheckconflictsobject.type.md)
|
||||
|
||||
## SavedObjectsCheckConflictsObject.type property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
type: string;
|
||||
```
|
|
@ -0,0 +1,15 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCheckConflictsResponse](./kibana-plugin-core-server.savedobjectscheckconflictsresponse.md) > [errors](./kibana-plugin-core-server.savedobjectscheckconflictsresponse.errors.md)
|
||||
|
||||
## SavedObjectsCheckConflictsResponse.errors property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
errors: Array<{
|
||||
id: string;
|
||||
type: string;
|
||||
error: SavedObjectError;
|
||||
}>;
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCheckConflictsResponse](./kibana-plugin-core-server.savedobjectscheckconflictsresponse.md)
|
||||
|
||||
## SavedObjectsCheckConflictsResponse interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface SavedObjectsCheckConflictsResponse
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [errors](./kibana-plugin-core-server.savedobjectscheckconflictsresponse.errors.md) | <code>Array<{</code><br/><code> id: string;</code><br/><code> type: string;</code><br/><code> error: SavedObjectError;</code><br/><code> }></code> | |
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsClient](./kibana-plugin-core-server.savedobjectsclient.md) > [checkConflicts](./kibana-plugin-core-server.savedobjectsclient.checkconflicts.md)
|
||||
|
||||
## SavedObjectsClient.checkConflicts() method
|
||||
|
||||
Check what conflicts will result when creating a given array of saved objects. This includes "unresolvable conflicts", which are multi-namespace objects that exist in a different namespace; such conflicts cannot be resolved/overwritten.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
checkConflicts(objects?: SavedObjectsCheckConflictsObject[], options?: SavedObjectsBaseOptions): Promise<SavedObjectsCheckConflictsResponse>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| objects | <code>SavedObjectsCheckConflictsObject[]</code> | |
|
||||
| options | <code>SavedObjectsBaseOptions</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<SavedObjectsCheckConflictsResponse>`
|
||||
|
|
@ -29,6 +29,7 @@ The constructor for this class is marked as internal. Third-party code should no
|
|||
| [bulkCreate(objects, options)](./kibana-plugin-core-server.savedobjectsclient.bulkcreate.md) | | Persists multiple documents batched together as a single request |
|
||||
| [bulkGet(objects, options)](./kibana-plugin-core-server.savedobjectsclient.bulkget.md) | | Returns an array of objects by id |
|
||||
| [bulkUpdate(objects, options)](./kibana-plugin-core-server.savedobjectsclient.bulkupdate.md) | | Bulk Updates multiple SavedObject at once |
|
||||
| [checkConflicts(objects, options)](./kibana-plugin-core-server.savedobjectsclient.checkconflicts.md) | | Check what conflicts will result when creating a given array of saved objects. This includes "unresolvable conflicts", which are multi-namespace objects that exist in a different namespace; such conflicts cannot be resolved/overwritten. |
|
||||
| [create(type, attributes, options)](./kibana-plugin-core-server.savedobjectsclient.create.md) | | Persists a SavedObject |
|
||||
| [delete(type, id, options)](./kibana-plugin-core-server.savedobjectsclient.delete.md) | | Deletes a SavedObject |
|
||||
| [deleteFromNamespaces(type, id, namespaces, options)](./kibana-plugin-core-server.savedobjectsclient.deletefromnamespaces.md) | | Removes namespaces from a SavedObject |
|
||||
|
|
|
@ -17,6 +17,7 @@ export interface SavedObjectsCreateOptions extends SavedObjectsBaseOptions
|
|||
| --- | --- | --- |
|
||||
| [id](./kibana-plugin-core-server.savedobjectscreateoptions.id.md) | <code>string</code> | (not recommended) Specify an id for the document |
|
||||
| [migrationVersion](./kibana-plugin-core-server.savedobjectscreateoptions.migrationversion.md) | <code>SavedObjectsMigrationVersion</code> | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
|
||||
| [originId](./kibana-plugin-core-server.savedobjectscreateoptions.originid.md) | <code>string</code> | Optional ID of the original saved object, if this object's <code>id</code> was regenerated |
|
||||
| [overwrite](./kibana-plugin-core-server.savedobjectscreateoptions.overwrite.md) | <code>boolean</code> | Overwrite existing documents (defaults to false) |
|
||||
| [references](./kibana-plugin-core-server.savedobjectscreateoptions.references.md) | <code>SavedObjectReference[]</code> | |
|
||||
| [refresh](./kibana-plugin-core-server.savedobjectscreateoptions.refresh.md) | <code>MutatingOperationRefreshSetting</code> | The Elasticsearch Refresh setting for this operation |
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md) > [originId](./kibana-plugin-core-server.savedobjectscreateoptions.originid.md)
|
||||
|
||||
## SavedObjectsCreateOptions.originId property
|
||||
|
||||
Optional ID of the original saved object, if this object's `id` was regenerated
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
originId?: string;
|
||||
```
|
|
@ -23,6 +23,7 @@ export interface SavedObjectsFindOptions
|
|||
| [page](./kibana-plugin-core-server.savedobjectsfindoptions.page.md) | <code>number</code> | |
|
||||
| [perPage](./kibana-plugin-core-server.savedobjectsfindoptions.perpage.md) | <code>number</code> | |
|
||||
| [preference](./kibana-plugin-core-server.savedobjectsfindoptions.preference.md) | <code>string</code> | An optional ES preference value to be used for the query \* |
|
||||
| [rootSearchFields](./kibana-plugin-core-server.savedobjectsfindoptions.rootsearchfields.md) | <code>string[]</code> | The fields to perform the parsed query against. Unlike the <code>searchFields</code> argument, these are expected to be root fields and will not be modified. If used in conjunction with <code>searchFields</code>, both are concatenated together. |
|
||||
| [search](./kibana-plugin-core-server.savedobjectsfindoptions.search.md) | <code>string</code> | Search documents using the Elasticsearch Simple Query String syntax. See Elasticsearch Simple Query String <code>query</code> argument for more information |
|
||||
| [searchFields](./kibana-plugin-core-server.savedobjectsfindoptions.searchfields.md) | <code>string[]</code> | The fields to perform the parsed query against. See Elasticsearch Simple Query String <code>fields</code> argument for more information |
|
||||
| [sortField](./kibana-plugin-core-server.savedobjectsfindoptions.sortfield.md) | <code>string</code> | |
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsFindOptions](./kibana-plugin-core-server.savedobjectsfindoptions.md) > [rootSearchFields](./kibana-plugin-core-server.savedobjectsfindoptions.rootsearchfields.md)
|
||||
|
||||
## SavedObjectsFindOptions.rootSearchFields property
|
||||
|
||||
The fields to perform the parsed query against. Unlike the `searchFields` argument, these are expected to be root fields and will not be modified. If used in conjunction with `searchFields`<!-- -->, both are concatenated together.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
rootSearchFields?: string[];
|
||||
```
|
|
@ -0,0 +1,15 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportAmbiguousConflictError](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.md) > [destinations](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.destinations.md)
|
||||
|
||||
## SavedObjectsImportAmbiguousConflictError.destinations property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
destinations: Array<{
|
||||
id: string;
|
||||
title?: string;
|
||||
updatedAt?: string;
|
||||
}>;
|
||||
```
|
|
@ -0,0 +1,21 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportAmbiguousConflictError](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.md)
|
||||
|
||||
## SavedObjectsImportAmbiguousConflictError interface
|
||||
|
||||
Represents a failure to import due to a conflict, which can be resolved in different ways with an overwrite.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface SavedObjectsImportAmbiguousConflictError
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [destinations](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.destinations.md) | <code>Array<{</code><br/><code> id: string;</code><br/><code> title?: string;</code><br/><code> updatedAt?: string;</code><br/><code> }></code> | |
|
||||
| [type](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.type.md) | <code>'ambiguous_conflict'</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportAmbiguousConflictError](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.md) > [type](./kibana-plugin-core-server.savedobjectsimportambiguousconflicterror.type.md)
|
||||
|
||||
## SavedObjectsImportAmbiguousConflictError.type property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
type: 'ambiguous_conflict';
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportConflictError](./kibana-plugin-core-server.savedobjectsimportconflicterror.md) > [destinationId](./kibana-plugin-core-server.savedobjectsimportconflicterror.destinationid.md)
|
||||
|
||||
## SavedObjectsImportConflictError.destinationId property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
destinationId?: string;
|
||||
```
|
|
@ -16,5 +16,6 @@ export interface SavedObjectsImportConflictError
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [destinationId](./kibana-plugin-core-server.savedobjectsimportconflicterror.destinationid.md) | <code>string</code> | |
|
||||
| [type](./kibana-plugin-core-server.savedobjectsimportconflicterror.type.md) | <code>'conflict'</code> | |
|
||||
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
error: SavedObjectsImportConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError;
|
||||
error: SavedObjectsImportConflictError | SavedObjectsImportAmbiguousConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError;
|
||||
```
|
||||
|
|
|
@ -16,8 +16,10 @@ export interface SavedObjectsImportError
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [error](./kibana-plugin-core-server.savedobjectsimporterror.error.md) | <code>SavedObjectsImportConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError</code> | |
|
||||
| [error](./kibana-plugin-core-server.savedobjectsimporterror.error.md) | <code>SavedObjectsImportConflictError | SavedObjectsImportAmbiguousConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError</code> | |
|
||||
| [id](./kibana-plugin-core-server.savedobjectsimporterror.id.md) | <code>string</code> | |
|
||||
| [meta](./kibana-plugin-core-server.savedobjectsimporterror.meta.md) | <code>{</code><br/><code> title?: string;</code><br/><code> icon?: string;</code><br/><code> }</code> | |
|
||||
| [overwrite](./kibana-plugin-core-server.savedobjectsimporterror.overwrite.md) | <code>boolean</code> | If <code>overwrite</code> is specified, an attempt was made to overwrite an existing object. |
|
||||
| [title](./kibana-plugin-core-server.savedobjectsimporterror.title.md) | <code>string</code> | |
|
||||
| [type](./kibana-plugin-core-server.savedobjectsimporterror.type.md) | <code>string</code> | |
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportError](./kibana-plugin-core-server.savedobjectsimporterror.md) > [meta](./kibana-plugin-core-server.savedobjectsimporterror.meta.md)
|
||||
|
||||
## SavedObjectsImportError.meta property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
meta: {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportError](./kibana-plugin-core-server.savedobjectsimporterror.md) > [overwrite](./kibana-plugin-core-server.savedobjectsimporterror.overwrite.md)
|
||||
|
||||
## SavedObjectsImportError.overwrite property
|
||||
|
||||
If `overwrite` is specified, an attempt was made to overwrite an existing object.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
overwrite?: boolean;
|
||||
```
|
|
@ -4,6 +4,11 @@
|
|||
|
||||
## SavedObjectsImportError.title property
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use `meta.title` instead
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportMissingReferencesError](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.md) > [blocking](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.blocking.md)
|
||||
|
||||
## SavedObjectsImportMissingReferencesError.blocking property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
blocking: Array<{
|
||||
type: string;
|
||||
id: string;
|
||||
}>;
|
||||
```
|
|
@ -16,7 +16,6 @@ export interface SavedObjectsImportMissingReferencesError
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [blocking](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.blocking.md) | <code>Array<{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }></code> | |
|
||||
| [references](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.references.md) | <code>Array<{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }></code> | |
|
||||
| [type](./kibana-plugin-core-server.savedobjectsimportmissingreferenceserror.type.md) | <code>'missing_references'</code> | |
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportOptions](./kibana-plugin-core-server.savedobjectsimportoptions.md) > [createNewCopies](./kibana-plugin-core-server.savedobjectsimportoptions.createnewcopies.md)
|
||||
|
||||
## SavedObjectsImportOptions.createNewCopies property
|
||||
|
||||
If true, will create new copies of import objects, each with a random `id` and undefined `originId`<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
createNewCopies: boolean;
|
||||
```
|
|
@ -16,10 +16,11 @@ export interface SavedObjectsImportOptions
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [createNewCopies](./kibana-plugin-core-server.savedobjectsimportoptions.createnewcopies.md) | <code>boolean</code> | If true, will create new copies of import objects, each with a random <code>id</code> and undefined <code>originId</code>. |
|
||||
| [namespace](./kibana-plugin-core-server.savedobjectsimportoptions.namespace.md) | <code>string</code> | if specified, will import in given namespace, else will import as global object |
|
||||
| [objectLimit](./kibana-plugin-core-server.savedobjectsimportoptions.objectlimit.md) | <code>number</code> | The maximum number of object to import |
|
||||
| [overwrite](./kibana-plugin-core-server.savedobjectsimportoptions.overwrite.md) | <code>boolean</code> | if true, will override existing object if present |
|
||||
| [overwrite](./kibana-plugin-core-server.savedobjectsimportoptions.overwrite.md) | <code>boolean</code> | If true, will override existing object if present. Note: this has no effect when used with the <code>createNewCopies</code> option. |
|
||||
| [readStream](./kibana-plugin-core-server.savedobjectsimportoptions.readstream.md) | <code>Readable</code> | The stream of [saved objects](./kibana-plugin-core-server.savedobject.md) to import |
|
||||
| [savedObjectsClient](./kibana-plugin-core-server.savedobjectsimportoptions.savedobjectsclient.md) | <code>SavedObjectsClientContract</code> | [client](./kibana-plugin-core-server.savedobjectsclientcontract.md) to use to perform the import operation |
|
||||
| [supportedTypes](./kibana-plugin-core-server.savedobjectsimportoptions.supportedtypes.md) | <code>string[]</code> | the list of allowed types to import |
|
||||
| [typeRegistry](./kibana-plugin-core-server.savedobjectsimportoptions.typeregistry.md) | <code>ISavedObjectTypeRegistry</code> | The registry of all known saved object types |
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
## SavedObjectsImportOptions.overwrite property
|
||||
|
||||
if true, will override existing object if present
|
||||
If true, will override existing object if present. Note: this has no effect when used with the `createNewCopies` option.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportOptions](./kibana-plugin-core-server.savedobjectsimportoptions.md) > [supportedTypes](./kibana-plugin-core-server.savedobjectsimportoptions.supportedtypes.md)
|
||||
|
||||
## SavedObjectsImportOptions.supportedTypes property
|
||||
|
||||
the list of allowed types to import
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
supportedTypes: string[];
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportOptions](./kibana-plugin-core-server.savedobjectsimportoptions.md) > [typeRegistry](./kibana-plugin-core-server.savedobjectsimportoptions.typeregistry.md)
|
||||
|
||||
## SavedObjectsImportOptions.typeRegistry property
|
||||
|
||||
The registry of all known saved object types
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
typeRegistry: ISavedObjectTypeRegistry;
|
||||
```
|
|
@ -19,4 +19,5 @@ export interface SavedObjectsImportResponse
|
|||
| [errors](./kibana-plugin-core-server.savedobjectsimportresponse.errors.md) | <code>SavedObjectsImportError[]</code> | |
|
||||
| [success](./kibana-plugin-core-server.savedobjectsimportresponse.success.md) | <code>boolean</code> | |
|
||||
| [successCount](./kibana-plugin-core-server.savedobjectsimportresponse.successcount.md) | <code>number</code> | |
|
||||
| [successResults](./kibana-plugin-core-server.savedobjectsimportresponse.successresults.md) | <code>SavedObjectsImportSuccess[]</code> | |
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportResponse](./kibana-plugin-core-server.savedobjectsimportresponse.md) > [successResults](./kibana-plugin-core-server.savedobjectsimportresponse.successresults.md)
|
||||
|
||||
## SavedObjectsImportResponse.successResults property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
successResults?: SavedObjectsImportSuccess[];
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportRetry](./kibana-plugin-core-server.savedobjectsimportretry.md) > [createNewCopy](./kibana-plugin-core-server.savedobjectsimportretry.createnewcopy.md)
|
||||
|
||||
## SavedObjectsImportRetry.createNewCopy property
|
||||
|
||||
If `createNewCopy` is specified, the new object has a new (undefined) origin ID. This is only needed for the case where `createNewCopies` mode is disabled and ambiguous source conflicts are detected.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
createNewCopy?: boolean;
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportRetry](./kibana-plugin-core-server.savedobjectsimportretry.md) > [destinationId](./kibana-plugin-core-server.savedobjectsimportretry.destinationid.md)
|
||||
|
||||
## SavedObjectsImportRetry.destinationId property
|
||||
|
||||
The object ID that will be created or overwritten. If not specified, the `id` field will be used.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
destinationId?: string;
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportRetry](./kibana-plugin-core-server.savedobjectsimportretry.md) > [ignoreMissingReferences](./kibana-plugin-core-server.savedobjectsimportretry.ignoremissingreferences.md)
|
||||
|
||||
## SavedObjectsImportRetry.ignoreMissingReferences property
|
||||
|
||||
If `ignoreMissingReferences` is specified, reference validation will be skipped for this object.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
ignoreMissingReferences?: boolean;
|
||||
```
|
|
@ -16,7 +16,10 @@ export interface SavedObjectsImportRetry
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [createNewCopy](./kibana-plugin-core-server.savedobjectsimportretry.createnewcopy.md) | <code>boolean</code> | If <code>createNewCopy</code> is specified, the new object has a new (undefined) origin ID. This is only needed for the case where <code>createNewCopies</code> mode is disabled and ambiguous source conflicts are detected. |
|
||||
| [destinationId](./kibana-plugin-core-server.savedobjectsimportretry.destinationid.md) | <code>string</code> | The object ID that will be created or overwritten. If not specified, the <code>id</code> field will be used. |
|
||||
| [id](./kibana-plugin-core-server.savedobjectsimportretry.id.md) | <code>string</code> | |
|
||||
| [ignoreMissingReferences](./kibana-plugin-core-server.savedobjectsimportretry.ignoremissingreferences.md) | <code>boolean</code> | If <code>ignoreMissingReferences</code> is specified, reference validation will be skipped for this object. |
|
||||
| [overwrite](./kibana-plugin-core-server.savedobjectsimportretry.overwrite.md) | <code>boolean</code> | |
|
||||
| [replaceReferences](./kibana-plugin-core-server.savedobjectsimportretry.replacereferences.md) | <code>Array<{</code><br/><code> type: string;</code><br/><code> from: string;</code><br/><code> to: string;</code><br/><code> }></code> | |
|
||||
| [type](./kibana-plugin-core-server.savedobjectsimportretry.type.md) | <code>string</code> | |
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-server.savedobjectsimportsuccess.md) > [createNewCopy](./kibana-plugin-core-server.savedobjectsimportsuccess.createnewcopy.md)
|
||||
|
||||
## SavedObjectsImportSuccess.createNewCopy property
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> If `createNewCopy` is specified, the new object has a new (undefined) origin ID. This is only needed for the case where `createNewCopies` mode is disabled and ambiguous source conflicts are detected. When `createNewCopies` mode is permanently enabled, this field will be redundant and can be removed.
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
createNewCopy?: boolean;
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-server.savedobjectsimportsuccess.md) > [destinationId](./kibana-plugin-core-server.savedobjectsimportsuccess.destinationid.md)
|
||||
|
||||
## SavedObjectsImportSuccess.destinationId property
|
||||
|
||||
If `destinationId` is specified, the new object has a new ID that is different from the import ID.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
destinationId?: string;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-server.savedobjectsimportsuccess.md) > [id](./kibana-plugin-core-server.savedobjectsimportsuccess.id.md)
|
||||
|
||||
## SavedObjectsImportSuccess.id property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
id: string;
|
||||
```
|
|
@ -0,0 +1,25 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-server.savedobjectsimportsuccess.md)
|
||||
|
||||
## SavedObjectsImportSuccess interface
|
||||
|
||||
Represents a successful import.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface SavedObjectsImportSuccess
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [createNewCopy](./kibana-plugin-core-server.savedobjectsimportsuccess.createnewcopy.md) | <code>boolean</code> | |
|
||||
| [destinationId](./kibana-plugin-core-server.savedobjectsimportsuccess.destinationid.md) | <code>string</code> | If <code>destinationId</code> is specified, the new object has a new ID that is different from the import ID. |
|
||||
| [id](./kibana-plugin-core-server.savedobjectsimportsuccess.id.md) | <code>string</code> | |
|
||||
| [meta](./kibana-plugin-core-server.savedobjectsimportsuccess.meta.md) | <code>{</code><br/><code> title?: string;</code><br/><code> icon?: string;</code><br/><code> }</code> | |
|
||||
| [overwrite](./kibana-plugin-core-server.savedobjectsimportsuccess.overwrite.md) | <code>boolean</code> | If <code>overwrite</code> is specified, this object overwrote an existing one (or will do so, in the case of a pending resolution). |
|
||||
| [type](./kibana-plugin-core-server.savedobjectsimportsuccess.type.md) | <code>string</code> | |
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-server.savedobjectsimportsuccess.md) > [meta](./kibana-plugin-core-server.savedobjectsimportsuccess.meta.md)
|
||||
|
||||
## SavedObjectsImportSuccess.meta property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
meta: {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-server.savedobjectsimportsuccess.md) > [overwrite](./kibana-plugin-core-server.savedobjectsimportsuccess.overwrite.md)
|
||||
|
||||
## SavedObjectsImportSuccess.overwrite property
|
||||
|
||||
If `overwrite` is specified, this object overwrote an existing one (or will do so, in the case of a pending resolution).
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
overwrite?: boolean;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsImportSuccess](./kibana-plugin-core-server.savedobjectsimportsuccess.md) > [type](./kibana-plugin-core-server.savedobjectsimportsuccess.type.md)
|
||||
|
||||
## SavedObjectsImportSuccess.type property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
type: string;
|
||||
```
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
The namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive: \* single (default): this type of saved object is namespace-isolated, e.g., it exists in only one namespace. \* multiple: this type of saved object is shareable, e.g., it can exist in one or more namespaces. \* agnostic: this type of saved object is global.
|
||||
|
||||
Note: do not write logic that uses this value directly; instead, use the appropriate accessors in the [type registry](./kibana-plugin-core-server.savedobjecttyperegistry.md)<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsRepository](./kibana-plugin-core-server.savedobjectsrepository.md) > [checkConflicts](./kibana-plugin-core-server.savedobjectsrepository.checkconflicts.md)
|
||||
|
||||
## SavedObjectsRepository.checkConflicts() method
|
||||
|
||||
Check what conflicts will result when creating a given array of saved objects. This includes "unresolvable conflicts", which are multi-namespace objects that exist in a different namespace; such conflicts cannot be resolved/overwritten.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
checkConflicts(objects?: SavedObjectsCheckConflictsObject[], options?: SavedObjectsBaseOptions): Promise<SavedObjectsCheckConflictsResponse>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| objects | <code>SavedObjectsCheckConflictsObject[]</code> | |
|
||||
| options | <code>SavedObjectsBaseOptions</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<SavedObjectsCheckConflictsResponse>`
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
find<T = unknown>({ search, defaultSearchOperator, searchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, }: SavedObjectsFindOptions): Promise<SavedObjectsFindResponse<T>>;
|
||||
find<T = unknown>({ search, defaultSearchOperator, searchFields, rootSearchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, }: SavedObjectsFindOptions): Promise<SavedObjectsFindResponse<T>>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| { search, defaultSearchOperator, searchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, } | <code>SavedObjectsFindOptions</code> | |
|
||||
| { search, defaultSearchOperator, searchFields, rootSearchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, } | <code>SavedObjectsFindOptions</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
|
|
@ -9,14 +9,7 @@ Increases a counter field by one. Creates the document if one doesn't exist for
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
incrementCounter(type: string, id: string, counterFieldName: string, options?: SavedObjectsIncrementCounterOptions): Promise<{
|
||||
id: string;
|
||||
type: string;
|
||||
updated_at: string;
|
||||
references: any;
|
||||
version: string;
|
||||
attributes: any;
|
||||
}>;
|
||||
incrementCounter(type: string, id: string, counterFieldName: string, options?: SavedObjectsIncrementCounterOptions): Promise<SavedObject>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
@ -30,14 +23,7 @@ incrementCounter(type: string, id: string, counterFieldName: string, options?: S
|
|||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<{
|
||||
id: string;
|
||||
type: string;
|
||||
updated_at: string;
|
||||
references: any;
|
||||
version: string;
|
||||
attributes: any;
|
||||
}>`
|
||||
`Promise<SavedObject>`
|
||||
|
||||
{<!-- -->promise<!-- -->}
|
||||
|
||||
|
|
|
@ -19,11 +19,12 @@ export declare class SavedObjectsRepository
|
|||
| [bulkCreate(objects, options)](./kibana-plugin-core-server.savedobjectsrepository.bulkcreate.md) | | Creates multiple documents at once |
|
||||
| [bulkGet(objects, options)](./kibana-plugin-core-server.savedobjectsrepository.bulkget.md) | | Returns an array of objects by id |
|
||||
| [bulkUpdate(objects, options)](./kibana-plugin-core-server.savedobjectsrepository.bulkupdate.md) | | Updates multiple objects in bulk |
|
||||
| [checkConflicts(objects, options)](./kibana-plugin-core-server.savedobjectsrepository.checkconflicts.md) | | Check what conflicts will result when creating a given array of saved objects. This includes "unresolvable conflicts", which are multi-namespace objects that exist in a different namespace; such conflicts cannot be resolved/overwritten. |
|
||||
| [create(type, attributes, options)](./kibana-plugin-core-server.savedobjectsrepository.create.md) | | Persists an object |
|
||||
| [delete(type, id, options)](./kibana-plugin-core-server.savedobjectsrepository.delete.md) | | Deletes an object |
|
||||
| [deleteByNamespace(namespace, options)](./kibana-plugin-core-server.savedobjectsrepository.deletebynamespace.md) | | Deletes all objects from the provided namespace. |
|
||||
| [deleteFromNamespaces(type, id, namespaces, options)](./kibana-plugin-core-server.savedobjectsrepository.deletefromnamespaces.md) | | Removes one or more namespaces from a given multi-namespace saved object. If no namespaces remain, the saved object is deleted entirely. This method and \[<code>addToNamespaces</code>\][SavedObjectsRepository.addToNamespaces()](./kibana-plugin-core-server.savedobjectsrepository.addtonamespaces.md) are the only ways to change which Spaces a multi-namespace saved object is shared to. |
|
||||
| [find({ search, defaultSearchOperator, searchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, })](./kibana-plugin-core-server.savedobjectsrepository.find.md) | | |
|
||||
| [find({ search, defaultSearchOperator, searchFields, rootSearchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, })](./kibana-plugin-core-server.savedobjectsrepository.find.md) | | |
|
||||
| [get(type, id, options)](./kibana-plugin-core-server.savedobjectsrepository.get.md) | | Gets a single object |
|
||||
| [incrementCounter(type, id, counterFieldName, options)](./kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md) | | Increases a counter field by one. Creates the document if one doesn't exist for the given id. |
|
||||
| [update(type, id, attributes, options)](./kibana-plugin-core-server.savedobjectsrepository.update.md) | | Updates an object |
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsResolveImportErrorsOptions](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.md) > [createNewCopies](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.createnewcopies.md)
|
||||
|
||||
## SavedObjectsResolveImportErrorsOptions.createNewCopies property
|
||||
|
||||
If true, will create new copies of import objects, each with a random `id` and undefined `originId`<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
createNewCopies: boolean;
|
||||
```
|
|
@ -16,10 +16,11 @@ export interface SavedObjectsResolveImportErrorsOptions
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [createNewCopies](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.createnewcopies.md) | <code>boolean</code> | If true, will create new copies of import objects, each with a random <code>id</code> and undefined <code>originId</code>. |
|
||||
| [namespace](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.namespace.md) | <code>string</code> | if specified, will import in given namespace |
|
||||
| [objectLimit](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.objectlimit.md) | <code>number</code> | The maximum number of object to import |
|
||||
| [readStream](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.readstream.md) | <code>Readable</code> | The stream of [saved objects](./kibana-plugin-core-server.savedobject.md) to resolve errors from |
|
||||
| [retries](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.retries.md) | <code>SavedObjectsImportRetry[]</code> | saved object import references to retry |
|
||||
| [savedObjectsClient](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.savedobjectsclient.md) | <code>SavedObjectsClientContract</code> | client to use to perform the import operation |
|
||||
| [supportedTypes](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.supportedtypes.md) | <code>string[]</code> | the list of allowed types to import |
|
||||
| [typeRegistry](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.typeregistry.md) | <code>ISavedObjectTypeRegistry</code> | The registry of all known saved object types |
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsResolveImportErrorsOptions](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.md) > [supportedTypes](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.supportedtypes.md)
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsResolveImportErrorsOptions](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.md) > [typeRegistry](./kibana-plugin-core-server.savedobjectsresolveimporterrorsoptions.typeregistry.md)
|
||||
|
||||
## SavedObjectsResolveImportErrorsOptions.supportedTypes property
|
||||
## SavedObjectsResolveImportErrorsOptions.typeRegistry property
|
||||
|
||||
the list of allowed types to import
|
||||
The registry of all known saved object types
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
supportedTypes: string[];
|
||||
typeRegistry: ISavedObjectTypeRegistry;
|
||||
```
|
|
@ -191,6 +191,7 @@
|
|||
"node-forge": "^0.9.1",
|
||||
"opn": "^5.5.0",
|
||||
"oppsy": "^2.0.0",
|
||||
"p-map": "^4.0.0",
|
||||
"pegjs": "0.10.0",
|
||||
"proxy-from-env": "1.0.0",
|
||||
"query-string": "5.1.1",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue