# IRPCIndexingDataSource.GetObjectTypesWithPropertyDefs

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) > [Indexing data source](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/index.md)

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

Badges: `Server integration API / specialized` `internal: not for applications` `write` `session`

Gets object types with associated property defs.

- **Service:** [Indexing data source](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/index.md) `MFiles.IRPCIndexingDataSource`
- **gRPC method:** `/MFiles.IRPCIndexingDataSource/GetObjectTypesWithPropertyDefs`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-object-types-with-property-defs`
- **Request:** [`GetObjectTypesWithPropertyDefsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/GetObjectTypesWithPropertyDefs/index.md#request)
- **Response:** [`GetObjectTypesWithPropertyDefsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/GetObjectTypesWithPropertyDefs/index.md#response)
- **Book and level:** Server integration API, specialized
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

**For M-Files components only.** Search indexers call it to learn which properties to index per
object type. Applications should use [GetObjectTypes](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectTypes/index.md)
and [GetPropertyDefs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefs/GetPropertyDefs/index.md).
- Requires the system administrator server role (server right `log_in_to_any_vault`).

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

## Request: GetObjectTypesWithPropertyDefsRequest

No fields.

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

## Response: GetObjectTypesWithPropertyDefsResponse

> 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 |
|---|---|---|
| `items[]` | repeated [`ObjectTypeWithPropertyDefs`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeWithPropertyDefs/index.md) | Items. |
| `items[].object_type` | `int32` | Object type ID. |
| `items[].property_defs[]` | repeated `int32` | The IDs of those propertydefs that are based on the object type. |

<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.
- [IRPCPropertyDefs.GetPropertyDefs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefs/GetPropertyDefs/index.md): Gets all property definitions that the user is allowed to see.
