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/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/delete/ endpoint with the required parameters in the body.

Required Parameters

ParameterTypeDescription
collection_idStringThe unique ID of the collection to delete.

Request Example

curl --request DELETE \
  --url https://api.wetrocloud.com/v1/delete/ \
  --header 'Authorization: Token <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
        "collection_id": "<collection_id>",
  }'

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.