Swap saved object references
Spaces method and path for this operation:
post /s/{space_id}/api/data_views/swap_references
Refer to Spaces for more information.
Changes saved object references from one data view identifier to another. WARNING: Misuse can break large numbers of saved objects! Practicing with a backup is recommended.
Body Required
-
Deletes referenced saved object if all references are removed.
-
Limit the affected saved objects by type.
-
The saved object reference to change.
-
Specify the type of the saved object reference to alter. The default value is
index-patternfor data views. -
New saved object reference value to replace the old value.
POST /api/data_views/swap_references
curl \ --request POST 'https://localhost:5601/api/data_views/swap_references' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --header "kbn-xsrf: string" \ --data '{"toId":"xyz-123","delete":true,"fromId":"abcd-efg"}' Request example
{ "toId": "xyz-123", "delete": true, "fromId": "abcd-efg" }