Delete data
To delete a row, send a DELETE
request to
/v2/keyspaces/{keyspace_name}/{table_name}/{primaryKey}
.
For this example, the primary key consists of a partition key firstname
and
clustering column lastname
, so we delete all data with Mookie/Betts
:
curl -s -L -X DELETE https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace/users/Mookie/Betts \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H "Content-Type: application/json"