IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Swap references preview data view API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Swap references preview data view API
editSwap saved object references preview
For the most up-to-date API details, refer to the open API specification.
Request
editPOST <kibana host>:<port>/api/data_views/swap_references/_preview
POST <kibana host>:<port>/s/<space_id>/api/data_views/swap_references/_preview
Request body
edit-
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.
Response code
edit-
200
- Indicates a successful call.
Examples
editPreview swapping references to data view id "abcd-efg" with "xyz-123":
$ curl -X api/data_views/swap_references/_preview { "fromId" : "abcd-efg", "toId" : "xyz-123" }
The API returns a list of affected saved objects:
{ result: [{ id: "123", type: "visualization" }], }
Was this helpful?
Thank you for your feedback.