# FileID

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

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

Identifies a file of an object across its versions.

- **Full name:** `MFiles.FileID`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-type"></a>`type` | [`FileIDType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileIDType/index.md) | 1 | `FILE_IDTYPE_SPECIFIC` for one file. Values: `FILE_IDTYPE_UNINITIALIZED` (0), `FILE_IDTYPE_ALL` (1), `FILE_IDTYPE_ANY` (2), `FILE_IDTYPE_SPECIFIC` (3). |
| <a id="f-internal_id"></a>`internal_id` | `int32` | 2 | The file ID. |
| <a id="f-external_repository_id"></a>`external_repository_id` | `string` | 3 | Used only for files in external repositories. Leave empty. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCObjectOperations.ConvertToPDF](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/ConvertToPDF/index.md): Converts the specified object file to PDF format.
- [IRPCObjectOperations.DownloadFile](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile/index.md): Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP gateway.
- [IRPCObjectOperations.GetFileDownloadUrl](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetFileDownloadUrl/index.md): Not available over native gRPC: the server answers "Not implemented.". Used by the M-Files HTTP gateway.
- [IRPCObjectOperations.GetLatestFileVersion](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetLatestFileVersion/index.md): Gets the latest version of a file and the object version it belongs to.
- [IRPCObjectOperations.UpdateMetadataInFile](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/UpdateMetadataInFile/index.md): Writes the object's metadata into the properties embedded in its files (for formats that support it).

<a id="used-in-fields"></a>

## Used in fields

- [`FileDownloadUrlRequestData.file_ids`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileDownloadUrlRequestData/index.md#f-file_ids): File IDs in the object version to download with the key. Not used if uploadID is not zero or fileRef is not empty.
- [`FileInfoForFIX.file_ids`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileInfoForFIX/index.md#f-file_ids): All file IDs of the object's LCI version.
- [`FileVer.file_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileVer/index.md#f-file_id): The file.
- [`ObjectDataForIX.updated_files`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectDataForIX/index.md#f-updated_files): Identifies the files that have been updated.
- [`ObjectSkippedIndexingState.file_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectSkippedIndexingState/index.md#f-file_id): The file ID or zero if not managed file.
- [`ObjectVersion.primary_file`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersion/index.md#f-primary_file): File ID of the primary file of a multi-file object, if the object is a multi-file object.
- [`ObjVerInfoForMIX.updated_files`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVerInfoForMIX/index.md#f-updated_files): The IDs of the updated object files.
- [`GetLatestFileVersionRequest.file_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetLatestFileVersion/index.md#request): The file, as `File.file_ver.file_id`.
- [`ConvertToPDFRequest.file_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/ConvertToPDF/index.md#request): The file id. If the file id part is empty / -1 then all files of the object version are converted.
- [`UpdateMetadataInFileRequest.file_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/UpdateMetadataInFile/index.md#request): The file which is updated. IF the file part of the ID is empty then all files are updated.
- [`DownloadFileRequest.file_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DownloadFile/index.md#request): File ID.
- [`GetFileDownloadUrlRequest.file_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetFileDownloadUrl/index.md#request): File ID.
