---
type: api
title: Resolve conflicts copying saved objects
description: Overwrite saved objects that are returned as errors from the copy saved objects to space API.<br/><br/>[Required authorization] Route required privileges: copySavedObjectsToSpaces.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-post-spaces-resolve-copy-saved-objects-errors
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-post-spaces-resolve-copy-saved-objects-errors
products:
  - Kibana
---

# Resolve conflicts copying saved objects

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

## Paths

- `POST` `/api/spaces/_resolve_copy_saved_objects_errors`

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

## Description

Overwrite saved objects that are returned as errors from the copy saved objects to space API.<br/><br/>[Required authorization] Route required privileges: copySavedObjectsToSpaces.

## Request Body

`application/json`

- `compatibilityMode` (boolean · default: false) — optional
- `createNewCopies` (boolean · default: true) — optional
- `includeReferences` (boolean · default: false) — optional
- `objects` ([] object) — required
  - `id` (string) — required
  - `type` (string) — required
- `retries` (map string to object) — required

## Response

OK: A successful request.

## Code Examples

#### Console

```console
POST /api/spaces/_resolve_copy_saved_objects_errors
{
  "objects": [
    {
      "type": "dashboard",
      "id": "my-dashboard"
    }
  ],
  "includeReferences": true,
  "createNewCopies": false,
  "retries": {
    "sales": [
      {
        "type": "index-pattern",
        "id": "my-pattern",
        "overwrite": true
      },
      {
        "type": "visualization",
        "id": "my-vis",
        "overwrite": "true,",
        "destinationId": "another-vis"
      },
      {
        "type": "canvas",
        "id": "my-canvas",
        "overwrite": true,
        "destinationId": "yet-another-canvas"
      },
      {
        "type": "dashboard",
        "id": "my-dashboard"
      }
    ]
  }
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/spaces/_resolve_copy_saved_objects_errors" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "objects": [
    {
      "type": "dashboard",
      "id": "my-dashboard"
    }
  ],
  "includeReferences": true,
  "createNewCopies": false,
  "retries": {
    "sales": [
      {
        "type": "index-pattern",
        "id": "my-pattern",
        "overwrite": true
      },
      {
        "type": "visualization",
        "id": "my-vis",
        "overwrite": "true,",
        "destinationId": "another-vis"
      },
      {
        "type": "canvas",
        "id": "my-canvas",
        "overwrite": true,
        "destinationId": "yet-another-canvas"
      },
      {
        "type": "dashboard",
        "id": "my-dashboard"
      }
    ]
  }
}'
```

## Response Examples

#### Copy with createNewCopies

The response for successfully copying a dashboard with the my-dashboard ID, including all references from the default space to the marketing space. The result indicates a successful copy and all three objects are created. Since these objects were created as new copies, each entry in the successResults array includes a destinationId attribute.

```json
{
  "marketing": {
    "success": true,
    "successCount": 3,
    "successResults": [
      {
        "id": "my-dashboard",
        "type": "dashboard",
        "destinationId": "1e127098-5b80-417f-b0f1-c60c8395358f",
        "meta": {
          "icon": "dashboardApp",
          "title": "Look at my dashboard"
        }
      },
      {
        "id": "my-vis",
        "type": "visualization",
        "destinationId": "a610ed80-1c73-4507-9e13-d3af736c8e04",
        "meta": {
          "icon": "visualizeApp",
          "title": "Look at my visualization"
        }
      },
      {
        "id": "my-index-pattern",
        "type": "index-pattern",
        "destinationId": "bc3c9c70-bf6f-4bec-b4ce-f4189aa9e26b",
        "meta": {
          "icon": "indexPatternApp",
          "title": "my-pattern-*"
        }
      }
    ]
  }
}
```

#### Copy without createNewCopies

The response for successfully copying a dashboard with the my-dashboard ID with createNewCopies turned off. The result indicates a successful copy and all three objects are created.

```json
{
  "marketing": {
    "success": true,
    "successCount": 3,
    "successResults": [
      {
        "id": "my-dashboard",
        "type": "dashboard",
        "meta": {
          "icon": "dashboardApp",
          "title": "Look at my dashboard"
        }
      },
      {
        "id": "my-vis",
        "type": "visualization",
        "meta": {
          "icon": "visualizeApp",
          "title": "Look at my visualization"
        }
      },
      {
        "id": "my-index-pattern",
        "type": "index-pattern",
        "meta": {
          "icon": "indexPatternApp",
          "title": "my-pattern-*"
        }
      }
    ]
  }
}
```

