IRPCThumbnails.GetDocumentFileThumbnail

View as Markdown

Vault API / standard read session idempotent returns metadata structure version

Gets a classic thumbnail or a first-page preview of one file of an object version, as PNG.

ServiceThumbnails MFiles.IRPCThumbnails
gRPC method/MFiles.IRPCThumbnails/GetDocumentFileThumbnail
HTTP (mf-http-grpc)POST /grpc/v1/get-document-file-thumbnail
RequestGetDocumentFileThumbnailRequest
ResponseGetDocumentFileThumbnailResponse
Book and levelVault API, standard
Kindread
SessionRequired: the session ID from LogIn in the mfiles-session-id-bin metadata.
Idempotentyes
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

Request: GetDocumentFileThumbnailRequest

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
obj_verObjVerThe object version that has the file. For a preview, a specific version.
obj_ver.obj_idObjIDThe object.
obj_ver.obj_id.typeint32The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID).
obj_ver.obj_id.item_idItemIDThe ID of the object within its type, in item_id.internal_id.
obj_ver.versionObjVerVersionThe version. Usually OBJ_VER_VERSION_TYPE_SPECIFIC with internal_version.
obj_ver.version.typeObjVerVersionTypeWhat internal_version means. OBJ_VER_VERSION_TYPE_SPECIFIC for a version number.Values: OBJ_VER_VERSION_TYPE_UNINITIALIZED (0), OBJ_VER_VERSION_TYPE_LATEST (1), OBJ_VER_VERSION_TYPE_ANY (2), OBJ_VER_VERSION_TYPE_ALL (3), OBJ_VER_VERSION_TYPE_SPECIFIC (4), OBJ_VER_VERSION_TYPE_VALUE_LIST_ITEM (6), OBJ_VER_VERSION_TYPE_OBJECT_LEVEL_REFERENCE (7).
obj_ver.version.internal_versionint32The version number, starting from 1, when type is OBJ_VER_VERSION_TYPE_SPECIFIC. The server returns -1 with OBJ_VER_VERSION_TYPE_LATEST.
obj_ver.version.external_repository_versionstringUsed only for objects in external repositories. Leave empty.
obj_ver.version.external_repository_sort_keyint64Used only for objects in external repositories. Leave 0.
file_verFileVerThe file and its specific version, as in the File entries of the object version.
file_ver.file_idFileIDThe file.
file_ver.file_id.typeFileIDTypeFILE_IDTYPE_SPECIFIC for one file.Values: FILE_IDTYPE_UNINITIALIZED (0), FILE_IDTYPE_ALL (1), FILE_IDTYPE_ANY (2), FILE_IDTYPE_SPECIFIC (3).
file_ver.file_id.internal_idint32The file ID.
file_ver.file_id.external_repository_idstringUsed only for files in external repositories. Leave empty.
file_ver.typeFileVerTypeFILE_VER_TYPE_SPECIFIC for a file version number.Values: FILE_VER_TYPE_UNINITIALIZED (0), FILE_VER_TYPE_LATEST (1), FILE_VER_TYPE_ANY (2), FILE_VER_TYPE_SPECIFIC (3).
file_ver.internal_versionint32The file version number.
file_ver.external_repository_versionstringUsed only for files in external repositories. Leave empty.
file_ver.external_repository_sort_keyint64Used only for files in external repositories. Leave 0.
typeThumbnailTypeTHUMBNAIL_TYPE_CLASSIC (default) for the cached square thumbnail, or THUMBNAIL_TYPE_PREVIEW for a first-page preview.Values: THUMBNAIL_TYPE_CLASSIC (0), THUMBNAIL_TYPE_CLASSIC_NO_ICON (1), THUMBNAIL_TYPE_PREVIEW (2).
max_widthuint32For a preview, the largest width in pixels. Ignored for classic thumbnails.
max_heightuint32For a preview, the largest height in pixels. Ignored for classic thumbnails. With both max_width and max_height 0, the server uses a default size.

Response: GetDocumentFileThumbnailResponse

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
thumbnail_statusThumbnailStatusWhether a thumbnail was returned: THUMBNAIL_STATUS_GENERATED means thumbnail has data. See the remarks for the other values.Values: THUMBNAIL_STATUS_NO_ACTIONS_ALLOWED (0), THUMBNAIL_STATUS_NOT_GENERATED (1), THUMBNAIL_STATUS_GENERATED (2), THUMBNAIL_STATUS_DO_NOT_GENERATE (3), THUMBNAIL_STATUS_CANNOT_GENERATE (4), THUMBNAIL_STATUS_FAILED_TO_GENERATE (5), THUMBNAIL_STATUS_FAILED_MISSING_DATA_FILE (6).
thumbnail_typeThumbnailTypeThe kind of image returned: THUMBNAIL_TYPE_PREVIEW for a page preview, THUMBNAIL_TYPE_CLASSIC for a classic thumbnail or a file type icon.Values: THUMBNAIL_TYPE_CLASSIC (0), THUMBNAIL_TYPE_CLASSIC_NO_ICON (1), THUMBNAIL_TYPE_PREVIEW (2).
thumbnailbytesThe image as PNG bytes. Empty unless thumbnail_status is THUMBNAIL_STATUS_GENERATED.