Import saved objects Beta
Create sets of Kibana saved objects from a file created by the export API. Saved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.
This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
Query parameters
-
createNewCopies boolean
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
overwrite
andcompatibilityMode
options. -
overwrite boolean
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
createNewCopies
option. -
compatibilityMode boolean
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
createNewCopies
option.
Body Required
-
A file exported using the export API. NOTE: The
savedObjects.maxImportExportSize
configuration setting limits the number of saved objects which may be included in this file. Similarly, thesavedObjects.maxImportPayloadBytes
setting limits the overall size of the file that can be imported.
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
{"file"=>"file.ndjson"}
{
"success": true,
"successCount": 1,
"successResults": [
{
"id": "90943e30-9a47-11e8-b64d-95841ca0b247",
"meta": {
"icon": "indexPatternApp",
"title": "Kibana Sample Data Logs"
},
"type": "index-pattern",
"managed": false,
"destinationId": "82d2760c-468f-49cf-83aa-b9a35b6a8943"
}
]
}
{
"error": "Bad Request",
"message": "string",
"statusCode": 400
}