List databases

Use the influxdb3 show databases command, the /api/v3/configure/database HTTP API endpoint, or InfluxDB 3 Explorer to list databases in InfluxDB 3 Core.

List databases using the influxdb3 CLI

Provide the following:

influxdb3 show databases

Output formats

The influxdb3 show databases command supports output formats:

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

influxdb3 show databases --format json

Example output

View example pretty-formatted output

View example JSON-formatted output

View example JSON-line-formatted output

View example CSV-formatted output

Output to a Parquet file

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"

List deleted databases

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

influxdb3 show databases --show-deleted

List databases using the HTTP API

To list databases using the HTTP API, send a GET request to the /api/v3/configure/database endpoint.

GET http://localhost:8181/api/v3/configure/database?format=pretty

Include the format query parameter and specify one of the following formats:

  • pretty
  • json
  • jsonl
  • csv
  • parquet

Include the following in your request:

  • Headers:

    • Authorization: Bearer with your token
  • Query Parameters:

    • format=pretty
curl --request GET "http://localhost:8181/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                |
+---------------------+

Include the following in your request:

  • Headers:

    • Authorization: Bearer with your token
  • Query Parameters:

    • format=json
curl --request GET "http://localhost:8181/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"
  }
]

Include the following in your request:

  • Headers:

    • Authorization: Bearer with your token
  • Query Parameters:

    • format=parquet
  • An output destination for the Parquet file

curl "http://localhost:8181/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.

A successful request returns HTTP status 200.

List databases using InfluxDB 3 Explorer

You can also view all databases using the InfluxDB 3 Explorer web interface:

  1. If you haven’t already, see how to get started with Explorer and connect to your InfluxDB 3 Core server.
  2. In Explorer, click Databases in the left navigation.
  3. The Databases page displays a list of all databases with the following information:
    • Database name
    • Retention period (if configured)
    • Number of tables in the database
    • Creation date

For more information, see Manage databases with InfluxDB 3 Explorer.


Was this page helpful?

Thank you for your feedback!