Exporting Kibana saved objects preserves dashboards, visualizations, data views, and other workspace configuration for backup and migration between environments. Keeping a reproducible export makes it easier to promote content from development to production and to recover after accidental deletions.

Saved objects are stored in Elasticsearch under Kibana-managed indices and are accessed through the Kibana HTTP API. The export endpoint returns newline-delimited JSON (NDJSON) where each line represents a single saved object document suitable for later import.

Export requests require an authenticated Kibana user with sufficient privileges and must include the kbn-xsrf header for non-GET API calls. Large exports can hit Kibana size limits, so exporting by object type or by specific object ids keeps files manageable. The export contains configuration metadata rather than the underlying Elasticsearch data, and the resulting .ndjson file should still be treated as sensitive.

Steps to export Kibana saved objects:

  1. Export dashboard saved objects to an NDJSON file using the Saved Objects export API.
    $ curl --silent --show-error --fail \
      --cacert /etc/kibana/certs/kibana-ca.crt \
      --user 'elastic:password' \
      --header 'kbn-xsrf: true' \
      --header 'Content-Type: application/json' \
      --request POST 'https://localhost:5601/kibana/api/saved_objects/_export' \
      --data '{
      "type": ["dashboard"],
      "includeReferencesDeep": true,
      "excludeExportDetails": true
    }' \
      --output dashboards.ndjson

    Keep includeReferencesDeep enabled to include objects referenced by dashboards, extend the type array to export multiple object types, and use https://localhost:5601/kibana/s/<space_id>/api/saved_objects/_export for a non-default Kibana space.

    Protect the exported .ndjson file because it can expose object names, index patterns, saved queries, and URLs.

  2. Export a specific saved object by its type and id when a scoped export is needed.
    $ curl --silent --show-error --fail \
      --cacert /etc/kibana/certs/kibana-ca.crt \
      --user 'elastic:password' \
      --header 'kbn-xsrf: true' \
      --header 'Content-Type: application/json' \
      --request POST 'https://localhost:5601/kibana/api/saved_objects/_export' \
      --data '{
      "objects": [
        {"type": "dashboard", "id": "ops-overview"}
      ],
      "includeReferencesDeep": true,
      "excludeExportDetails": true
    }' \
      --output ops-overview.ndjson

    Add more entries to the objects list to export multiple specific objects in a single request.

  3. Confirm the export file exists and has a non-zero size.
    $ ls -lh dashboards.ndjson
    -rw-r--r-- 1 root root 1.2K Jan  8 00:30 dashboards.ndjson
  4. Count the number of exported documents in the .ndjson file.
    $ wc -l dashboards.ndjson
    2 dashboards.ndjson

    One saved object is written per line when excludeExportDetails is true, and setting it to false appends a final export details line.

  5. Inspect the first exported objects to confirm the expected type and id are present.
    $ head -n 2 dashboards.ndjson
    {"attributes":{"allowHidden":false,"fieldAttrs":"{}","fieldFormatMap":"{}","fields":"[]","name":"Logstash logs","runtimeFieldMap":"{}","sourceFilters":"[]","timeFieldName":"@timestamp","title":"logs-*"},"coreMigrationVersion":"8.8.0","created_at":"2026-01-08T00:02:10.272Z","id":"5b828c0a-e58e-48bb-848a-87da4f76f467","managed":false,"references":[],"type":"index-pattern","typeMigrationVersion":"8.0.0","updated_at":"2026-01-08T00:02:10.272Z","version":"WzcsMV0="}
    {"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}"},"optionsJSON":"{\"useMargins\":true,\"hidePanelTitles\":false}","panelsJSON":"[]","timeRestore":false,"title":"Ops overview","version":1},"coreMigrationVersion":"8.8.0","created_at":"2026-01-08T00:30:20.173Z","id":"ops-overview","managed":false,"references":[{"id":"5b828c0a-e58e-48bb-848a-87da4f76f467","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"sort":[1767832220173,8],"type":"dashboard","typeMigrationVersion":"10.3.0","updated_at":"2026-01-08T00:30:20.173Z","version":"WzEyLDFd"}