content/shared/influxdb3-admin/databases/list.md
Use the influxdb3 show databases command,
the /api/v3/configure/database HTTP API endpoint, or InfluxDB 3 Explorer to list databases in {{< product-name >}}.
Provide the following:
--format option--show-deleted option-t, --token optioninfluxdb3 show databases
The influxdb3 show databases command supports output formats:
pretty (default)jsonjsonlcsvparquet (must output to a file)Use the --format flag to specify the output format:
influxdb3 show databases --format json
{{< 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 >}}
Parquet is a binary format.
Use the --output option to specify the file where you want to save the Parquet data.
influxdb3 show databases \
--format parquet \
--output databases.parquet
Alternatively, use the influxdb3 query command to query system tables:
influxdb3 query \
--database _internal \
--format parquet \
--output databases.parquet \
"SELECT * FROM system.databases"
To list deleted databases, include the --show-deleted option with your
influxdb3 show databases command:
influxdb3 show databases --show-deleted
To list databases using the HTTP API, send a GET request to the /api/v3/configure/database endpoint.
{{% api-endpoint method="GET" endpoint="{{< influxdb/host >}}/api/v3/configure/database?format=pretty" %}}
Include the format query parameter and specify one of the following formats:
prettyjsonjsonlcsvparquet{{< tabs-wrapper >}} {{% tabs %}} Pretty output JSON output Parquet output {{% /tabs %}} {{% tab-content %}}
Include the following in your request:
Authorization: Bearer with your {{% token-link %}}format=prettycurl --request GET "{{< influxdb/host >}}/api/v3/configure/database?format=pretty" \
--header "Authorization: Bearer AUTH_TOKEN"
The response body contains a table of database names:
+---------------------+
| iox::database |
+---------------------+
| _internal |
| home |
| home_actions |
| noaa |
+---------------------+
{{% /tab-content %}}
{{% tab-content %}}
Include the following in your request:
Authorization: Bearer with your {{% token-link %}}format=jsoncurl --request GET "{{< influxdb/host >}}/api/v3/configure/database?format=json" \
--header "Authorization: Bearer AUTH_TOKEN"
The response body contains a JSON array of database objects whose keys are iox::database:
[
{
"iox::database": "home"
},
{
"iox::database": "home_actions"
},
{
"iox::database": "noaa"
}
]
{{% /tab-content %}}
{{% tab-content %}}
Include the following in your request:
Authorization: Bearer with your {{% token-link %}}format=parquetcurl "{{< influxdb/host >}}/api/v3/configure/database?format=parquet" \
-o databases.parquet \
--header "Authorization: Bearer AUTH_TOKEN"
For Parquet responses, you must provide an output destination because the format is binary.
The response contains the databases list. {{% /tab-content %}} {{< /tabs-wrapper >}}
A successful request returns HTTP status 200.
You can also view all databases using the InfluxDB 3 Explorer web interface:
For more information, see Manage databases with InfluxDB 3 Explorer.