• Glossary
  • Support
  • Downloads
  • DataStax Home
Get Live Help
Expand All
Collapse All

DataStax Astra DB Classic Documentation

    • Overview
      • Release notes
      • Astra DB FAQs
      • Astra DB glossary
      • Get support
    • Getting Started
      • Grant a user access
      • Load and retrieve data
        • Use DSBulk to load data
        • Use Data Loader in Astra Portal
      • Connect a driver
      • Build sample apps
      • Use integrations
        • Connect with DataGrip
        • Connect with DBSchema
        • Connect with JanusGraph
        • Connect with Strapi
    • Planning
      • Plan options
      • Database regions
    • Securing
      • Security highlights
      • Security guidelines
      • Default user permissions
      • Change your password
      • Reset your password
      • Authentication and Authorization
      • Astra DB Plugin for HashiCorp Vault
    • Connecting
      • Connecting to a VPC
      • Connecting Change Data Capture (CDC)
      • Connecting CQL console
      • Connect the Spark Cassandra Connector to Astra
      • Drivers for Astra DB
        • Connecting C++ driver
        • Connecting C# driver
        • Connecting Java driver
        • Connecting Node.js driver
        • Connecting Python driver
        • Drivers retry policies
      • Connecting Legacy drivers
      • Get Secure Connect Bundle
    • Migrating
      • FAQs
      • Preliminary steps
        • Feasibility checks
        • Deployment and infrastructure considerations
        • Create target environment for migration
        • Understand rollback options
      • Phase 1: Deploy ZDM Proxy and connect client applications
        • Set up the ZDM Automation with ZDM Utility
        • Deploy the ZDM Proxy and monitoring
          • Configure Transport Layer Security
        • Connect client applications to ZDM Proxy
        • Manage your ZDM Proxy instances
      • Phase 2: Migrate and validate data
      • Phase 3: Enable asynchronous dual reads
      • Phase 4: Change read routing to Target
      • Phase 5: Connect client applications directly to Target
      • Additional resources
        • Glossary
        • Troubleshooting
          • Troubleshooting tips
          • Troubleshooting scenarios
        • Contribution guidelines
        • Release Notes
    • Managing
      • Managing your organization
        • User permissions
        • Pricing and billing
        • Audit Logs
        • Configuring SSO
          • Configure SSO for Microsoft Azure AD
          • Configure SSO for Okta
          • Configure SSO for OneLogin
      • Managing your database
        • Create your database
        • View your databases
        • Database statuses
        • Use DSBulk to load data
        • Use Data Loader in Astra Portal
        • Monitor your databases
        • Manage multiple keyspaces
        • Using multiple regions
        • Terminate your database
        • Resize your classic database
        • Park your classic database
        • Unpark your classic database
      • Managing with DevOps API
        • Managing database lifecycle
        • Managing roles
        • Managing users
        • Managing tokens
        • Managing multiple regions
        • Get private endpoints
        • AWS PrivateLink
        • Azure PrivateLink
        • GCP Private Service
    • Astra CLI
    • Developing with Stargate APIs
      • Develop with REST
      • Develop with Document
      • Develop with GraphQL
        • Develop with GraphQL (CQL-first)
        • Develop with GraphQL (Schema-first)
      • Develop with gRPC
        • gRPC Rust client
        • gRPC Go client
        • gRPC Node.js client
        • gRPC Java client
      • Develop with CQL
      • Tooling Resources
      • Node.js Document API client
      • Node.js REST API client
    • Stargate QuickStarts
      • Document API QuickStart
      • REST API QuickStart
      • GraphQL API CQL-first QuickStart
    • API References
      • DevOps REST API v2
      • Stargate Document API v2
      • Stargate REST API v2
  • DataStax Astra DB Classic Documentation
  • DataStax Astra DB Data API

DataStax Astra DB Data API

