Spaces method and path for this operation:
post /s/{space_id}/api/data_views/swap_references/_preview
Refer to Spaces for more information.
Preview the effect of swapping saved object references from one data view to another. Returns the list of affected saved objects without making any changes.
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/_preview
curl
curl \
-X POST "${KIBANA_URL}/api/data_views/swap_references/_preview" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{"fromId":"abcd-efg","toId":"xyz-123"}'
POST kbn://api/data_views/swap_references/_preview
{"fromId":"abcd-efg","toId":"xyz-123"}
Request example
Preview the saved objects that would be affected by swapping references from one data view to another.
{
"fromId": "abcd-efg",
"toId": "xyz-123"
}