Import saved objects
https://{kibana_url}
- POST /api/saved_objects/_import
- POST /s/{space_id}/api/saved_objects/_import
Refer to Spaces for more information.
Create sets of Kibana saved objects from a file created by the export API. Saved objects can only be imported into the same version, a newer minor on the same major, or the next major. Tampering with exported data risks introducing unspecified errors and data loss.
Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.
NOTE: The exported saved objects include coreMigrationVersion and typeMigrationVersion metadata. If you store exported saved objects outside of Kibana (for example in NDJSON files) or generate them yourself, you must preserve or include these fields to retain forwards compatibility across Kibana versions.
Query Parameters
-
overwriteboolean · default: false Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object. NOTE: This option cannot be used with the
createNewCopiesoption.-
createNewCopiesboolean · default: false Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict errors are avoided. NOTE: This option cannot be used with the
overwriteandcompatibilityModeoptions.-
compatibilityModeboolean · default: false Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with imported saved objects. NOTE: This option cannot be used with the
createNewCopiesoption.
Request
-
fileobjectrequired -
A file exported using the export API. Changing the contents of the exported file in any way before importing it can cause errors, crashes or data loss. NOTE: The
savedObjects.maxImportExportSizeconfiguration setting limits the number of saved objects which may be included in this file. Similarly, thesavedObjects.maxImportPayloadBytessetting limits the overall size of the file that can be imported.
Responses
Indicates a successful call.
-
errorsobjectrequired -
Indicates the import was unsuccessful and specifies the objects that failed to import.
NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a
missing_referenceserror and conflict error. -
successbooleanrequired -
Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the
errorsandsuccessResultsproperties. -
successCountnumberrequired -
Indicates the number of successfully imported records.
-
successResultsobjectrequired -
Indicates the objects that are successfully imported, with any metadata if applicable.
NOTE: Objects are created only when all resolvable errors are addressed, including conflicts and missing references. If objects are created as new copies, each entry in the
successResultsarray includes adestinationIdattribute.
Bad request.
-
errorstringrequired -
messagestringrequired -
statusCoderequired -
Values:
400