docs-v2/content/shared/influxdb3-admin/databases/list.md

2.4 KiB

Use the influxdb3 show databases command to list databases in {{< product-name >}}. Provide the following:

  • (Optional) Output format with the --format option
  • (Optional) Show deleted databases with the --show-deleted option
  • {{< product-name >}} authorization token with the -t, --token option

[!Note] While in beta, {{< product-name >}} does not require an authorization token.

influxdb3 show databases

Output formats

The influxdb3 show databases command supports output formats:

  • pretty (default)
  • json
  • jsonl
  • csv

Use the --format flag to specify the output format:

influxdb3 show databases --format json

Example output

{{< expand-wrapper >}} {{% expand "View example pretty-formatted output" %}} {{% influxdb/custom-timestamps %}}

+---------------+
| iox::database |
+---------------+
| home          |
| home_actions  |
| noaa          |
+---------------+

{{% /influxdb/custom-timestamps %}} {{% /expand %}} {{% expand "View example JSON-formatted output" %}} {{% influxdb/custom-timestamps %}}

[{"iox::database":"home"},{"iox::database":"home_actions"},{"iox::database":"noaa"}]

{{% /influxdb/custom-timestamps %}} {{% /expand %}} {{% expand "View example JSON-line-formatted output" %}} {{% influxdb/custom-timestamps %}}

{"iox::database":"home"}
{"iox::database":"home_actions"}
{"iox::database":"noaa"}

{{% /influxdb/custom-timestamps %}} {{% /expand %}} {{% expand "View example CSV-formatted output" %}} {{% influxdb/custom-timestamps %}}

iox::database
home
home_actions
noaa

{{% /influxdb/custom-timestamps %}} {{% /expand %}} {{< /expand-wrapper >}}

List deleted databases

To list deleted databases, include the --show-deleted option with your influxdb3 show databases command:

influxdb3 show databases --show-deleted