---
type: api
title: Resolve import errors
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-saved-objects-resolve-import-errors
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-saved-objects-resolve-import-errors
products:
  - Kibana
---

# Resolve import errors

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/saved_objects/_resolve_import_errors`
- `POST` `/s/{space_id}/api/saved_objects/_resolve_import_errors`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#basicauth)

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

To resolve errors from the import objects API, you can retry certain saved objects, overwrite specific saved objects, and change references to different saved objects

## Query String Parameters

- `createNewCopies` (boolean · default: false)
  Creates copies of saved objects, regenerates each object ID, and resets the origin.
- `compatibilityMode` (boolean · default: false)
  Applies adjustments to maintain compatibility between different Kibana versions.

## Request Body

`multipart/form-data`

- `file` (object) — required
- `retries` ([] object · max: 10000) — required
  - `createNewCopy` (boolean) — optional
  - `destinationId` (string · max: 512) — optional
  - `id` (string · max: 512) — required
  - `ignoreMissingReferences` (boolean) — optional
  - `overwrite` (boolean · default: false) — optional
  - `replaceReferences` ([] object · max: 100 · default: []) — optional
    - `from` (string · max: 512) — required
    - `to` (string · max: 512) — required
    - `type` (string · max: 256) — required
  - `type` (string · max: 256) — required

## Responses

#### `200`

A successful resolve import errors response.

#### `400`

A bad request.

## Code Examples

#### Console

```console
POST kbn://api/saved_objects/_resolve_import_errors
```

#### curl

```curl
curl \
  -X POST "${KIBANA_URL}/api/saved_objects/_resolve_import_errors" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  --form file=@file.ndjson \
  --form retries='[{"type":"dashboard","id":"example-dashboard-1","overwrite":true,"replaceReferences":[]}]'
```

## Request Examples

#### Resolve import errors by retrying objects

```json
{
  "file": "file.ndjson",
  "retries": [
    {
      "id": "example-dashboard-1",
      "overwrite": true,
      "replaceReferences": [],
      "type": "dashboard"
    }
  ]
}
```

## Response Examples

#### A successful resolve import errors response

```json
{
  "errors": [],
  "success": true,
  "successCount": 1,
  "successResults": [
    {
      "id": "example-dashboard-1",
      "managed": false,
      "type": "dashboard"
    }
  ]
}
```

#### A bad request error

```json
{
  "error": "Bad Request",
  "message": "Invalid file extension .txt",
  "statusCode": 400
}
```

