POST /api/data_views/swap_references/_preview

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.

Headers

  • kbn-xsrf string Required

    Cross-site request forgery protection

application/json

Body Required

  • delete boolean

    Deletes referenced saved object if all references are removed.

  • forId string | array[string]

    Limit the affected saved objects to one or more by identifier.

  • forType string

    Limit the affected saved objects by type.

  • fromId string Required

    The saved object reference to change.

  • fromType string

    Specify the type of the saved object reference to alter. The default value is index-pattern for data views.

  • toId string Required

    New saved object reference value to replace the old value.

Responses

  • 200 application/json

    Indicates a successful call.

    Hide response attribute Show response attribute object
    • result array[object]
      Hide result attributes Show result attributes object
      • id string

        A saved object identifier.

      • type string

        The saved object type.

POST /api/data_views/swap_references/_preview
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"
}