# IRPCObjectOperations.GetObjectDataOfMultipleObjects

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) > [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md)

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

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

Gets selected data of several objects: version information, properties, ACL, the caller's
permissions, relationships, version comments and more, with a result or an error per object.

- **Service:** [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md) `MFiles.IRPCObjectOperations`
- **gRPC method:** `/MFiles.IRPCObjectOperations/GetObjectDataOfMultipleObjects`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-object-data-of-multiple-objects`
- **Request:** [`GetObjectDataOfMultipleObjectsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetObjectDataOfMultipleObjects/index.md#request)
- **Response:** [`GetObjectDataOfMultipleObjectsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetObjectDataOfMultipleObjects/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** read
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** yes
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

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

## Remarks

Choose this method when you need more than properties, or when you want a per-object error
instead of a failed or shortened response.

**Results.** `results` has exactly one item per requested object, in the request order.
`results[i].obj_ver` repeats the request; `results[i].object_data.obj_ver` is the version that
was actually read. A result has either `object_data` or `error_info`.

**What is returned.** Only the data named in `data_request.required_data_flags` or
`optional_data_flags`. With no flags at all, `object_data` holds only the resolved `obj_ver`,
which is a cheap way to resolve the latest versions of many objects. If required data is
missing, the object gets `error_info` instead. Relationships, collection members and version
comments were returned only when requested in `required_data_flags`.

**Versions.** `data_request.version_type` defaults to
`OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_SPECIFIC_VERSIONS`, which needs specific versions in
`obj_vers`; the `OBJ_VER_VERSION_TYPE_LATEST` marker then fails with "The parameter is incorrect.".
Use `OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_LATEST_VERSIONS` (includes a version checked out to
the caller) or `OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_LATEST_CHECKED_IN_VERSIONS` to read the
latest versions. An object or version may appear only once ("Duplicate object IDs or
versions.").

**Errors.** With the default error tolerance the whole call fails if any object is missing. With
`OBJECT_VERSION_DATA_REQUEST_ERROR_TOLERANCE_ALLOW_MISSING_OBJECT_VERSIONS`, an object that does
not exist or that the caller cannot read gets `error_info.error_code` 0x8004000B ("Not found.")
and no `object_data`.

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

## Request: GetObjectDataOfMultipleObjectsRequest

> 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 |
|---|---|---|
| `obj_vers[]` | repeated [`ObjVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md) | The objects. With a latest version type, only `obj_id` is used. |
| `obj_vers[].obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The object. |
| `obj_vers[].obj_id.type` | `int32` | The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID). |
| `obj_vers[].obj_id.item_id` | [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The ID of the object within its type, in `item_id.internal_id`. |
| `obj_vers[].version` | [`ObjVerVersion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVerVersion/index.md) | The version. Usually `OBJ_VER_VERSION_TYPE_SPECIFIC` with `internal_version`. |
| `obj_vers[].version.type` | [`ObjVerVersionType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ObjVerVersionType/index.md) | What `internal_version` means. `OBJ_VER_VERSION_TYPE_SPECIFIC` for a version number. Values: `OBJ_VER_VERSION_TYPE_UNINITIALIZED` (0), `OBJ_VER_VERSION_TYPE_LATEST` (1), `OBJ_VER_VERSION_TYPE_ANY` (2), `OBJ_VER_VERSION_TYPE_ALL` (3), `OBJ_VER_VERSION_TYPE_SPECIFIC` (4), `OBJ_VER_VERSION_TYPE_VALUE_LIST_ITEM` (6), `OBJ_VER_VERSION_TYPE_OBJECT_LEVEL_REFERENCE` (7). |
| `obj_vers[].version.internal_version` | `int32` | The version number, starting from 1, when `type` is `OBJ_VER_VERSION_TYPE_SPECIFIC`. The server returns -1 with `OBJ_VER_VERSION_TYPE_LATEST`. |
| `obj_vers[].version.external_repository_version` | `string` | Used only for objects in external repositories. Leave empty. |
| `obj_vers[].version.external_repository_sort_key` | `int64` | Used only for objects in external repositories. Leave 0. |
| `data_request` | [`ObjectVersionDataRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionDataRequest/index.md) | What to return, which versions to read and how to handle missing objects. Set at least `required_data_flags` or `optional_data_flags`, and `version_type`. |
| `data_request.required_data_flags` | [`OBJECTDATAREQUESTFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OBJECTDATAREQUESTFLAGS/index.md) | Specifies the required object information. |
| `data_request.required_data_flags.all` | `bool` | Specifies all flags set; Including any future flags. |
| `data_request.required_data_flags.object_version` | `bool` | Object information is requested, e.g. ObjectVersionEx. |
| `data_request.required_data_flags.properties` | `bool` | Property values are requested, e.g. PropertyValueArray. |
| `data_request.required_data_flags.acl` | `bool` | Access control list is requested, e.g. ACL. |
| `data_request.required_data_flags.current_user_permissions` | `bool` | Object permissions for client is requested, e.g. ObjectPermissionsForClient. |
| `data_request.required_data_flags.properties_for_display` | `bool` | Display properties are requested, e.g. PropertyValueArray. |
| `data_request.required_data_flags.relationships` | `bool` | Related objects are requested, e.g. RelationshipGroup. |
| `data_request.required_data_flags.collection_member_relationships` | `bool` | Collection member objects are requested, e.g. RelationshipGroup. |
| `data_request.required_data_flags.comments` | `bool` | Comment history is requested, e.g. ObjVerProperties. |
| `data_request.required_data_flags.user_event_subscriptions` | `bool` | Event subscription is requested, e.g. EventSubscription. |
| `data_request.required_data_flags.object_activities` | `bool` | ObjectActivities is requested, e.g. ObjectActivitiesResponse. |
| `data_request.required_data_flags.latest_version_comment` | `bool` | Latest version comment is requested, e.g. LatestVersionComment. |
| `data_request.optional_data_flags` | [`OBJECTDATAREQUESTFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OBJECTDATAREQUESTFLAGS/index.md) | Specifies the optional object information. |
| `data_request.optional_data_flags.all` | `bool` | Specifies all flags set; Including any future flags. |
| `data_request.optional_data_flags.object_version` | `bool` | Object information is requested, e.g. ObjectVersionEx. |
| `data_request.optional_data_flags.properties` | `bool` | Property values are requested, e.g. PropertyValueArray. |
| `data_request.optional_data_flags.acl` | `bool` | Access control list is requested, e.g. ACL. |
| `data_request.optional_data_flags.current_user_permissions` | `bool` | Object permissions for client is requested, e.g. ObjectPermissionsForClient. |
| `data_request.optional_data_flags.properties_for_display` | `bool` | Display properties are requested, e.g. PropertyValueArray. |
| `data_request.optional_data_flags.relationships` | `bool` | Related objects are requested, e.g. RelationshipGroup. |
| `data_request.optional_data_flags.collection_member_relationships` | `bool` | Collection member objects are requested, e.g. RelationshipGroup. |
| `data_request.optional_data_flags.comments` | `bool` | Comment history is requested, e.g. ObjVerProperties. |
| `data_request.optional_data_flags.user_event_subscriptions` | `bool` | Event subscription is requested, e.g. EventSubscription. |
| `data_request.optional_data_flags.object_activities` | `bool` | ObjectActivities is requested, e.g. ObjectActivitiesResponse. |
| `data_request.optional_data_flags.latest_version_comment` | `bool` | Latest version comment is requested, e.g. LatestVersionComment. |
| `data_request.version_type` | [`ObjectVersionDataRequestVersionType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ObjectVersionDataRequestVersionType/index.md) | Specifies the version type to search for. Values: `OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_SPECIFIC_VERSIONS` (0), `OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_LATEST_VERSIONS` (1), `OBJECT_VERSION_DATA_REQUEST_VERSION_TYPE_LATEST_CHECKED_IN_VERSIONS` (2). |
| `data_request.error_tolerance` | [`ObjectVersionDataRequestErrorTolerance`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ObjectVersionDataRequestErrorTolerance/index.md) | Specifies how error cases are handled during the request. Values: `OBJECT_VERSION_DATA_REQUEST_ERROR_TOLERANCE_FAIL_ON_ANY_ERROR` (0), `OBJECT_VERSION_DATA_REQUEST_ERROR_TOLERANCE_ALLOW_MISSING_OBJECT_VERSIONS` (1). |
| `data_request.identity_type` | [`ObjectVersionDataRequestIdentityType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ObjectVersionDataRequestIdentityType/index.md) | Specifies how objects with changed identities are handled. Values: `OBJECT_VERSION_DATA_REQUEST_IDENTITY_TYPE_SPECIFIC` (0), `OBJECT_VERSION_DATA_REQUEST_IDENTITY_TYPE_MANAGED_IF_AVAILABLE` (1). |
| `data_request.object_activities_parameters` | [`ObjectVersionActivityRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionActivityRequest/index.md) | Specifies the required object version activity input. |
| `data_request.object_activities_parameters.category_filter` | [`OBJECTVERSIONACTIVITYCATEGORYFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OBJECTVERSIONACTIVITYCATEGORYFLAGS/index.md) | Category flags. |
| `data_request.object_activities_parameters.limit` | `uint32` | Maximum number of object version activities to be included. |
| `data_request.object_activities_parameters.offset_obj_ver_version` | [`ObjVerVersion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVerVersion/index.md) | Starting version for object version activities. 0 or missing means no offset. |

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

## Response: GetObjectDataOfMultipleObjectsResponse

> 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 |
|---|---|---|
| `results[]` | repeated [`ObjectVersionDataResult`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionDataResult/index.md) | One result per requested object, in the request order. |
| `results[].obj_ver` | [`ObjVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md) | Requested object version. |
| `results[].obj_ver.obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The object. |
| `results[].obj_ver.version` | [`ObjVerVersion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVerVersion/index.md) | The version. Usually `OBJ_VER_VERSION_TYPE_SPECIFIC` with `internal_version`. |
| `results[].object_data` | [`ObjectVersionData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionData/index.md) | The pointer to the result data details. Equals to null for the failed result. |
| `results[].object_data.obj_ver` | [`ObjVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md) | The actual resolved object version. |
| `results[].object_data.object_version` | [`ObjectVersionEx`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionEx/index.md) | The pointer to object info. Null pointer, if data was not requested. |
| `results[].object_data.properties` | [`PropertyValueArray`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValueArray/index.md) | The pointer to property values. Null pointer, if data was not requested. |
| `results[].object_data.acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | The pointer to ACL. Null pointer, if data was not requested. |
| `results[].object_data.current_user_permissions` | [`ObjectPermissionsForClient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectPermissionsForClient/index.md) | The pointer to object permissions for client. Null pointer, if data was not requested. |
| `results[].object_data.properties_for_display` | [`PropertyValueArray`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValueArray/index.md) | Property values for display, or an empty array.  Null pointer, if data was not requested. |
| `results[].object_data.relationships[]` | repeated [`RelationshipGroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.RelationshipGroup/index.md) | List of related objects(From and To) and collection members. Null pointer, if data was not requested. |
| `results[].object_data.comments` | [`VersionCommentArray`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VersionCommentArray/index.md) | List of version comments. Null pointer, if data was not requested. |
| `results[].object_data.user_event_subscriptions[]` | repeated [`EventSubscription`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.EventSubscription/index.md) | The pointer to event subscription. Null pointer, if data was not requested. |
| `results[].object_data.object_activities` | [`ObjectVersionActivityResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionActivityResponse/index.md) | The pointer to object version activity. |
| `results[].object_data.latest_version_comment` | [`LatestVersionComment`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LatestVersionComment/index.md) | The pointer to latest version comment. Null pointer, if data was not requested. |
| `results[].error_info` | [`ErrorInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ErrorInfo/index.md) | The pointer to the error information. Equals to null for the successful result. |
| `results[].error_info.error_code` | `int32` | The error code (HRESULT value). |
