Drop a collection (HTTP)
|
For details about additional languages, see: |
Deletes a collection from a database and erases all data stored in the collection.
|
Ready to write code? See the examples for this method to get started. |
Result
Deletes the specified collection from the database and erases all data stored in the collection.
If the command succeeds, the response indicates the success.
Example response:
{
"status": {
"ok": 1
}
}
Parameters
Use the deleteCollection command.
Command signature
curl -sS -L -X POST "API_ENDPOINT/api/json/v1/KEYSPACE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"deleteCollection": {
"name": "COLLECTION_NAME"
}
}'
| Name | Type | Summary |
|---|---|---|
|
|
The name of the collection to delete. |
Examples
The following examples demonstrate how to drop a collection.
curl -sS -L -X POST "API_ENDPOINT/api/json/v1/KEYSPACE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"deleteCollection": {
"name": "COLLECTION_NAME"
}
}'