Collections in WetroCloud store indexed resources for retrieval and query operations. Deleting a collection can help remove outdated data.

When to Use the Delete Endpoint

Use the /v1/collection/delete/ endpoint when:

  • A collection has served its purpose and is no longer needed.
  • Data in a collection must be removed.

To delete a collection, send a DELETE request to the /v1/collection/delete/ endpoint with the required parameters in the body.

Required Parameters

ParameterTypeDescription
collection_idStringThe unique ID of the collection to delete.

Request Example

from wetro import Wetrocloud

# Initialize the Wetrocloud client
client = Wetrocloud(api_key="your_api_key")

# Delete the collection
delete_collection = client.collection.delete_collection(
    collection_id="my_unique_collection_id"
)

print(delete_collection)

Successful Response

Upon successful deletion, the endpoint returns a confirmation message and a success flag.

Example Response

{
  "message": "Collection deleted successfully.",
  "success": true
}
FieldDescription
messageA user-friendly message about the deletion status.
successIndicates whether the deletion was successful.