# IRPCIndexingDataSource2.GetObjectForIXById

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 (version 2)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource2/index.md)

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

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

Gets the index data of one object by its ID: the same data that
[GetNextObjectsForIX](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/GetNextObjectsForIX/index.md) returns for the
latest checked-in version and, if requested, the checked-out version.

The checked-out version is returned whoever has checked it out, and the index metadata (relevance
score, last-modified time for indexing) is computed as in the enumerator.

- **Service:** [Indexing data source (version 2)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource2/index.md) `MFiles.IRPCIndexingDataSource2`
- **gRPC method:** `/MFiles.IRPCIndexingDataSource2/GetObjectForIXById`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-object-for-ixby-id`
- **Request:** [`GetObjectForIXByIdRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource2/GetObjectForIXById/index.md#request)
- **Response:** [`GetObjectForIXByIdResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource2/GetObjectForIXById/index.md#response)
- **Book and level:** Server integration API, specialized
- **Kind:** read
- **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

**For M-Files components only.** M-Files' cloud search indexing services call it to index an
object that a crawl has not delivered. Applications should not call it.
- Requires a vault session with the vault rights `see_all_objects` and `see_deleted_objects`.
- Read-only. An object that does not exist, is destroyed or has nothing to index fails with "Not
  found.". External (unmanaged) objects fail with "Not implemented.".
- Both response fields are unset only for an object that has never been checked in, read with
  `include_checked_out` false.

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

## Request: GetObjectForIXByIdRequest

> 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_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The object, by its internal ID. |
| `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_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_id.item_id.internal_id` | `int32` | The ID of the object or value list item. |
| `obj_id.item_id.external_repository_id` | [`ExternalRepositoryID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExternalRepositoryID/index.md) | Used only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault. |
| `include_checked_out` | `bool` | True to also return the checked-out version when the object is checked out. |

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

## Response: GetObjectForIXByIdResponse

The response of GetObjectForIXById: the index data of the latest checked-in version, of the
checked-out version, or of both. An object that does not exist fails the call with "Not found."
instead.