Table of Contents
  • 1. Access
  • 2. Endpoints
    • 2.1. Authorization
      • 2.1.1. createToken
    • 2.2. Columns
      • 2.2.1. addColumn
      • 2.2.2. deleteColumn
      • 2.2.3. getColumn
      • 2.2.4. getColumns
      • 2.2.5. updateColumn
    • 2.3. Keyspaces
      • 2.3.1. getKeyspaces
    • 2.4. Rows
      • 2.4.1. addRow
      • 2.4.2. deleteRow
      • 2.4.3. getRows
      • 2.4.4. query
      • 2.4.5. updateRow
    • 2.5. Tables
      • 2.5.1. addTable
      • 2.5.2. deleteTable
      • 2.5.3. getTable
      • 2.5.4. getTables
  • 3. Models
    • 3.1. AuthTokenResponse
    • 3.2. Changeset
    • 3.3. ClusteringExpression
    • 3.4. Column
    • 3.5. ColumnDefinition
    • 3.6. ColumnUpdate
    • 3.7. ColumnsResponse
    • 3.8. Credentials
    • 3.9. Error
    • 3.10. Filter
    • 3.11. PrimaryKey
    • 3.12. Query
    • 3.13. RowAdd
    • 3.14. Rows
    • 3.15. RowsResponse
    • 3.16. RowsUpdate
    • 3.17. Table
    • 3.18. TableAdd
    • 3.19. TableOptions
    • 3.20. TablesResponse
Abstract
Use this REST API to interact with your Astra DB databases.</br> </br> To get started, create an authorization token to authenticate with your database. After connecting, you can interact with the following database objects: </br>- <b>Tables</b>: Create, update, and delete tables within a keyspace. </br>- <b>Columns</b>: Add, update, and delete columns in a table. </br>- <b>Rows</b>: Add, update, and delete rows in a table.

1. Access

  • HTTP Basic Authentication BasicAuth

2. Endpoints

2.1. Authorization

2.1.1. createToken

POST /api/rest/v1/auth

Create an auth token

Description

Generate an authorization token to authenticate with an Astra DB database and submit queries.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

Body Parameter
Name Description Required Default Pattern

Credentials

Credentials

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

AuthTokenResponse

Content Type
  • /

Responses
Table 1. http response codes
Code Message Datatype

201

Created

AuthTokenResponse

400

Bad Request

Error

401

Unauthorized

Error

500

Internal Server Error

Error

Samples

2.2. Columns

2.2.1. addColumn

POST /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/columns

Add a column

Description

Add a single column to a table.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

Body Parameter
Name Description Required Default Pattern

ColumnDefinition

ColumnDefinition

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

ColumnsResponse

Content Type
  • application/json

Responses
Table 2. http response codes
Code Message Datatype

201

OK

ColumnsResponse

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

409

Conflict

Error

500

Internal Server Error

Error

Samples

2.2.2. deleteColumn

DELETE /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/columns/{columnName}

Delete a column

Description

Delete a single column in a specific table.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

columnName

Name of the column to use for the request.

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 3. http response codes
Code Message Datatype

204

No Content

<<>>

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

500

Internal Server Error

Error

Samples

2.2.3. getColumn

GET /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/columns/{columnName}

Retrieve a column

Description

Return a single column specification in a specific table.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

columnName

Name of the column to use for the request.

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 4. http response codes
Code Message Datatype

200

OK

<<>>

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

404

Not Found

Error

500

Internal Server Error

Error

Samples

2.2.4. getColumns

GET /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/columns

Retrieve all columns

Description

Return all columns for a specified table.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

array[ColumnDefinition]

Content Type
  • application/json

Responses
Table 5. http response codes
Code Message Datatype

200

OK

List[ColumnDefinition]

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

500

Internal Server Error

Error

Samples

2.2.5. updateColumn

PUT /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/columns/{columnName}

Update a column

Description

Update a single column in a specific table.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

columnName

Name of the column to use for the request.

X

null

Body Parameter
Name Description Required Default Pattern

ColumnUpdate

ColumnUpdate

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

ColumnsResponse

Content Type
  • application/json

Responses
Table 6. http response codes
Code Message Datatype

200

OK

ColumnsResponse

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

404

Not Found

Error

500

Internal Server Error

Error

Samples

2.3. Keyspaces

2.3.1. getKeyspaces

GET /api/rest/v1/keyspaces

Return all keyspaces

Description

Retrieve all available keyspaces in the specific database.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

[List]

Content Type
  • application/json

Responses
Table 7. http response codes
Code Message Datatype

200

OK

List[[string]]

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

500

Internal Server Error

Error

Samples

2.4. Rows

2.4.1. addRow

POST /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/rows

Add rows

Description

Add rows to a table in your database. If the new row has the same primary key as that of an existing row, the database processes it as an update to the existing row.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

Body Parameter
Name Description Required Default Pattern

RowAdd

Row object that needs to be added to the table RowAdd

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

