Find all databases (Python)

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 list of AstraDBAdminDatabaseInfo objects that each describe a database.

Parameters

Use the list_databases method, which belongs to the AstraDBAdmin class.

Method signature
list_databases(
  *,
  include: str,
  provider: str,
  page_size: int,
  database_admin_timeout_ms: int,
  request_timeout_ms: int,
  timeout_ms: int,
) -> list[AstraDBAdminDatabaseInfo]
Name Type Summary

include

str

Optional. Filters the returned databases by status.

Can be one of: nonterminated, all, active, associating, pending, preparing, prepared, initializing, parked, parking, unparking, terminating, terminated, resizing, error, maintenance, suspended, suspending.

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

Default: nonterminated

provider

str

Optional. Filters the returned databases by cloud provider.

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

Default: ALL

page_size

int

Optional. The number of results per page for the underlying API request. The client manages pagination for you and returns the full list.

Maximum: 100

Default: 25

database_admin_timeout_ms

int

Optional. A timeout, in milliseconds, to impose on each underlying API request. If not provided, the AstraDBAdmin defaults apply.

This parameter is aliased as request_timeout_ms and timeout_ms for convenience.

Examples

The following examples demonstrate how to list databases.

from astrapy import DataAPIClient

client = DataAPIClient("APPLICATION_TOKEN")

admin = client.get_admin()

databases = admin.list_databases()

print(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