> 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 |
|---|---|---|
| `latest_checked_in` | [`ObjectDataForIX`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectDataForIX/index.md) | The index data of the latest checked-in version. Unset if the object has no checked-in version. |
| `latest_checked_in.primary_obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The primary identity of the object. Also valid when the object has been destroyed. |
| `latest_checked_in.primary_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). |
| `latest_checked_in.primary_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`. |
| `latest_checked_in.is_destroyed` | `bool` | True if the object has been destroyed and is no longer available. If true then only the objidPrimary and oim members are valid. |
| `latest_checked_in.is_skipped` | `bool` | True if the object has been skipped and cannot be indexed. If true then only the objidPrimary and oim members are valid. |
| `latest_checked_in.object_version` | [`ObjectVersionExWP`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionExWP/index.md) | Contains the basic object version information, always latest checked-in version. |
| `latest_checked_in.object_version.object_version` | [`ObjectVersionEx`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionEx/index.md) | Object info. |
| `latest_checked_in.object_version.properties[]` | repeated [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | Property values, or an empty array. |
| `latest_checked_in.object_version.acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | If set, ACL. |
| `latest_checked_in.object_version.current_user_permissions` | [`ObjectPermissionsForClient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectPermissionsForClient/index.md) | If set, permissions of the object version. |
| `latest_checked_in.version_comment` | [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | The version comment history of the object excluding checkedout version. |
| `latest_checked_in.version_comment.property_def` | `int32` | The property definition ID, for example 0 for "Name or title" or 100 for "Class". |
| `latest_checked_in.version_comment.value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The value. Its `type` must match the data type of the property definition. |
| `latest_checked_in.updated_files[]` | repeated [`FileID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileID/index.md) | Identifies the files that have been updated. |
| `latest_checked_in.updated_files[].type` | [`FileIDType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileIDType/index.md) | `FILE_IDTYPE_SPECIFIC` for one file. Values: `FILE_IDTYPE_UNINITIALIZED` (0), `FILE_IDTYPE_ALL` (1), `FILE_IDTYPE_ANY` (2), `FILE_IDTYPE_SPECIFIC` (3). |
| `latest_checked_in.updated_files[].internal_id` | `int32` | The file ID. |
| `latest_checked_in.updated_files[].external_repository_id` | `string` | Used only for files in external repositories. Leave empty. |
| `latest_checked_in.alias_obj_ids[]` | repeated [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | Additional ID aliases for the object such as the external object ID, if any, in some other system/repository/vault. |
| `latest_checked_in.alias_obj_ids[].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). |
| `latest_checked_in.alias_obj_ids[].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`. |
| `latest_checked_in.index_metadata` | [`ObjectIndexMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectIndexMetadata/index.md) | Metadata information for storing the object in the index. |
| `latest_checked_in.index_metadata.relative_relevance_score` | `float` | Relevance score of the object. |
| `latest_checked_in.index_metadata.last_modified_for_indexing_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | The last modified timestamp for indexing. |
| `latest_checked_in.index_metadata.version_for_ix` | [`LogicalTimestamp`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestamp/index.md) | Logical timestamp for indexing. |
| `latest_checked_in.repository_path` | [`FolderArray`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderArray/index.md) | If not null contains the array of folders describing the repository path to the object version location. |
| `latest_checked_in.repository_path.value[]` | repeated [`Folder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) | Array of Folder structures. |
| `latest_checked_in.all_editors_history` | [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | Aggregated DISTINCT user IDs (VALUELIST_USERS) from PROPERTYDEF_LASTMODIFIEDBY and PROPERTYDEF_VERSION_EDITORS across every checked-in version, represented as MSLOOKUP from VALUELIST_USERS. Empty when the feature flag is off or for external-repository objects. |
| `latest_checked_in.all_editors_history.property_def` | `int32` | The property definition ID, for example 0 for "Name or title" or 100 for "Class". |
| `latest_checked_in.all_editors_history.value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The value. Its `type` must match the data type of the property definition. |
| `latest_checked_in.acl_for_indexing` | [`SimpleACL`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SimpleACL/index.md) | Pre-resolved read-permission projection of this object version's ACL: one entry per component (index 0 is the custom component, the rest are automatic components in stable order), each reduced to concrete allowed/denied actor IDs with additive components merged in, deleted components removed, and pseudo-users resolved. unset if not supplied by this server; set with zero entries if supplied and the ACL resolved to no components. On the checked-out version, the checked-out-to user has already been injected into every component's allowed array; the latest-checked-in version's projection never carries that injection. |
| `latest_checked_in.acl_for_indexing.value[]` | repeated [`SimpleACLComponent`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SimpleACLComponent/index.md) | Components. |
| `checked_out` | [`ObjectDataForIX`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectDataForIX/index.md) | The index data of the checked-out version. Unset unless `include_checked_out` is true and the object is checked out. |
| `checked_out.primary_obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The primary identity of the object. Also valid when the object has been destroyed. |
| `checked_out.primary_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). |
| `checked_out.primary_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`. |
| `checked_out.is_destroyed` | `bool` | True if the object has been destroyed and is no longer available. If true then only the objidPrimary and oim members are valid. |
| `checked_out.is_skipped` | `bool` | True if the object has been skipped and cannot be indexed. If true then only the objidPrimary and oim members are valid. |
| `checked_out.object_version` | [`ObjectVersionExWP`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionExWP/index.md) | Contains the basic object version information, always latest checked-in version. |
| `checked_out.object_version.object_version` | [`ObjectVersionEx`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionEx/index.md) | Object info. |
| `checked_out.object_version.properties[]` | repeated [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | Property values, or an empty array. |
| `checked_out.object_version.acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | If set, ACL. |
| `checked_out.object_version.current_user_permissions` | [`ObjectPermissionsForClient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectPermissionsForClient/index.md) | If set, permissions of the object version. |
| `checked_out.version_comment` | [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | The version comment history of the object excluding checkedout version. |
| `checked_out.version_comment.property_def` | `int32` | The property definition ID, for example 0 for "Name or title" or 100 for "Class". |
| `checked_out.version_comment.value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The value. Its `type` must match the data type of the property definition. |
| `checked_out.updated_files[]` | repeated [`FileID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileID/index.md) | Identifies the files that have been updated. |
| `checked_out.updated_files[].type` | [`FileIDType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileIDType/index.md) | `FILE_IDTYPE_SPECIFIC` for one file. Values: `FILE_IDTYPE_UNINITIALIZED` (0), `FILE_IDTYPE_ALL` (1), `FILE_IDTYPE_ANY` (2), `FILE_IDTYPE_SPECIFIC` (3). |
| `checked_out.updated_files[].internal_id` | `int32` | The file ID. |
| `checked_out.updated_files[].external_repository_id` | `string` | Used only for files in external repositories. Leave empty. |
| `checked_out.alias_obj_ids[]` | repeated [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | Additional ID aliases for the object such as the external object ID, if any, in some other system/repository/vault. |
| `checked_out.alias_obj_ids[].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). |
| `checked_out.alias_obj_ids[].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`. |
| `checked_out.index_metadata` | [`ObjectIndexMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectIndexMetadata/index.md) | Metadata information for storing the object in the index. |
| `checked_out.index_metadata.relative_relevance_score` | `float` | Relevance score of the object. |
| `checked_out.index_metadata.last_modified_for_indexing_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | The last modified timestamp for indexing. |
| `checked_out.index_metadata.version_for_ix` | [`LogicalTimestamp`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LogicalTimestamp/index.md) | Logical timestamp for indexing. |
| `checked_out.repository_path` | [`FolderArray`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderArray/index.md) | If not null contains the array of folders describing the repository path to the object version location. |
| `checked_out.repository_path.value[]` | repeated [`Folder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) | Array of Folder structures. |
| `checked_out.all_editors_history` | [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | Aggregated DISTINCT user IDs (VALUELIST_USERS) from PROPERTYDEF_LASTMODIFIEDBY and PROPERTYDEF_VERSION_EDITORS across every checked-in version, represented as MSLOOKUP from VALUELIST_USERS. Empty when the feature flag is off or for external-repository objects. |
| `checked_out.all_editors_history.property_def` | `int32` | The property definition ID, for example 0 for "Name or title" or 100 for "Class". |
| `checked_out.all_editors_history.value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The value. Its `type` must match the data type of the property definition. |
| `checked_out.acl_for_indexing` | [`SimpleACL`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SimpleACL/index.md) | Pre-resolved read-permission projection of this object version's ACL: one entry per component (index 0 is the custom component, the rest are automatic components in stable order), each reduced to concrete allowed/denied actor IDs with additive components merged in, deleted components removed, and pseudo-users resolved. unset if not supplied by this server; set with zero entries if supplied and the ACL resolved to no components. On the checked-out version, the checked-out-to user has already been injected into every component's allowed array; the latest-checked-in version's projection never carries that injection. |
| `checked_out.acl_for_indexing.value[]` | repeated [`SimpleACLComponent`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SimpleACLComponent/index.md) | Components. |

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

## Related methods

- [IRPCIndexingDataSource.GetNextObjectsForIX](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/GetNextObjectsForIX/index.md): Gets next objects and their data for indexing.