RowsResponse

Content Type
  • application/json

Responses
Table 8. http response codes
Code Message Datatype

201

Created

RowsResponse

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

500

Internal Server Error

Error

Samples

2.4.2. deleteRow

DELETE /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/rows/{primaryKey}

Delete rows

Description

Delete individual rows from a table.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

primaryKey

Value from the primary key column for the table. Define composite keys by separating values with semicolons (`val1;val2…​`) in the order they were defined. </br> For example, if the composite key was defined as `PRIMARY KEY(race_year, race_name)` then the primary key in the path would be `race_year;race_name`.

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 9. http response codes
Code Message Datatype

204

No Content

<<>>

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

500

Internal Server Error

Error

Samples

2.4.3. getRows

GET /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/rows/{primaryKey}

Retrieve rows

Description

Get rows from a table based on the primary key.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

primaryKey

Value from the primary key column for the table. Define composite keys by separating values with semicolons (`val1;val2…​`) in the order they were defined. </br> For example, if the composite key was defined as `PRIMARY KEY(race_year, race_name)` then the primary key in the path would be `race_year;race_name`.

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

Rows

Content Type
  • application/json

Responses
Table 10. http response codes
Code Message Datatype

200

OK

Rows

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

404

Not Found

Error

500

Internal Server Error

Error

Samples

2.4.4. query

POST /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/rows/query

Submit queries

Description

Submit queries to retrieve data from a table.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

Body Parameter
Name Description Required Default Pattern

Query

Query

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

Rows

Content Type
  • application/json

Responses
Table 11. http response codes
Code Message Datatype

200

OK

Rows

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

500

Internal Server Error

Error

Samples

2.4.5. updateRow

PUT /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}/rows/{primaryKey}

Update rows

Description

Update existing rows in a table.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

primaryKey

Value from the primary key column for the table. Define composite keys by separating values with semicolons (`val1;val2…​`) in the order they were defined. </br> For example, if the composite key was defined as `PRIMARY KEY(race_year, race_name)` then the primary key in the path would be `race_year;race_name`.

X

null

Body Parameter
Name Description Required Default Pattern

RowsUpdate

The result of the update command RowsUpdate

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

RowsResponse

Content Type
  • application/json

Responses
Table 12. http response codes
Code Message Datatype

200

OK

RowsResponse

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

500

Internal Server Error

Error

Samples

2.5. Tables

2.5.1. addTable

POST /api/rest/v1/keyspaces/{keyspaceName}/tables

Add a table

Description

Add a table in a specific keyspace.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

Body Parameter
Name Description Required Default Pattern

TableAdd

Table object that needs to be added to the keyspace TableAdd

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

TablesResponse

Content Type
  • /

Responses
Table 13. http response codes
Code Message Datatype

201

Created

TablesResponse

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

500

Internal Server Error

Error

Samples

2.5.2. deleteTable

DELETE /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}

Delete a table

Description

Delete a single table in the specified keyspace.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

-

Content Type
  • /

Responses
Table 14. http response codes
Code Message Datatype

204

No Content

<<>>

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

404

Not Found

Error

500

Internal Server Error

Error

Samples

2.5.3. getTable

GET /api/rest/v1/keyspaces/{keyspaceName}/tables/{tableName}

Return a table

Description

Retrieve data for a single table in a specific keyspace.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

tableName

Name of the table to use for the request.

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

Table

Content Type
  • /

Responses
Table 15. http response codes
Code Message Datatype

200

OK

Table

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

404

Not Found

Error

500

Internal Server Error

Error

Samples

2.5.4. getTables

GET /api/rest/v1/keyspaces/{keyspaceName}/tables

Return all tables

Description

Retrieve all tables in a specific keyspace.

Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra DB URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspaceName

Name of the keyspace to use for the request.

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

X-Cassandra-Request-Id

Unique identifier (UUID) for the request. Use any valid UUID.

-

null

Return Type

[List]

Content Type
  • /

Responses
Table 16. http response codes
Code Message Datatype

200

OK

List[[string]]

400

Bad request

Error

401

Unauthorized

Error

403

Forbidden

Error

500

Internal Server Error

Error

Samples

3. Models

3.1. AuthTokenResponse

Field Name Required Type Description Format

authToken

String

3.2. Changeset

Field Name Required Type Description Format

column

X

String

Name of the column to update.

value

X

