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

When to Use the Remove Endpoint

Use the /resource/remove/ endpoint when:

  • A resource has served its purpose and is no longer relevant to the collection.
  • Data in a resource needs be removed.

To remove resource from a collection, send a DELETE request to the /resource/remove/ endpoint with the required parameters in the body.

Required Parameters

ParameterTypeDescription
collection_idStringThe unique ID of the collection the resource belongs too
resource_idStringThe unique ID of the resource to delete.

Request Example

from wetro import Wetrocloud

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

# Delete the resource from the collection
delete_response = client.collection.delete_resource(
    collection_id="my_unique_collection_id",
    resource_id="resource_id"
)
print(delete_response)

Successful Response

Upon successful deletion, the endpoint returns a success flag.

Example Response

{
  "success": true
}
FieldDescription
successIndicates whether the deletion was successful.