# IRPCDataExport.SearchExportedObjects

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) > [Data export](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDataExport/index.md)

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

Badges: `Vault API / standard` `read` `session` `idempotent`

Searches objects in batches ordered by object ID, for paging through all objects that match.

- **Service:** [Data export](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDataExport/index.md) `MFiles.IRPCDataExport`
- **gRPC method:** `/MFiles.IRPCDataExport/SearchExportedObjects`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/search-exported-objects`
- **Request:** [`SearchExportedObjectsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDataExport/SearchExportedObjects/index.md#request)
- **Response:** [`SearchExportedObjectsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDataExport/SearchExportedObjects/index.md#response)
- **Book and level:** Vault API, standard
- **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

- Returns the latest checked-in version of each matching object, ordered by object ID. Objects
  that have only an initial checked-out version are not returned.
- The server adds the condition "object ID greater than `last_received_obj_id`" to your
  conditions. Paging is by object ID only, and IDs repeat across object types, so **include a
  condition on one object type** (`STATUS_TYPE_OBJECT_TYPE`) when you page; without it, objects
  of other types with smaller IDs are skipped or repeated.
- Stop when a batch is empty. Results are not ranked by relevance.

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

## Request: SearchExportedObjectsRequest

> 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 |
|---|---|---|
| `condition_array[]` | repeated [`SearchCondition`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchCondition/index.md) | Search conditions, combined with AND. See [SearchCondition](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchCondition/index.md) and [Search](https://developer.m-files.com/APIs/gRPC-API/concepts/search/index.md). |
| `condition_array[].expression` | [`Expression`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Expression/index.md) | The left side of the condition: what is evaluated for each object, such as a property value, a status value or any field (full-text search). |
| `condition_array[].expression.type` | [`ExpressionType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ExpressionType/index.md) | The kind of expression. Must match the member set in `data`. Values: `EXPRESSION_TYPE_UNINITIALIZED` (0), `EXPRESSION_TYPE_PROPERTY_VALUE` (1), `EXPRESSION_TYPE_ID_SEGMENT` (2), `EXPRESSION_TYPE_STATUS_VALUE` (3), `EXPRESSION_TYPE_FILE_VALUE` (4), `EXPRESSION_TYPE_TYPED_VALUE` (5), `EXPRESSION_TYPE_ANY_FIELD` (6), `EXPRESSION_TYPE_PERMISSIONS` (7). |
| `condition_array[].expression.data` | [`ExpressionUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExpressionUnion/index.md) | The expression data. Set the member that matches `type`. |
| `condition_array[].expression.indirection_levels[]` | repeated [`IndirectionLevel`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.IndirectionLevel/index.md) | The lookups to follow before evaluating the expression, from the searched object outwards. Empty evaluates the expression on the object itself. |
| `condition_array[].type` | [`ConditionType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ConditionType/index.md) | The comparison operator. |
| `condition_array[].value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The right side of the condition: the value to compare with. Its data type must suit the expression, for example a lookup for a lookup property, Boolean for `STATUS_TYPE_IS_DELETED`. |
| `condition_array[].value.is_null_value` | `bool` | True if the value is empty. `data` is then unset. |
| `condition_array[].value.type` | [`Datatype`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.Datatype/index.md) | The data type of the value. |
| `condition_array[].value.data` | [`TypedValueUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueUnion/index.md) | The value, in the member that matches `type`. Unset for an empty value. |
| `last_received_obj_id` | `uint32` | The ID of the last object received in the previous batch; 0 for the first batch. |
| `batch_size` | `uint32` | The maximum number of objects to return; 0 returns all matching objects. |

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

## Response: SearchExportedObjectsResponse

> 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 |
|---|---|---|
| `pexportedobjects[]` | repeated [`ObjVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md) | The matching objects as [ObjVer](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md)s with a specific version (the latest checked-in version), in ascending object ID order. |
| `pexportedobjects[].obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The object. |
| `pexportedobjects[].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). |
| `pexportedobjects[].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`. |
| `pexportedobjects[].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`. |
| `pexportedobjects[].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). |
| `pexportedobjects[].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`. |
| `pexportedobjects[].version.external_repository_version` | `string` | Used only for objects in external repositories. Leave empty. |
| `pexportedobjects[].version.external_repository_sort_key` | `int64` | Used only for objects in external repositories. Leave 0. |
