v4

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-13216144508.7 KB
kb

Delete Collection Api

Delete a collection and all its data.

This function ensures data consistency by attempting physical file deletion before database deletion. If physical deletion fails, the operation is aborted to prevent inconsistent state.

Args: collection_name: Name of the collection to delete

Returns: Deletion result with status, affected documents, and cleanup information

Raises: HTTPException: If physical deletion fails (prevents database deletion)

delete/api/kb/collections/{collection_name}

Path parameters

collection_namestring required

Response

Successful Response

statusstring required

Operation status: success|partial_success|error

collectionstring required

Collection identifier affected by the operation

messagestring required

Human-readable summary of the collection operation

warningsstring[]

Non-fatal issues encountered while processing the collection

deleted_countsobject

Aggregated deletion counts per table when applicable