# ItemID

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.ItemID/

Item ID. Can be used to represent any item identity, that can be located natively in M-Files or in external system. E.g. value list item id or object id.

- **Full name:** `MFiles.ItemID`
- **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-internal_id"></a>`internal_id` | `int32` | 1 | The ID of the object or value list item. |
| <a id="f-external_repository_id"></a>`external_repository_id` | [`ExternalRepositoryID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExternalRepositoryID/index.md) | 2 | Used only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault. |

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

## Used by methods

- [IRPCObjectOperations.GetIdentitiesAndViewsOfMultipleUnmanagedReducedItems](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetIdentitiesAndViewsOfMultipleUnmanagedReducedItems/index.md): Gets the identities and view IDs of unmanaged items of an external repository. Used by M-Files clients; not for applications.
- [IRPCViews.CopyView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/CopyView/index.md): Copies a private view that another user has shared, with its child views, into the caller's own views.
- [IRPCViews.EnableShareView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/EnableShareView/index.md): Allows other users to copy the given private views of the caller for a limited time.
- [IRPCViews.GetMultipleViews](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetMultipleViews/index.md): Gets several views of external repositories in one call.
- [IRPCViews.GetView](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetView/index.md): Gets one view of the calling user's view collection, or one external view, as folder data.

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

## Used in fields

- [`ObjectLevelInfo.associated_view_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectLevelInfo/index.md#f-associated_view_id): Identifies the view associated with this object if any.
- [`ObjectLevelInfo.primary_view_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectLevelInfo/index.md#f-primary_view_id): If not null, identifies the primary view of the object that is also the default opening location of the object. Currently applicable only to unmanaged objects.
- [`ObjID.item_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md#f-item_id): The ID of the object within its type, in `item_id.internal_id`.
- [`GetIdentitiesAndViewsOfMultipleUnmanagedReducedItemsResponse.view_ids`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetIdentitiesAndViewsOfMultipleUnmanagedReducedItems/index.md#response): Receives the primary view IDs for the requested objects with read access (represented by ItemID struct.)
- [`GetViewRequest.view_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetView/index.md#request): The view: `internal_id` for a vault view, or `external_repository_id` for an external view.
- [`GetMultipleViewsRequest.utf8szviewids`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/GetMultipleViews/index.md#request): The IDs of the external views, each with `external_repository_id` set.
- [`CopyViewRequest.view_id`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/CopyView/index.md#request): The ID of the shared view (`internal_id`).
- [`EnableShareViewRequest.shared_views`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViews/EnableShareView/index.md#request): The IDs (`internal_id`) of the views to share.
