When you develop applications that interact with your Astra DB Serverless databases, you must connect to your databases programmatically.
Astra DB Serverless offers several methods to connect to your databases including APIs, CLI tools, and client libraries.
Depending on your use case, you might use one or more of these options.
APIsUse the Data API and DevOps API to programmatically interact with your Astra organizations and databases.
Data APIUse 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.
Legacy Stargate APIs (deprecated)Legacy Stargate APIs include the Document API, REST API, GraphQL API, and gRPC API.
The legacy APIs are deprecated for Astra DB Serverless as of September 2024, and end-of-life (EOL) is scheduled for the end of 2025. As EOL approaches, you can do either of the following:
If you have questions or concerns, contact your account representative or DataStax Support.
Table-based authentication and authorization for legacy APIsWhen using the Stargate APIs with Astra DB Serverless, you could use either JWT-based or table-based authentication and authorization.
For example, you can use this REST API command to generate a table-based authentication token, which you then pass to each subsequent request in the X-Cassandra-Token
header:
curl -L -X POST "https://ASTRA_DB_ID-ASTRA_DB_REGION.apps.astra.datastax.com/api/rest/v1/auth" \
-H "Content-Type: application/json" \
--data-raw '{
"username": "CLIENT_ID",
"password": "CLIENT_SECRET"
}'
For more information, see Stargate API Authentication and Authorization.
cqlshBecause Astra DB Serverless 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4