Dropping a table in your keyspace


  1. Get an application token.

  2. Create a table in your keyspace

  3. You may wish to list all the tables to verify the table name for the table you wish to drop:

  • cURL command (/v2)

  • Result

curl -s -L -X GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace/tables \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Dropping a table

Send a DELETE request to /api/rest/v2/schemas/keyspaces/{keyspace_name}/tables/{table_name} to delete a table. All data will be deleted along with the table schema.

curl -s --location \
--request DELETE https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace/tables/users \
--header "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
--header "Content-Type: application/json"

If the call is successful, a 204 message is returned.