IRPCObjectOperations.GetTextContentForFile
Vault API / core read session or assertion idempotent returns metadata structure version
Gets the plain text content of a file version.
| Service | Objects, versions, properties and files MFiles.IRPCObjectOperations |
|---|---|
| gRPC method | /MFiles.IRPCObjectOperations/GetTextContentForFile |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-text-content-for-file |
| Request | GetTextContentForFileRequest |
| Response | GetTextContentForFileResponse |
| Book and level | Vault API, core |
| Kind | read |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | yes |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Remarks
Prefer GetTextContentForFileWithFormat,
which can also return Markdown. With options.useplaintextcache the server returns the text it
uses for full-text indexing, which can differ from a fresh extraction.
Request: GetTextContentForFileRequest
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_file_ver | ObjFileVer | The object and the specific file version. |
obj_file_ver.obj_id | ObjID | The object that owns the file. |
obj_file_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_file_ver.obj_id.item_id | ItemID | The ID of the object within its type, in item_id.internal_id. |
obj_file_ver.file_ver | FileVer | The specific file version, as in File.file_ver. |
obj_file_ver.file_ver.file_id | FileID | The file. |
obj_file_ver.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). |
obj_file_ver.file_ver.internal_version | int32 | The file version number. |
obj_file_ver.file_ver.external_repository_version | string | Used only for files in external repositories. Leave empty. |
obj_file_ver.file_ver.external_repository_sort_key | int64 | Used only for files in external repositories. Leave 0. |
options_obsolete | uint32 | Not used. Set options instead. |
options | TEXTCONTENTEXTRACTIONFLAGS | Extraction flags. Leave unset for a fresh extraction. |
options.all | bool | Specifies all flags set; Including any future flags. |
options.unpackcontainers | bool | Unpack container files. |
options.useplaintextcache | bool | Use plain text cache. This makes other options, such as UNPACKCONTAINERS and max. content size ineffective. The operation returns the text content in same way it is returned for e.g. search indexing. |
Response: GetTextContentForFileResponse
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 |
|---|---|---|
text_content | string | Receives the plain text content of the file version. |
Related methods
- GetTextContentForFileWithFormat -- Gets the text content of a file version as plain text or Markdown, and reports which format was produced.