# IRPCObjectTypes.GetObjectType

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Object types](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/index.md)

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

Badges: `Vault API / core` `write` `session or assertion` `returns metadata structure version`

Gets one object type or value list by ID, with its icon.

- **Service:** [Object types](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/index.md) `MFiles.IRPCObjectTypes`
- **gRPC method:** `/MFiles.IRPCObjectTypes/GetObjectType`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-object-type`
- **Request:** [`GetObjectTypeRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectType/index.md#request)
- **Response:** [`GetObjectTypeResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectType/index.md#response)
- **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)

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

## Remarks

- Requires a vault session. No special vault rights are needed.
- Accepts any ID from the shared object type / value list ID space: a real object type (for
  example 136) or a plain value list (for example 154) both work. Only real object types carry
  an icon.
- An ID that does not exist fails with the error message "Not found." (gRPC status `UNKNOWN`).
- An object type that the user cannot see is returned with empty names and
  `object_type_permissions.can_user_see` false; it does not fail.
- Cacheable by metadata structure version.
- Related: [GetValueList](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/GetValueList/index.md) returns the same data
  without the icon.

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

## Request: GetObjectTypeRequest

> 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 |
|---|---|---|
| `callimp` | [`CallImportance`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.CallImportance/index.md) | The importance level of this call. Leave unset or use `CALL_IMPORTANCE_NORMAL`. Values: `CALL_IMPORTANCE_DEFAULT` (0), `CALL_IMPORTANCE_NORMAL` (1), `CALL_IMPORTANCE_CAN_BE_REJECTED` (2). |
| `object_type` | `int32` | The ID of the object type or value list to get. |

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

## Response: GetObjectTypeResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page. Fields marked (recursive) refer to a type already on their path.

| Field | Type | Description |
|---|---|---|
| `putf8szobjtypebasic` | [`ValueList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueList/index.md) | The object type or value list. See [ValueList](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueList/index.md). |
| `putf8szobjtypebasic.id` | `int32` | The ID of the object type or value list. Object types and value lists share one ID space; property definition IDs and item IDs are separate spaces. |
| `putf8szobjtypebasic.name_singular` | `string` | The singular name, for example "Customer". Empty if the caller is not allowed to see the list. |
| `putf8szobjtypebasic.name_plural` | `string` | The plural name, for example "Customers". Empty if the caller is not allowed to see the list. |
| `putf8szobjtypebasic.icon` | `bytes` | The icon in .ICO format. Filled only by GetObjectTypes and GetObjectType, and only for real object types; empty in GetValueLists and GetValueList. |
| `putf8szobjtypebasic.is_real_object_type` | `bool` | True for an object type, whose items are objects (documents, customers); false for a plain value list (Country, Classes, Users). |
| `putf8szobjtypebasic.is_hierarchical` | `bool` | True if items can have a parent item in the same list (`ValueListItem.has_parent`). |
| `putf8szobjtypebasic.has_owner` | `bool` | True if every item belongs to an item of another list, the owner list (`owner_object_type`). For example, contact persons are owned by customers. |
| `putf8szobjtypebasic.owner_object_type` | `int32` | With `has_owner`, the ID of the owner list or object type. |
| `putf8szobjtypebasic.owner_property_def` | `int32` | Owner property def. Subobjects of objects of this object type have this property in their meta data for describing owner relationships. |
| `putf8szobjtypebasic.options` | [`OBJTYPEFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OBJTYPEFLAGS/index.md) | Flags of the list, for example `can_add_items` and `is_external`. See [OBJTYPEFLAGS](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OBJTYPEFLAGS/index.md). |
| `putf8szobjtypebasic.options.all` | `bool` | Specifies all flags set; Including any future flags. |
| `putf8szobjtypebasic.options.can_have_files` | `bool` | Can objects have files? |
| `putf8szobjtypebasic.options.can_add_items` | `bool` | True if new items (value lists) or new objects (object types) can be added. The caller also needs `ValueList.object_type_permissions.can_user_add_new_items`. |
| `putf8szobjtypebasic.options.is_external` | `bool` | True if the list is marked external. Built-in lists such as Users (6), Workflows (7) and User groups (16) also have this flag. |
| `putf8szobjtypebasic.options.show_new_object_command_in_task_pane` | `bool` | Show the creation command for this type in the task pane? |
| `putf8szobjtypebasic.options.is_external_connection_disabled` | `bool` | Is external connection currently disabled? |
| `putf8szobjtypebasic.options.is_translatable` | `bool` | Can the contents of value list or object type be translated? |
| `putf8szobjtypebasic.options.is_separate_property_storage` | `bool` | True if the object type has its own storage of property values for searches. |
| `putf8szobjtypebasic.options.disallow_as_grouping_level` | `bool` | Is using this object type as a grouping level in views disallowed? |
| `putf8szobjtypebasic.options.basic` | `bool` | Is basic tier object type? |
| `putf8szobjtypebasic.default_property_def` | `int32` | The ID of the lookup property definition that refers to items of this list by default, for example 1079 (Customer) for the Customer object type. |
| `putf8szobjtypebasic.read_only_properties_during_insert[]` | repeated `int32` | The propertydef IDs of those properties that cannot be entered during the creation of a new object because they are not included in the INSERT INTO statement. |
| `putf8szobjtypebasic.read_only_properties_during_update[]` | repeated `int32` | The propertydef IDs of those properties that cannot be entered during the editing of an existing object because they are not included in the UPDATE statement. |
| `putf8szobjtypebasic.targets_for_browsing[]` | repeated [`ObjectTypeTargetForBrowsing`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeTargetForBrowsing/index.md) | Object type targets for browsing. |
| `putf8szobjtypebasic.targets_for_browsing[].target_object_type` | `int32` | The ID of the target object type. |
| `putf8szobjtypebasic.targets_for_browsing[].view` | `int32` | The ID of the view collection where instances of the target object type are being browsed. This view collection resides in the predefined Built-in Views view folder. |
| `putf8szobjtypebasic.acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | Specifies the ACL that defines the visibility and other permission settings of this object type. Also specifies who can add new items to this object type. |
| `putf8szobjtypebasic.acl.checked_out_to_user` | `int32` | Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist. |
| `putf8szobjtypebasic.acl.is_fully_authoritative` | `bool` | Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version. |
| `putf8szobjtypebasic.acl.custom_component` | [`AccessControlListComponent`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponent/index.md) | Accesses the custom component of this ACL. |
| `putf8szobjtypebasic.acl.restrictive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the restrictive automatic components of this ACL. |
| `putf8szobjtypebasic.acl.secondary_access_control_list` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) (recursive) | Secondary ACL used for latest version ACL. Not used for access check if null. |
| `putf8szobjtypebasic.acl.additive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the additive automatic components of this ACL. |
| `putf8szobjtypebasic.object_type_permissions` | [`ObjectTypePermissionsForClient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypePermissionsForClient/index.md) | What the caller may do with the list: see it (`can_user_see`) and add items or objects (`can_user_add_new_items`). Filled by the read calls of IRPCObjectTypes and IRPCValueLists. |
| `putf8szobjtypebasic.object_type_permissions.can_user_see` | `bool` | The object type is visible for the current user (provided for symmetry). |
| `putf8szobjtypebasic.object_type_permissions.can_user_add_new_items` | `bool` | The current user can add new items. |
| `putf8szobjtypebasic.default_acl_for_objects` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | Default ACL for new items/objects of this type. If unset, the global default is used (vlitems: read access to all internal users; real objects: full control for all internal users). |
| `putf8szobjtypebasic.default_acl_for_objects.checked_out_to_user` | `int32` | Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist. |
| `putf8szobjtypebasic.default_acl_for_objects.is_fully_authoritative` | `bool` | Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version. |
| `putf8szobjtypebasic.default_acl_for_objects.custom_component` | [`AccessControlListComponent`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponent/index.md) | Accesses the custom component of this ACL. |
| `putf8szobjtypebasic.default_acl_for_objects.restrictive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the restrictive automatic components of this ACL. |
| `putf8szobjtypebasic.default_acl_for_objects.secondary_access_control_list` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) (recursive) | Secondary ACL used for latest version ACL. Not used for access check if null. |
| `putf8szobjtypebasic.default_acl_for_objects.additive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the additive automatic components of this ACL. |
| `putf8szobjtypebasic.vl_sorting_type_reserved` | [`VLSortingType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.VLSortingType/index.md) | The sorting type of value list items. NOTE: This value is not currently used but is reserved for future use. Currently, sorting order is specified on the property definition level only. Values: `VLSORTING_TYPE_BY_DISPLAY_NAME` (0), `VLSORTING_TYPE_BY_EXTERNAL_ID` (1). |
| `putf8szobjtypebasic.sort_ascending_reserved` | `bool` | True to sort in ascending order, false to sort in descending order. NOTE: This value is not currently used but is reserved for future use. Currently, sorting order is specified on the property definition level only. |
| `putf8szobjtypebasic.guid` | `string` | The GUID of the object type or value list, with braces. Resolve it to the vault's ID with [GetMetadataStructureItemIdByGUID](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureItemIdByGUID/index.md). |
| `putf8szobjtypebasic.preferred_title_property_def_id` | `int32` | Property definition ID of the title property for the user's preferred language. |
| `putf8szobjtypebasic.search_characteristics` | [`ObjectTypeSearchCharacteristics`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeSearchCharacteristics/index.md) | If set, specifies search characteristics of the object type. |
| `putf8szobjtypebasic.search_characteristics.exclude_in_entire_file_data_search` | `bool` | Specifies whether object type is excluded from file content searches. |
| `putf8szobjtypebasic.search_characteristics.exclude_in_entire_meta_data_search` | `bool` | Specifies whether object type is excluded from metadata searches. |
| `putf8szobjtypebasic.indexing_definition` | [`ObjectTypeIndexingDefinition`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeIndexingDefinition/index.md) | If set, defines the indexed value lists and properties of the object type. Used for searching from Master Storage. |
| `putf8szobjtypebasic.indexing_definition.indexed_value_lists[]` | repeated `int32` | IDs of indexed value lists. |
| `putf8szobjtypebasic.indexing_definition.indexed_properties[]` | repeated `int32` | IDs of indexed properties. |
| `putf8szobjtypebasic.view_id` | `int32` | The ID of the object type specific view. |

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

## Related methods

- [IRPCValueLists.GetValueList](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/GetValueList/index.md): Gets one value list or object type by ID, without its icon.
