# IRPCObjectTypesAdmin.GetObjectTypeDefs

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Object type administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/index.md)

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

Badges: `Administration API / specialized` `admin` `session` `idempotent`

Gets the full administrative definitions of all real object types.

- **Service:** [Object type administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/index.md) `MFiles.IRPCObjectTypesAdmin`
- **gRPC method:** `/MFiles.IRPCObjectTypesAdmin/GetObjectTypeDefs`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-object-type-defs`
- **Request:** [`GetObjectTypeDefsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/GetObjectTypeDefs/index.md#request)
- **Response:** [`GetObjectTypeDefsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/GetObjectTypeDefs/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

- Requires `read_all_metadata_structure`; a normal user gets "Access denied.". Users
  without the right call [GetObjectTypes](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectTypes/index.md).
- Returns real object types only (11 in the Sample Vault). For object types and value lists
  together use [GetValueListDefs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/GetValueListDefs/index.md).
- Names are in the session language.

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

## Request: GetObjectTypeDefsRequest

No fields.

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

## Response: GetObjectTypeDefsResponse

> 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 |
|---|---|---|
| `object_types[]` | repeated [`ValueListAdmin`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListAdmin/index.md) | One [ValueListAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListAdmin/index.md) per object type. |
| `object_types[].object_type` | [`ValueList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueList/index.md) | Basic data. |
| `object_types[].object_type.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. |
| `object_types[].object_type.name_singular` | `string` | The singular name, for example "Customer". Empty if the caller is not allowed to see the list. |
| `object_types[].object_type.name_plural` | `string` | The plural name, for example "Customers". Empty if the caller is not allowed to see the list. |
| `object_types[].object_type.icon` | `bytes` | The icon in .ICO format. Filled only by GetObjectTypes and GetObjectType, and only for real object types; empty in GetValueLists and GetValueList. |
| `object_types[].object_type.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). |
| `object_types[].object_type.is_hierarchical` | `bool` | True if items can have a parent item in the same list (`ValueListItem.has_parent`). |
| `object_types[].object_type.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. |
| `object_types[].object_type.owner_object_type` | `int32` | With `has_owner`, the ID of the owner list or object type. |
| `object_types[].object_type.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. |
| `object_types[].object_type.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). |
| `object_types[].object_type.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. |
| `object_types[].object_type.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. |
| `object_types[].object_type.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. |
| `object_types[].object_type.targets_for_browsing[]` | repeated [`ObjectTypeTargetForBrowsing`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeTargetForBrowsing/index.md) | Object type targets for browsing. |
| `object_types[].object_type.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. |
| `object_types[].object_type.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. |
| `object_types[].object_type.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). |
| `object_types[].object_type.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). |
| `object_types[].object_type.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. |
| `object_types[].object_type.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). |
| `object_types[].object_type.preferred_title_property_def_id` | `int32` | Property definition ID of the title property for the user's preferred language. |
| `object_types[].object_type.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. |
| `object_types[].object_type.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. |
| `object_types[].object_type.view_id` | `int32` | The ID of the object type specific view. |
| `object_types[].database_connection_string` | `string` | OLE DB connection string to the external database that contains the objects (and their properties) of this object type. |
| `object_types[].database_select_all_statement` | `string` | SQL statement that retrieves the objects from an external database. |
| `object_types[].database_select_one_statement` | `string` | SQL statement that retrieves a specific object from an external database. |
| `object_types[].database_insert_statement` | `string` | SQL statement that inserts a new object to an external database. |
| `object_types[].database_select_latest_id_statement` | `string` | SQL statement that retrieves the ID of the just inserted record in the external database. |
| `object_types[].database_update_statement` | `string` | SQL statement that updates an existing object in an external database. |
| `object_types[].database_delete_statement` | `string` | SQL statement that deletes an object in an external database. |
| `object_types[].database_column_mappings[]` | repeated [`ObjectTypeColumnMapping`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeColumnMapping/index.md) | Column mappings. |
| `object_types[].database_column_mappings[].object_type` | `int32` | Object type ID. |
| `object_types[].database_column_mappings[].ordinal` | `int32` | One-based source field ordinal. |
| `object_types[].database_column_mappings[].source_field` | `string` | Source field name. |
| `object_types[].database_column_mappings[].data_type` | `uint32` | Source field's data type. |
| `object_types[].database_column_mappings[].target_property_def` | `int32` | Target property definition. |
| `object_types[].database_column_mappings[].can_insert` | `bool` | Is the source field part of insertion operations? |
| `object_types[].database_column_mappings[].can_update` | `bool` | Is the source field part of update operations? |
| `object_types[].automatic_acl_for_objects` | [`AutomaticPermissions`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AutomaticPermissions/index.md) | The default automatic permissions for items and objects. |
| `object_types[].automatic_acl_for_objects.permissions` | [`NamedACL`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.NamedACL/index.md) | The automatic permissions for an object for which the user selects this item. |
| `object_types[].automatic_acl_for_objects.is_default` | `bool` | True if these automatic permissions are not private i.e. they are not directly specified for (owned by) this item but they come from somewhere else, e.g. from the default/common automatic permissions of the object type. |
| `object_types[].automatic_acl_for_objects.use_object_permissions` | `bool` | If true the object/item's own permissions are used as its automatic permissions. |
| `object_types[].aliases` | `string` | Semicolon-separated list of semantic aliases. |
| `object_types[].tags[]` | repeated [`NamedValueNamespace`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.NamedValueNamespace/index.md) | Names value namespaces related to the object type. |
| `object_types[].tags[].name` | `string` | The name of the namespace. |
| `object_types[].tags[].values[]` | repeated [`NamedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.NamedValue/index.md) | Named value array related to the namespace. |
| `object_types[].version_number` | `uint32` | Object type version number, used for OT modification conflicts tracking. |

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

## Related methods

- [IRPCObjectTypes.GetObjectTypes](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectTypes/index.md): Gets all object types (real object types only, not plain value lists), with their icons.
- [GetValueListDefs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/GetValueListDefs/index.md): Gets the full administrative definitions of all object types and value lists.
