Importing Kibana saved objects restores dashboards, visualizations, and related workspace content from an exported .ndjson file, which helps rebuild environments, migrate between clusters, or promote curated views into production.

Kibana stores dashboards and other UI assets as saved object documents and exposes an HTTP endpoint at /api/saved_objects/_import to recreate them from an export file. The import request uploads the .ndjson file as multipart form data and can restore related objects (such as data views) when they are included in the export.

Saved object imports are not backwards compatible and should target the same Kibana version, a newer minor on the same major, or the next major, since importing into an older version can fail. Requests must go to the Kibana HTTP endpoint (commonly port 5601) rather than the Elasticsearch endpoint, include the required kbn-xsrf header with any non-empty value, and use a role with permissions to manage saved objects in the target space. Large exports can exceed savedObjects.maxImportExportSize or savedObjects.maxImportPayloadBytes in kibana.yml, and editing exported .ndjson content can introduce errors or data loss.

Steps to import Kibana saved objects:

  1. Inspect the export file to confirm it is line-delimited JSON in .ndjson format.
    $ head -n 2 dashboards.ndjson
    {"id":"ops-overview","type":"dashboard","attributes":{"title":"Ops overview"}}
    {"id":"cpu-by-host","type":"visualization","attributes":{"title":"CPU by host"}}
    ##### snipped #####

    Each line in a .ndjson export is a standalone JSON object.

  2. Import the NDJSON file with overwrite enabled.
    $ curl -s -u elastic:password -H "kbn-xsrf: true" -F file=@dashboards.ndjson "http://localhost:5601/api/saved_objects/_import?overwrite=true"
    {
      "success": true,
      "successCount": 2
    }

    Using overwrite=true replaces saved objects with matching IDs in the target space and can overwrite manual edits or change dashboards unexpectedly.

    Use /s/<space_id>/api in the URL to target a non-default space, use createNewCopies=true to import new IDs without overwriting, and avoid combining createNewCopies with overwrite or compatibilityMode.

  3. Verify dashboards are present.
    $ curl -s -u elastic:password -H "kbn-xsrf: true" "http://localhost:5601/api/saved_objects/_find?type=dashboard&per_page=5"
    {
      "total": 2,
      "saved_objects": [
        {
          "id": "ops-overview",
          "type": "dashboard"
        }
      ]
    }

    Dashboards that import successfully can still show missing_references warnings in the UI when required data views or related objects were not included in the export.

  4. Confirm the imported dashboard appears in the Dashboards list in the Kibana web UI.