Compare Data API client versions
DataStax recommends using the latest versions of the clients to access the latest features, improvements, and bug fixes.
This page describes major changes in specific client versions, including major new features, deprecations, removals, and breaking changes. This page does not provide client release notes.
For information about the latest client versions, installation instructions, and other client documentation, see the links in the following table:
Language | Client | Version | Documentation | |
---|---|---|---|---|
Python |
||||
TypeScript |
||||
Java |
Version 1.5
This version is scheduled for release by the end of September 2024.
Version 1.5 of the Data API clients deprecates namespace
in favor of keyspace
.
In this version, keyspace
is a synonym for both namespace
and keyspace
.
This change also applies to the Data API itself (HTTP).
This change aligns the Data API and clients with the DevOps API, which already uses keyspace
for both namespaces and keyspaces.
It also better reflects the underlying Astra DB functionality, in which namespace is effectively an alternative label for keyspace.
A future client release after version 1.5 will remove support for |
After you upgrade to version 1.5, change your code to use keyspace
instead of namespace
.
For example:
-
Python
-
TypeScript
-
Java
-
curl
# Before 1.5
database = client.get_database("API_ENDPOINT", namespace="NAMESPACE_OR_KEYSPACE_NAME")
# 1.5 and later
database = client.get_database("API_ENDPOINT", keyspace="NAMESPACE_OR_KEYSPACE_NAME")
// Before 1.5
const db = client.db('API_ENDPOINT', { namespace: 'NAMESPACE_OR_KEYSPACE_NAME' });
// 1.5 and later
const db = client.db('API_ENDPOINT', { keyspace: 'NAMESPACE_OR_KEYSPACE_NAME' });
// Before 1.5
Database db = client.getDatabase(String apiEndpoint, String namespace);
// 1.5 and later
Database db = client.getDatabase(String apiEndpoint, String keyspace);
The impact to HTTP requests is minimal.
HTTP already accepted either a keyspace or namespace name in the URL path, and most commands used a keyspace
parameter.
curl -sS --location -X POST "ASTRA_DB_ENDPOINT/api/json/v1/NAMESPACE_OR_KEYSPACE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{DATA_API_COMMAND_BODY}'
Upon release, the Astra DB Serverless documentation and client references will use keyspace
in place of namespace
, with the following exceptions:
-
Documentation describing the Astra Portal, which will continue to use
namespace
. -
Some preexisting integration guides and tutorials that rely on a subcomponent, such as a sample app, that is unrelated to the Data API and has a
namespace
object, class, variable, or otherwise. -
Third-party documentation over which DataStax has no influence.