Connect to Astra DB Serverless databases
When you develop applications that interact with your Astra DB Serverless databases, you must connect to your databases programmatically.
There are several ways to connect to your databases, including APIs, CLI tools, Apache Cassandra® drivers, and client libraries. Depending on your use case, you might use one or more of these methods.
| Use case | Recommended methods |
|---|---|
Application development with a Serverless (vector) database |
|
Application development with a Serverless (non-vector) database |
|
Applications that require specific CQL functions that aren’t supported by the Data API |
|
Maintain a legacy application that relies on a driver or CQL |
|
Administration |
|
Streaming |
|
Migration and bulk loading |
|
Third-party integrations |
Varies by provider and use case; see Integrations overview |
|
Programmatic authentication is handled through an application token and the Secure Connect Bundle (SCB). |
DevOps API
Use the DevOps API for administration and high-level database management tasks, such as database creation, user management, and security configurations.
For more information, see Get started with the Astra DevOps API.
Data API
Use the Data API to work with Serverless (vector) databases, including commands for creating collections and tables, loading data, querying data, and more.
You can access the Data API over HTTP or through the Data API clients.
If you’re new to the Data API, try the quickstart for collections or the quickstart for tables for a demo of some common operations.
For detailed Data API and client reference material, see Get started with the Data API.
Clients
You can use the Data API clients to access all Data API commands and some DevOps API endpoints. You can also connect to the Astra APIs over HTTP.
| Language | Client | Version | Dependency | Documentation |
|---|---|---|---|---|
Python |
Python 3.9 to 3.14 or later |
|||
TypeScript |
Node.js 18 or later |
|||
Java |
Java 17 or later (21 recommended) |
If you’re new to the Data API, try the quickstart for collections or the quickstart for tables for a demo of some common operations.
For detailed Data API and client reference material, see Get started with the Data API.
Drivers
|
DataStax recommends the Data API and clients for Serverless (vector) databases. You can use the Data API to run CQL statements on tables in Serverless (vector) databases. Use drivers for Serverless (non-vector) databases, legacy applications that rely on a driver, and use cases that require specific CQL functions that aren’t supported by the Data API |
You can use Cassandra drivers to interact with your Astra DB Serverless databases through the Cassandra Query Language (CQL).
Astra DB Serverless databases are compatible with the following Cassandra drivers:
| Language | Driver | Latest version | Documentation |
|---|---|---|---|
C++ |
|||
C# |
|||
Go |
|||
Java |
|||
Node.js |
|||
Python |
|||
Scala |
For more information, see Get started with Cassandra drivers.
CQL shell (cqlsh)
Because Astra DB is powered by Apache Cassandra®, you can use Cassandra Query Language (CQL) to programmatically interact with your databases through cqlsh or a driver.
For more information, see CQL for Astra DB.
DataStax Bulk Loader (DSBulk)
DSBulk supports large data uploads and migrations. For more information, see About DataStax Bulk Loader (DSBulk).
Astra CLI
The Astra CLI is a command-line interface that lets you create and manage Astra resources from your terminal, including Astra DB databases and Astra Streaming tenants.
For example:
-
Create and manage Astra DB databases, Astra Streaming tenants, and their associated artifacts
-
Query and insert data
-
Manage organizations and users
For more information and commands, see the Astra CLI documentation
You can use Astra CLI in addition to other connection methods.
Astra Portal
The Astra Portal provides a web-based interface to manage your Astra organizations and Astra DB databases. It is best for administrative tasks and high-level database management, including inspecting database health metrics.
For application development, fine-grained data manipulation, and nuanced searches, you must use a programmatic approach.
For information about accessing the Astra Portal, see Manage your Astra account and Firewall rules for the Astra Portal.
Legacy Stargate APIs (deprecated)
Legacy Stargate APIs are no longer supported for Astra. Specifically, the Document API, REST API, GraphQL API, and gRPC API are no longer supported for Astra. For alternatives, see Migrate to the Data API from the Stargate APIs.