dots.v2.databases.get()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.databases.get(requestConfiguration?: RequestConfiguration<DatabasesRequestBuilderGetQueryParameters>): Promise<undefined | DatabasesGetResponse>

Description

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.

Parameters

tagName string optional

Example: production

Limits the results to database clusters with a specific tag.

Requires tag:read scope.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.databases.get();

Response Example

Show Response Example
{
  "databases": [
    {
      "id": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30",
      "name": "backend",
      "engine": "pg",
      "version": "10",
      "connection": {
        "uri": "postgres://doadmin:[email protected]:25060/defaultdb?sslmode=require",
        "database": "",
        "host": "db.example.com",
        "port": 25060,
        "user": "doadmin",
        "password": "example_password",
        "ssl": true
      },
      "private_connection": {
        "uri": "postgres://doadmin:[email protected]:25060/defaultdb?sslmode=require",
        "database": "",
        "host": "private-db.example.com",
        "port": 25060,
        "user": "doadmin",
        "password": "example_password",
        "ssl": true
      },
      "users": [
        {
          "name": "doadmin",
          "role": "primary",
          "password": "example_password"
        }
      ],
      "db_names": [
        "defaultdb"
      ],
      "num_nodes": 1,
      "region": "nyc3",
      "status": "online",
      "created_at": "2019-01-11T18:37:36Z",
      "maintenance_window": {
        "day": "saturday",
        "hour": "08:45:12",
        "pending": true,
        "description": [
          "Update TimescaleDB to version 1.2.1",
          "Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases"
        ]
      },
      "size": "db-s-2vcpu-4gb",
      "tags": [
        "production"
      ],
      "private_network_uuid": "d455e75d-4858-4eec-8c95-da2f0a5f93a7",
      "version_end_of_life": "2023-11-09T00:00:00Z",
      "version_end_of_availability": "2023-05-09T00:00:00Z",
      "storage_size_mib": 61440
    }
  ]
}

More Information

See /v2/databases in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.