Resolve import errors
To resolve errors from the Import objects API, you can:
- Retry certain saved objects
- Overwrite specific saved objects
- Change references to different saved objects
Query parameters
-
compatibilityMode boolean
Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. When enabled during the initial import, also enable when resolving import errors. This option cannot be used with the
createNewCopies
option. -
createNewCopies boolean
Creates copies of the saved objects, regenerates each object ID, and resets the origin. When enabled during the initial import, also enable when resolving import errors.
POST
/api/saved_objects/_resolve_import_errors
curl \
-X POST https://localhost:5601/api/saved_objects/_resolve_import_errors \
-H "Content-Type: multipart/form-data; Elastic-Api-Version=2023-10-31" \
-H "kbn-xsrf: string"
Request example
{"file"=>"file.ndjson", "retries"=>[{"id"=>"my-pattern", "type"=>"index-pattern", "overwrite"=>true}, {"id"=>"my-vis", "type"=>"visualization", "overwrite"=>true, "destinationId"=>"another-vis"}, {"id"=>"my-canvas", "type"=>"canvas", "overwrite"=>true, "destinationId"=>"yet-another-canvas"}, {"id"=>"my-dashboard", "type"=>"dashboard"}]}
Response examples (200)
{
"success": true,
"successCount": 3,
"successResults": [
{
"id": "my-vis",
"meta": {
"icon": "visualizeApp",
"title": "Look at my visualization"
},
"type": "visualization"
},
{
"id": "my-search",
"meta": {
"icon": "searchApp",
"title": "Look at my search"
},
"type": "search"
},
{
"id": "my-dashboard",
"meta": {
"icon": "dashboardApp",
"title": "Look at my dashboard"
},
"type": "dashboard"
}
]
}
Response examples (400)
{
"error": "Bad Request",
"message": "string",
"statusCode": 400
}