anyOf<string,number,integer,boolean>

The value to update in the column for all matching rows.

3.3. ClusteringExpression

Order rows storage to make use of the on-disk sorting of columns. Specifying order can make query results more efficient.

Field Name Required Type Description Format

column

X

String

order

X

String

Enum: ASC, DESC,

3.4. Column

Defines a single column within a row that is being added to a table.

Field Name Required Type Description Format

name

X

String

Name of the column in the database.

value

X

anyOf<string,number,integer,boolean>

The value to store in the column, which can be either a literal or collection.

3.5. ColumnDefinition

Field Name Required Type Description Format

name

X

String

Name for the column, which must be unique.

typeDefinition

X

String

The type of data allowed in the column.

Enum: ascii, text, varchar, tinyint, smallint, int, bigint, varint, decimal, float, double, date, DateRangeType, duration, time, timestamp, uuid, timeuuid, blob, boolean, counter, inet, PointType, LineStringType, PolygonType, frozen, list, map, set, tuple,

static

Boolean

Denotes whether the column is shared by all rows of a partition.

3.6. ColumnUpdate

Changes the name of a primary key column and preserves the existing values.

Field Name Required Type Description Format

newName

String

The new name of the column.

3.7. ColumnsResponse

Field Name Required Type Description Format

success

Boolean

3.8. Credentials

User credentials for authenticating with your Astra DB database.

Field Name Required Type Description Format

username

X

String

Client ID for your Astra DB database.

password

X

String

Client Secret for your Astra DB database user.

3.9. Error

A description of an error state

Field Name Required Type Description Format

description

String

A human readable description of the error state

internalCode

String

The internal number referencing the error state

3.10. Filter

Field Name Required Type Description Format

columnName

String

The column name to apply the filter to.

operator

String

Enum: eq, notEq, gt, gte, lt, lte, in,

value

List of [string]

An array of values to use in the filter. The full array will only be used for the `in` operation, for all others only the first element will be considered.

3.11. PrimaryKey

Defines a column list for the primary key. Can be either a single column, compound primary key, or composite partition key. Provide multiple columns for the partition key to define a composite partition key.

Field Name Required Type Description Format

partitionKey

X

List of [string]

Name of the column or columns that constitute the partition key.

clusteringKey

List of [string]

Name of the column or columns that constitute the clustering key.

3.12. Query

Field Name Required Type Description Format

columnNames

List of [string]

A list of column names to return in the result set. An empty array returns all columns.

filters

X

List of Filter

An array of filters to return results for, separated by `AND`. For example, `a > 1 AND b != 1`.

orderBy

ClusteringExpression

pageState

String

A string returned from previous query requests representing the paging state.

pageSize

Integer

The size of the page to return in the result set.

3.13. RowAdd

Field Name Required Type Description Format

columns

X

List of Column

3.14. Rows

Field Name Required Type Description Format

rows

List of [object]

_count

Integer

pageState

String

A string representing the paging state to be used on future paging requests.

3.15. RowsResponse

Field Name Required Type Description Format

success

Boolean

rowsModified

Integer

3.16. RowsUpdate

Field Name Required Type Description Format

changeset

X

List of Changeset

The values for the named parameters used in the setExpression field

3.17. Table

Field Name Required Type Description Format

name

String

keyspace

String

columnDefinitions

List of ColumnDefinition

primaryKey

PrimaryKey

tableOptions

TableOptions

3.18. TableAdd

Field Name Required Type Description Format

name

X

String

ifNotExists

Boolean

Determines whether to create a new table if a table with the same name exists. Attempting to create an existing table returns an error unless this option is true.

columnDefinitions

X

List of ColumnDefinition

primaryKey

X

PrimaryKey

tableOptions

TableOptions

3.19. TableOptions

Field Name Required Type Description Format

defaultTimeToLive

Integer

Defines the Time To Live (TTL), which determines the time period (in seconds) to expire data. If the value is >0, TTL is enabled for the entire table and an expiration timestamp is added to each column. The maximum value is 630720000 (20 years). A new TTL timestamp is calculated each time the data is updated and the row is removed after the data expires.

clusteringExpression

List of ClusteringExpression

3.20. TablesResponse

Field Name Required Type Description Format

success

Boolean

General Inquiries: +1 (650) 389-6000 info@datastax.com

© DataStax | Privacy policy | Terms of use

DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.

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.

landing_page landingpage