Copy saved objects between spaces

Base URL
https://{kibana_url}
  • POST /api/spaces/_copy_saved_objects
Auth

It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved Discover sessions, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.

Required authorization

Privileges copySavedObjectsToSpaces

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

compatibilityMode boolean · default: false

Apply various adjustments to the saved objects that are being copied to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with copied saved objects. This option cannot be used with the createNewCopies option.

createNewCopies boolean · default: true

Create new copies of saved objects, regenerate each object identifier, and reset the origin. When used, potential conflict errors are avoided. This option cannot be used with the overwrite and compatibilityMode options.

includeReferences boolean · default: false

When set to true, all saved objects related to the specified saved objects will also be copied into the target spaces.

objects object[] · max items: 1000 required
id string required

The identifier of the saved object to copy.

type string required

The type of the saved object to copy.

overwrite boolean · default: false

When set to true, all conflicts are automatically overridden. When a saved object with a matching type and identifier exists in the target space, that version is replaced with the version from the source space. This option cannot be used with the createNewCopies option.

spaces string[] · max items: 100 required

Response

200

OK: A successful request.

application/json
Base URL
https://{kibana_url}