Skip to main content
Version: 2025.11

FileRevision

Description: Represents a single revision of a file.

Attributes

NameTypeDescription
idStrictStr
createddatetime.datetime
file_idOptional[StrictStr]
content_tokenToken
properties_tokenToken
archive_status_historyList[FileRevisionArchiveStatus]
nameOptional[StrictStr]
stemOptional[StrictStr]
suffixOptional[StrictStr]
extensionOptional[StrictStr]
descriptionOptional[StrictStr]
sizeOptional[StrictInt]
mimeOptional[StrictStr]
version_nameOptional[StrictStr]
external_identifierOptional[StrictStr]
display_nameOptional[StrictStr]
sourcesOptional[List[Source]]
productsOptional[List[Product]]
created_by_idOptional[StrictStr]
updatedOptional[datetime.datetime]

Methods

NameDescription
source_revision_idsReturn a list of revision IDs from the sources associated with this revision.
source_product_idsReturn a list of revision IDs from the products associated with this revision.
read_bytesRead and return the raw file content for this revision.
to_strReturn the string representation of the model using field aliases.
to_jsonReturn the JSON string representation of the model using field aliases.
from_jsonCreate an instance of the model from a JSON string.
to_dictReturn the dictionary representation of the model using field aliases.
from_dictCreate an instance of the model from a dictionary.
from_storage_revisionCreate a FileRevision from a core storage-layer revision.
read_textRead the contents as decoded text.
copy_toCopy the contents to a local file.
read_jsonParse the contents as JSON.
cleanup_cacheClean up cached files if they exist.
get_cache_statsGet filesystem cache statistics.
archiveArchive the current item using the client’s archive method for this resource type.
restoreRestore the current item using the client’s restore method for this resource type.