v1.databases() function

The v1.databases() function returns a list of databases in an InfluxDB 1.7+ instance.

import "influxdata/influxdb/v1"


Output includes the following columns:

  • databaseName: Database name (string)
  • retentionPolicy: Retention policy name (string)
  • retentionPeriod: Retention period in nanoseconds (integer)
  • default: Default retention policy for database (boolean)


This documentation is open source. See a typo? Please, open an issue.

Need help getting up and running? Get Support