Find all databases (TypeScript)

Lists all databases.

You need an application token with permission to create and configure databases, such as the Organization Administrator role.

For more information, see Get endpoint and token.

Result

Returns a promise that resolves to a list of FullDatabaseInfo objects that each describe a database.

Parameters

Use the listDatabases method, which belongs to the AstraAdmin class.

Method signature
async listDatabases(
  options?: {
    include?: AstraDatabaseStatusFilter,
    provider?: AstraDatabaseCloudProviderFilter,
    limit?: number,
    startingAfter?: string,
    timeout: number | TimeoutDescriptor,
  }): AstraFullDatabaseInfo[]
Name Type Summary

options

ListAstraDatabasesOptions

Optional. The options for this operation. See Properties of options for more details.

Properties of options
Name Type Summary

include

AstraDatabaseStatusFilter

Optional. Filters the returned databases by status.

Can be one of: ACTIVE, ASSOCIATING, ERROR, DECOMMISSIONING, DEGRADED, HIBERNATED, HIBERNATING, INITIALIZING, MAINTENANCE, PARKED, PARKING, PENDING, PREPARED, PREPARING, RESIZING, RESUMING, TERMINATED, TERMINATING, UNKNOWN, UNPARKING, SYNCHRONIZING, ALL, NONTERMINATED.

Some of these status are short-lived or do not apply to Astra DB Serverless databases.

Default: NONTERMINATED

provider

AstraDatabaseCloudProviderFilter

Optional. Filters the returned databases by cloud provider.

Can be one of: ALL, GCP, AWS, AZURE.

Default: ALL

limit

number

Optional. The number of results per page.

Maximum: 100

Default: 25

startingAfter

string

Optional. Pass the database ID of the last item on the previous page to get the next page.

timeout

number | TimeoutDescriptor

Optional. A timeout to impose on each underlying API request.

Examples

The following examples demonstrate how to list databases.

import { DataAPIClient } from "@datastax/astra-db-ts";

const client = new DataAPIClient("APPLICATION_TOKEN");

const admin = client.admin();

(async function () {
  const databases = await admin.listDatabases();

  console.log(databases);
})();

Client reference

For more information, see the client reference.

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | Privacy policy | Terms of use Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM