capturegraph.api_models.responses
#
CaptureGraph API Response Models#
Pydantic models for API responses from the CaptureGraph server. These models are shared between capturegraph-server and capturegraph-sync.
FileHashResponse
#
Bases: BaseModel
Response from the load/file/hash endpoint.
The server returns either: - file_data_base64: For small files, the complete file data - file_hash_base64: For large files, a hash for comparison - file_missing: True if the file doesn't exist - file_extension: The actual file extension on the server (without dot)
Source code in capturegraph-lib/capturegraph/api_models/responses.py
get_identifier()
#
Get a unique identifier for this file's current state.
Only returns an identifier for large files (where server provides a hash). For small files (where data is returned directly), returns None so the file is always re-downloaded - this is fine since the data is already included in the hash response anyway.