kb
Delete Collection Api
Changed onDelete 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}
Request
- The document declares no server URL.
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
collection_namestring required
Response
Successful Response
Changes
- warning
added the new
cancelledenum value to the//response property for the response status
- warning