kb
Delete Document Api
Changed onDelete a document and all its associated data.
Args: collection_name: Name of the collection filename: Legacy filename lookup key for backward compatibility
Returns: Deletion result with status, list of deleted doc_ids, and filename
Note: This endpoint prefers file_id or doc_id when provided. The path filename is retained as a compatibility fallback for older clients.
delete/api/kb/collections/{collection_name}/documents/{filename}
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
filenamestring required
Query parameters
file_idstring nullable
Preferred UploadedFile file_id for document lookup
doc_idstring nullable
Preferred doc_id for document lookup
Response
Successful Response
object required
Changes
- info
added the new optional
queryrequest parameterdoc_id - info
added the new optional
queryrequest parameterfile_id
- info