# IRPCDocumentOperationsFileIOInternal.GetFileOutline

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Server integration API](https://developer.m-files.com/APIs/gRPC-API/integration/index.md) > [Document file I/O for server components](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocumentOperationsFileIOInternal/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocumentOperationsFileIOInternal/GetFileOutline/

Badges: `Server integration API / specialized` `internal: not for applications` `write` `session or assertion` `returns metadata structure version`

Gets the size and MD5 checksum of a file version.

- **Service:** [Document file I/O for server components](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocumentOperationsFileIOInternal/index.md) `MFiles.IRPCDocumentOperationsFileIOInternal`
- **gRPC method:** `/MFiles.IRPCDocumentOperationsFileIOInternal/GetFileOutline`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-file-outline`
- **Request:** [`GetFileOutlineRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocumentOperationsFileIOInternal/GetFileOutline/index.md#request)
- **Response:** [`GetFileOutlineResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocumentOperationsFileIOInternal/GetFileOutline/index.md#response)
- **Book and level:** Server integration API, specialized
- **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)

<a id="remarks"></a>

## Remarks

**For M-Files components only.** M-Files Server calls it on another M-Files Server. Applications
should use [GetFileSize](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetFileSize/index.md), or the `file_outline` of
[DownloadFile_Begin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile_Begin/index.md) with `need_checksum`.
- Read-only. Requires a vault session of a login that has a user account in the vault and read
  access to the object; works for a normal user.
- `obj_file_ver.file_ver` must name a specific file version; `FILE_VER_TYPE_LATEST` fails with
  "Not found. (File <id>-0 not found.)". Files of external (unmanaged) objects
  are not supported.

<a id="request"></a>

## Request: GetFileOutlineRequest

> 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`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjFileVer/index.md) | The object and the specific file version. |
| `obj_file_ver.obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | 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`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The ID of the object within its type, in `item_id.internal_id`. |
| `obj_file_ver.file_ver` | [`FileVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileVer/index.md) | The specific file version, as in `File.file_ver`. |
| `obj_file_ver.file_ver.file_id` | [`FileID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileID/index.md) | The file. |
| `obj_file_ver.file_ver.type` | [`FileVerType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileVerType/index.md) | `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. |

<a id="response"></a>

## Response: GetFileOutlineResponse

> 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 |
|---|---|---|
| `data_file_version` | `int32` | The version of the stored data file of this file version. |
| `file_outline` | [`FileOutline`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileOutline/index.md) | `size` in bytes (`size_precision` is `FILE_SIZE_PRECISION_EXACT`) and `md5_checksum` as 32 hexadecimal digits. |
| `file_outline.size` | `int64` | The size of the content in bytes, in the downloaded format. |
| `file_outline.size_precision` | [`FileSizePrecision`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileSizePrecision/index.md) | The file size precision. If the file size precision is 'exact', the size can be used for reading the file content. If the precision is 'unknown', the size field should not be used at all. Values: `FILE_SIZE_PRECISION_EXACT` (0), `FILE_SIZE_PRECISION_ESTIMATE` (1), `FILE_SIZE_PRECISION_UNKNOWN` (2). |
| `file_outline.md5_checksum` | `string` | The MD5 checksum as 32 hexadecimal digits, if requested; 32 zeros otherwise. |

<a id="related"></a>

## Related methods

- [IRPCObjectOperations.GetFileSize](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetFileSize/index.md): Gets the size of a specific file version in bytes.
- [IRPCObjectOperations.DownloadFile_Begin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile_Begin/index.md): Opens a download session for a file version and returns its ID, the content size and, on request, its MD5 checksum.
