---
title: "List All Database Clusters"
method: GET
path: "/v2/databases"
tags: ["DigitalOcean-public.v2-new_Databases"]
---

# List All Database Clusters

`GET /v2/databases`

To list all of the database clusters available on your account, send a GET request to `/v2/databases`. To limit the results to database clusters with a specific tag, include the `tag_name` query parameter set to the name of the tag. For example, `/v2/databases?tag_name=$TAG_NAME`.

The result will be a JSON object with a `databases` key. This will be set to an array of database objects, each of which will contain the standard database attributes.

The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects will contain the information needed to connect to the cluster's standby node(s).

The embedded `maintenance_window` object will contain information about any scheduled maintenance for the database cluster.

## Query parameters

- `tag_name` string

## Response `200`

A JSON object with a key of `databases`.

- object
  - `databases` DatabaseClusterRead[]
    - `id` string, uuid — A unique ID that can be used to identify and reference a database cluster.
    - `name` string, required — A unique, human-readable name referring to a database cluster.
    - `engine` 'pg' | 'mysql' | 'redis' | 'valkey' | 'mongodb' | 'kafka' | 'opensearch', required — A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch" for OpenSearch, and "valkey" for Valkey.
    - `version` string — A string representing the version of the database engine in use for the cluster.
    - `semantic_version` string — A string representing the semantic version of the database engine in use for the cluster.
    - `num_nodes` integer, required — The number of nodes in the database cluster.
    - `size` string, required — The slug identifier representing the size of the nodes in the database cluster.
    - `region` string, required — The slug identifier for the region where the database cluster is located.
    - `status` 'creating' | 'online' | 'resizing' | 'migrating' | 'forking' — A string representing the current status of the database cluster.
    - `created_at` string, date-time — A time value given in ISO8601 combined date and time format that represents when the database cluster was created.
    - `private_network_uuid` string — A string specifying the UUID of the VPC to which the database cluster will be assigned. If excluded, the cluster when creating a new database cluster, it will be assigned to your account's default VPC for the region. <br><br>Requires `vpc:read` scope.
    - `tags` string[], nullable — An array of tags that have been applied to the database cluster. <br><br>Requires `tag:read` scope.
    - `db_names` string[], nullable — An array of strings containing the names of databases created in the database cluster.
    - `ui_connection` object — The connection details for OpenSearch dashboard.
      - `uri` string — This is provided as a convenience and should be able to be constructed by the other attributes.
      - `host` string — The FQDN pointing to the opensearch cluster's current primary node.
      - `port` integer — The port on which the opensearch dashboard is listening.
      - `user` string — The default user for the opensearch dashboard.<br><br>Requires `database:view_credentials` scope.
      - `password` string — The randomly generated password for the default user.<br><br>Requires `database:view_credentials` scope.
      - `ssl` boolean — A boolean value indicating if the connection should be made over SSL.
    - `schema_registry_connection` object — The connection details for Schema Registry.
      - `uri` string — This is provided as a convenience and should be able to be constructed by the other attributes.
      - `host` string — The FQDN pointing to the schema registry connection uri.
      - `port` integer — The port on which the schema registry is listening.
      - `user` string — The default user for the schema registry.<br><br>Requires `database:view_credentials` scope.
      - `password` string — The randomly generated password for the schema registry.<br><br>Requires `database:view_credentials` scope.
      - `ssl` boolean — A boolean value indicating if the connection should be made over SSL.
    - `connection` object
      - `uri` string — A connection string in the format accepted by the `psql` command. This is provided as a convenience and should be able to be constructed by the other attributes.
      - `database` string — The name of the default database.
      - `host` string — The FQDN pointing to the database cluster's current primary node.
      - `port` integer — The port on which the database cluster is listening.
      - `user` string — The default user for the database.<br><br>Requires `database:view_credentials` scope.
      - `password` string — The randomly generated password for the default user.<br><br>Requires `database:view_credentials` scope.
      - `ssl` boolean — A boolean value indicating if the connection should be made over SSL.
    - `private_connection` object
      - `uri` string — A connection string in the format accepted by the `psql` command. This is provided as a convenience and should be able to be constructed by the other attributes.
      - `database` string — The name of the default database.
      - `host` string — The FQDN pointing to the database cluster's current primary node.
      - `port` integer — The port on which the database cluster is listening.
      - `user` string — The default user for the database.<br><br>Requires `database:view_credentials` scope.
      - `password` string — The randomly generated password for the default user.<br><br>Requires `database:view_credentials` scope.
      - `ssl` boolean — A boolean value indicating if the connection should be made over SSL.
    - `standby_connection` object
      - `uri` string — A connection string in the format accepted by the `psql` command. This is provided as a convenience and should be able to be constructed by the other attributes.
      - `database` string — The name of the default database.
      - `host` string — The FQDN pointing to the database cluster's current primary node.
      - `port` integer — The port on which the database cluster is listening.
      - `user` string — The default user for the database.<br><br>Requires `database:view_credentials` scope.
      - `password` string — The randomly generated password for the default user.<br><br>Requires `database:view_credentials` scope.
      - `ssl` boolean — A boolean value indicating if the connection should be made over SSL.
    - `standby_private_connection` object
      - `uri` string — A connection string in the format accepted by the `psql` command. This is provided as a convenience and should be able to be constructed by the other attributes.
      - `database` string — The name of the default database.
      - `host` string — The FQDN pointing to the database cluster's current primary node.
      - `port` integer — The port on which the database cluster is listening.
      - `user` string — The default user for the database.<br><br>Requires `database:view_credentials` scope.
      - `password` string — The randomly generated password for the default user.<br><br>Requires `database:view_credentials` scope.
      - `ssl` boolean — A boolean value indicating if the connection should be made over SSL.
    - `users` DatabaseUser[], nullable
      - `name` string, required — The name of a database user.
      - `role` 'primary' | 'normal' — A string representing the database user's role. The value will be either "primary" or "normal".
      - `password` string — A randomly generated password for the database user.<br>Requires `database:view_credentials` scope.
      - `access_cert` string — Access certificate for TLS client authentication. (Kafka only)
      - `access_key` string — Access key for TLS client authentication. (Kafka only)
      - `mysql_settings` MysqlSettings
        - `auth_plugin` 'mysql_native_password' | 'caching_sha2_password', required — A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`.
      - `settings` UserSettings
        - `pg_allow_replication` boolean — For Postgres clusters, set to `true` for a user with replication rights. This option is not currently supported for other database engines.
        - `opensearch_acl` object[] — ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster.
          - `index` string — A regex for matching the indexes that this ACL should apply to.
          - `permission` 'deny' | 'admin' | 'read' | 'readwrite' | 'write' — Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index.
        - `acl` object[] — ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster.
          - `id` string — An identifier for the ACL. Will be computed after the ACL is created/updated.
          - `topic` string, required — A regex for matching the topic(s) that this ACL should apply to.
          - `permission` 'admin' | 'consume' | 'produce' | 'produceconsume', required — Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update).
        - `mongo_user_settings` object — MongoDB-specific settings for the user. This option is not currently supported for other database engines.
          - `databases` string[] — A list of databases to which the user should have access. When the database is set to `admin`, the user will have access to all databases based on the user's role i.e. a user with the role `readOnly` assigned to the `admin` database will have read access to all databases.
          - `role` 'readOnly' | 'readWrite' | 'dbAdmin' — The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role.
    - `maintenance_window` object, nullable
      - `day` string, required — The day of the week on which to apply maintenance updates.
      - `hour` string, required — The hour in UTC at which maintenance updates will be applied in 24 hour format.
      - `pending` boolean — A boolean value indicating whether any maintenance is scheduled to be performed in the next window.
      - `description` string[] — A list of strings, each containing information about a pending maintenance update.
    - `project_id` string, uuid — The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.<br><br>Requires `project:read` scope.
    - `rules` FirewallRule[]
      - `uuid` string — A unique ID for the firewall rule itself.
      - `cluster_uuid` string — A unique ID for the database cluster to which the rule is applied.
      - `type` 'droplet' | 'k8s' | 'ip_addr' | 'tag' | 'app', required — The type of resource that the firewall rule allows to access the database cluster.
      - `value` string, required — The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster.
      - `created_at` string, date-time — A time value given in ISO8601 combined date and time format that represents when the firewall rule was created.
    - `version_end_of_life` string — A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline.
    - `version_end_of_availability` string — A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline.
    - `storage_size_mib` integer — Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage.
    - `metrics_endpoints` DatabaseServiceEndpoint[] — Public hostname and port of the cluster's metrics endpoint(s). Includes one record for the cluster's primary node and a second entry for the cluster's standby node(s).
      - `host` string — A FQDN pointing to the database cluster's node(s).
      - `port` integer — The port on which a service is listening.

## Other responses

- `401` — Authentication failed due to invalid credentials.
- `404` — The resource was not found.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

[API](https://skmtc.net/digitalocean/apis/digitalocean-api.md) · [All operations](https://skmtc.net/digitalocean/apis/digitalocean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalocean/digitalocean-api/versions/cb3bf9b21459/schema)
