[[managing-saved-objects]]
== Manage saved objects

Edit, import, export, and copy your saved objects. These objects include
dashboards, visualizations, maps, {data-sources}, *Canvas* workpads, and other saved objects.

To get started, open the main menu, and then click *Stack Management > Saved Objects*.

[role="screenshot"]
image::images/management-saved-objects.png[Saved Objects]

[float]
=== Required permissions

To access *Saved Objects*, you must have the required `Saved Objects Management` {kib} privilege.

To add the privilege, open the main menu, and then click *Stack Management > Roles*.

NOTE: Granting access to `Saved Objects Management` authorizes users to
manage all saved objects in {kib}, including objects that are managed by
applications they may not otherwise be authorized to access.


[float]
[[managing-saved-objects-view]]
=== View and delete

* To view and edit a saved object in its associated application, click the object title.

* To show objects that use this object, so you know the
impact of deleting it, click the actions icon image:images/actions_icon.png[Actions icon]
and then select *Relationships*.

* To delete one or more objects, select their checkboxes, and then click *Delete*.

[float]
[[managing-saved-objects-export-objects]]
=== Import and export

Use import and export to move objects between different {kib} instances.
These actions are useful when you have multiple environments for development and production.
Import and export also work well when you have a large number of objects to update and want to batch the process.

{kib} also provides <<saved-objects-api-import, import>> and
<<saved-objects-api-export, export>> APIs to automate this process.


[float]
==== Import

Import multiple objects in a single operation.

. In the toolbar, click *Import*.
. Select the NDJSON file that
includes the objects you want to import.
. Select the import options. By default,
saved objects already in {kib} are overwritten.
. Click *Import*.

NOTE: The <<savedObjects-maxImportExportSize, `savedObjects.maxImportExportSize`>> configuration setting
limits the number of saved objects to include in the file. The
<<savedObjects-maxImportPayloadBytes, `savedObjects.maxImportPayloadBytes`>> setting limits the overall
size of the file that you can import.


[float]
==== Export

Export objects by selection or type.

* To export specific objects, select them in the table, and then click *Export*.
* To export objects by type, click *Export objects* in the toolbar.

{kib} creates an NDJSON with all your saved objects. By default, the NDJSON includes child objects related to the saved
objects. Exported dashboards include their associated {data-sources}.

NOTE: The <<savedObjects-maxImportExportSize, `savedObjects.maxImportExportSize`>> configuration setting
limits the number of saved objects that you can export.

[float]
==== Compatibility across versions

With each release, {kib} introduces changes to the way saved objects are stored.
When importing a saved object, {kib} runs the necessary migrations to ensure
that the imported saved objects are compatible with the current version.

However, saved objects can only be imported into the same version,
a newer minor on the same major, or the next major.
Exported saved objects are not backward compatible and cannot be imported
into an older version of {kib}. For example:

|=======
| Exporting version | Importing version | Compatible?
| 6.7.0 | 6.8.1 | Yes
| 6.8.1 | 7.3.0 | Yes
| 7.3.0 | 7.11.1 | Yes
| 7.11.1 | 7.6.0 | No
| 6.8.1 | 8.0.0 | No
|=======



[float]
[role="xpack"]
[[managing-saved-objects-copy-to-space]]
=== Copy to other {kib} spaces

Copy saved objects and their related objects between spaces.

. Click the actions icon image:images/actions_icon.png[Actions icon].
. Click *Copy to spaces*.
. Select the spaces in which to copy the object.
. Specify whether to automatically overwrite any objects that already exist
in the target spaces, or resolve them on a per-object basis.
+
The copy operation automatically includes child objects that are related to
the saved object. If you don't want this behavior, use
the <<spaces-api-copy-saved-objects, copy saved objects to space API>> instead.

[float]
[role="xpack"]
[[managing-saved-objects-share-to-space]]
=== Share to other {kib} spaces

Make a single saved object available in multiple spaces.

. Click the actions icon
image:images/actions_icon.png[Actions icon].
. Select *Share to spaces*.
. Select the spaces in which to share the object.
Or, indicate that you want the object to be shared to _all spaces_,
which includes those that exist now and any created in the future.
+
Not all saved object types are shareable. If an object is shareable, the *Spaces* column shows where the object exists. You can click
those space icons to open the Share UI.
+
The share operation automatically includes child objects that are related to the saved objects.

include::saved-objects/saved-object-ids.asciidoc[]
