-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '8.12' into fix/olm-unskip_e2e_edr_workflows_failing_tests
- Loading branch information
Showing
66 changed files
with
830 additions
and
228 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
[[data-views-api-swap-references]] | ||
=== Swap references data view API | ||
++++ | ||
<titleabbrev>Swap references</titleabbrev> | ||
++++ | ||
|
||
Swap saved object references | ||
|
||
[WARNING] | ||
==== | ||
Misuse can break large numbers of saved objects! Practicing with a backup is recommended. | ||
==== | ||
|
||
[NOTE] | ||
==== | ||
For the most up-to-date API details, refer to the | ||
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification]. | ||
==== | ||
|
||
[[data-views-api-swap-references-request]] | ||
==== Request | ||
|
||
`POST <kibana host>:<port>/api/data_views/swap_references` | ||
|
||
`POST <kibana host>:<port>/s/<space_id>/api/data_views/swap_references` | ||
|
||
|
||
[[data-views-api-swap-references-request-body]] | ||
==== Request body | ||
|
||
`fromId`:: | ||
(Required, string) Saved object reference to change. | ||
|
||
`toId`:: | ||
(Required, string) New saved object reference value to replace the old. | ||
|
||
`delete`:: | ||
(Optional, boolean) Deletes referenced saved object if all references are removed. | ||
|
||
`fromType`:: | ||
(Optional, string) Specify the type of the saved object reference to alter. Default is `index-pattern` for data view. | ||
|
||
`forId`:: | ||
(Optional, string or string[]) Limit the affected saved objects to one or more by IDs. | ||
|
||
`forType`:: | ||
(Optional, string) Limit the affected saved objects by type. | ||
|
||
[[data-views-api-swap-references-errors-codes]] | ||
==== Response code | ||
|
||
`200`:: | ||
Indicates a successful call. | ||
|
||
[[data-views-api-swap-references-example]] | ||
==== Examples | ||
|
||
Swap references to data view id "abcd-efg" with "xyz-123": | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
$ curl -X api/data_views/swap_references | ||
{ | ||
"fromId" : "abcd-efg", | ||
"toId" : "xyz-123", | ||
"delete" : true // optional, removes data view which is no longer referenced | ||
} | ||
-------------------------------------------------- | ||
// KIBANA | ||
|
||
The API returns a list of affected saved objects: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
{ | ||
result: [{ id: "123", type: "visualization" }], | ||
deleteStatus: { | ||
remainingRefs: 0, | ||
deletePerformed: true | ||
} | ||
} | ||
-------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[[data-views-api-swap-references-preview]] | ||
=== Swap references preview data view API | ||
++++ | ||
<titleabbrev>Swap references preview</titleabbrev> | ||
++++ | ||
|
||
Swap saved object references preview | ||
|
||
[NOTE] | ||
==== | ||
For the most up-to-date API details, refer to the | ||
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification]. | ||
==== | ||
|
||
[[data-views-api-swap-references-preview-request]] | ||
==== Request | ||
|
||
`POST <kibana host>:<port>/api/data_views/swap_references/_preview` | ||
|
||
`POST <kibana host>:<port>/s/<space_id>/api/data_views/swap_references/_preview` | ||
|
||
|
||
[[data-views-api-swap-references-preview-request-body]] | ||
==== Request body | ||
|
||
`fromId`:: | ||
(Required, string) Saved object reference to change. | ||
|
||
`toId`:: | ||
(Required, string) New saved object reference value to replace the old. | ||
|
||
`delete`:: | ||
(Optional, boolean) Deletes referenced saved object if all references are removed. | ||
|
||
`fromType`:: | ||
(Optional, string) Specify the type of the saved object reference to alter. Default is `index-pattern` for data view. | ||
|
||
`forId`:: | ||
(Optional, string or string[]) Limit the affected saved objects to one or more by IDs. | ||
|
||
`forType`:: | ||
(Optional, string) Limit the affected saved objects by type. | ||
|
||
[[data-views-api-swap-references-preview-errors-codes]] | ||
==== Response code | ||
|
||
`200`:: | ||
Indicates a successful call. | ||
|
||
[[data-views-api-swap-references-preview-example]] | ||
==== Examples | ||
|
||
Preview swapping references to data view id "abcd-efg" with "xyz-123": | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
$ curl -X api/data_views/swap_references/_preview | ||
{ | ||
"fromId" : "abcd-efg", | ||
"toId" : "xyz-123" | ||
} | ||
-------------------------------------------------- | ||
// KIBANA | ||
|
||
The API returns a list of affected saved objects: | ||
|
||
[source,sh] | ||
-------------------------------------------------- | ||
{ | ||
result: [{ id: "123", type: "visualization" }], | ||
} | ||
-------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.