dashboard import
What this page covers
Import dashboard JSON files through the Grafana API.
When to open this page
- Use this when you have a local export tree or provisioning tree and need to push dashboards back into Grafana, either live or as a dry run. This command consumes raw/ or provisioning/ inputs; it does not consume the Grafana UI prompt/ lane.
Who this page is for
Best for SREs, Grafana operators, and responders working with dashboard inventory, migration, inspection, or screenshots.
Purpose
Import dashboard JSON files through the Grafana API.
When to use
Use this when you have a local export tree or provisioning tree and need to push dashboards back into Grafana, either live or as a dry run. This command consumes raw/ or provisioning/ inputs; it does not consume the Grafana UI prompt/ lane.
Before / After
- Before: import is a blind replay step, and you find folder, org, or schema problems only after the live call.
- After: import becomes a controlled replay step that can be previewed first with
--dry-run, then executed with clearer intent.
Key flags
--input-dir: source directory for raw or combined export input.--input-format: chooseraworprovisioning.--org-id,--use-export-org,--only-org-id,--create-missing-orgs: control cross-org routing.--import-folder-uid: force a destination folder UID.--ensure-folders,--replace-existing,--update-existing-only: control import behavior.--require-matching-folder-path,--require-matching-export-org,--strict-schema,--target-schema-version: safety checks.--import-message: revision message stored in Grafana.--interactive,--dry-run,--table,--json,--output-format,--output-columns,--no-header,--progress,--verbose: preview and reporting controls.
What success looks like
- dry-run shows the expected create/update actions before you touch the live server
- the destination org and folder routing are explicit enough to review
- the chosen input lane matches the replay goal:
raworprovisioning, notprompt
Failure checks
- if folder or org placement looks wrong, verify the routing flags before re-running live import
- if the replay looks too destructive, stop at
--dry-runand inspect the export tree first - if the schema check blocks replay, confirm whether the source tree needs normalization before import
Examples
# Purpose: Import dashboard JSON files through the Grafana API.
grafana-util dashboard import --url http://localhost:3000 --basic-user admin --basic-password admin --input-dir ./dashboards/raw --replace-existing
# Purpose: Import dashboard JSON files through the Grafana API.
grafana-util dashboard import --url http://localhost:3000 --basic-user admin --basic-password admin --input-dir ./dashboards/raw --dry-run --table