IRPCObjectOperations.GetObjectFiles
Vault API / core write session or assertion returns metadata structure version
Gets the files of a specific object version.
| Service | Objects, versions, properties and files MFiles.IRPCObjectOperations |
|---|---|
| gRPC method | /MFiles.IRPCObjectOperations/GetObjectFiles |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-object-files |
| Request | GetObjectFilesRequest |
| Response | GetObjectFilesResponse |
| Book and level | Vault API, core |
| Kind | write |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | no |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Remarks
obj_ver must name a specific version; the OBJ_VER_VERSION_TYPE_LATEST marker fails with "Not
found.". You often do not need this call: the version information returned by the read methods
(ObjectVersion files) already contains the same list. Pass a
returned File.file_ver to
DownloadFile_Begin to download the file.
A caller who cannot read the object gets "Access denied.".
Request: GetObjectFilesRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
obj_ver | ObjVer | The object and a specific version of it. |
obj_ver.obj_id | ObjID | The object. |
obj_ver.obj_id.type | int32 | The 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_id | ItemID | The ID of the object within its type, in item_id.internal_id. |
obj_ver.version | ObjVerVersion | The version. Usually OBJ_VER_VERSION_TYPE_SPECIFIC with internal_version. |
obj_ver.version.type | ObjVerVersionType | What 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_version | int32 | The 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_version | string | Used only for objects in external repositories. Leave empty. |
obj_ver.version.external_repository_sort_key | int64 | Used only for objects in external repositories. Leave 0. |
Response: GetObjectFilesResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
files[] | repeated File | The files of the version, with their IDs, versions, sizes and MD5 checksums. |
files[].file_ver | FileVer | The file and its version. Pass it unchanged in an ObjFileVer to download the file. |
files[].file_ver.file_id | FileID | The file. |
files[].file_ver.type | FileVerType | FILE_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). |
files[].file_ver.internal_version | int32 | The file version number. |
files[].file_ver.external_repository_version | string | Used only for files in external repositories. Leave empty. |
files[].file_ver.external_repository_sort_key | int64 | Used only for files in external repositories. Leave 0. |
files[].title | string | The file name without the extension. |
files[].extension | string | The file name extension without the dot, for example "pdf". |
files[].size | int64 | The size of the file in bytes. Exact when size_precision is FILE_SIZE_PRECISION_EXACT. |
files[].size_precision | FileSizePrecision | How exact size is. Do not rely on size if it is FILE_SIZE_PRECISION_UNKNOWN.Values: FILE_SIZE_PRECISION_EXACT (0), FILE_SIZE_PRECISION_ESTIMATE (1), FILE_SIZE_PRECISION_UNKNOWN (2). |
files[].created_at_utc | google.protobuf.Timestamp | The time in UTC the file was originally created. |
files[].accessed_at_utc | google.protobuf.Timestamp | The time in UTC the file was last accessed (e.g. read). |
files[].written_at_utc | google.protobuf.Timestamp | The time in UTC the file was last written to. |
files[].changed_at_utc | google.protobuf.Timestamp | The time in UTC the file was last written to or its attributes were changed. |
files[].guid | string | GUID of the file. |
files[].md5_checksum | string | The MD5 checksum of the file as 32 lowercase hexadecimal digits, if available. |
files[].is_missing | bool | True, if the file is missing. |
files[].is_content_volatile | bool | True, if the file physical content is volatile. I.e. the physical content can change without the version number change, as long as the logical content is same. The file content is guaranteed to stay physically consistent within single download session only. |
files[].flags | OBJECTFILEFLAGS | Object file flags. |
files[].flags.all | bool | Specifies all flags set; Including any future flags. |
files[].flags.can_be_edited_externally | bool | Next available value. |
files[].master_storage_file_ref | string | An optional File reference (GUID) to external Master Storage API. Only used with Master Storage, otherwise empty. |
Related methods
- DownloadFile_Begin -- Opens a download session for a file version and returns its ID, the content size and, on request, its MD5 checksum.
- GetObjectFilesForModificationInEventHandler -- Gets the files of a checked-out object version for modification by an event handler. Used by server-side vault applications; requires the vault-level right to edit and delete all objects.