Skip to main content

Usage

Parameters

  • filename (str): Filename of the document to delete

Returns

A dictionary containing information about the deletion operation:
  • message (str): A success message indicating the document was deleted
  • document_id (str): The ID of the deleted document
  • Additional fields may be present with more details about the operation

Description

This method is a convenience wrapper that:
  1. Retrieves the document ID by filename using get_document_by_filename
  2. Deletes the document using delete_document
This operation is permanent and cannot be undone.

Multiple Documents with Same Filename

If multiple documents have the same filename, this method will delete the most recently updated one. To delete a specific document when duplicates exist, use delete_document with the exact document ID instead.

Notes

  • This operation requires appropriate permissions for the document.
  • If no document exists with the specified filename, a ValueError will be raised.