Document Retrieval
get_document
Get document metadata by ID
get_document
Get document metadata by ID.
Parameters
document_id
(str): ID of the document
Returns
Document
: Document metadata
Example
Document Properties
The Document
object returned by this method has the following properties:
external_id
(str): Unique document identifiercontent_type
(str): Content type of the documentfilename
(Optional[str]): Original filename if availablemetadata
(Dict[str, Any]): User-defined metadatastorage_info
(Dict[str, str]): Storage-related informationsystem_metadata
(Dict[str, Any]): System-managed metadataaccess_control
(Dict[str, Any]): Access control informationchunk_ids
(List[str]): IDs of document chunks
Document Methods
The Document
object also provides the following methods:
update_with_text()
: Update the document with new text contentupdate_with_file()
: Update the document with content from a fileupdate_metadata()
: Update the document’s metadata only