# IRPCObjectOperations.MigrateObject

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/MigrateObject/

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

Migrates a promoted object. Requires full control of the vault; used by migration tools.

- **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/MigrateObject`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/migrate-object`
- **Request:** [`MigrateObjectRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/MigrateObject/index.md#request)
- **Response:** [`MigrateObjectResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/MigrateObject/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** write
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** no
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

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

## Request: MigrateObjectRequest

> 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 |
|---|---|---|
| `params` | [`MigrateObjectParams`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MigrateObjectParams/index.md) | Parameters. |
| `params.obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The object to migrate. |
| `params.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). |
| `params.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`. |
| `params.set_properties[]` | repeated [`PropertyValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValue/index.md) | The properties to add/replace. |
| `params.set_properties[].property_def` | `int32` | The property definition ID, for example 0 for "Name or title" or 100 for "Class". |
| `params.set_properties[].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. |
| `params.source_object_policy` | [`MigrationSourceObjectPolicy`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.MigrationSourceObjectPolicy/index.md) | Specifies what is done to the source object after the migration. Values: `MIGRATION_SOURCE_OBJECT_POLICY_UNSPECIFIED` (0), `MIGRATION_SOURCE_OBJECT_POLICY_KEEP` (1), `MIGRATION_SOURCE_OBJECT_POLICY_DELETE` (2), `MIGRATION_SOURCE_OBJECT_POLICY_DESTROY` (3). |

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

## Response: MigrateObjectResponse

> 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_info` | [`MigratedObjectInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MigratedObjectInfo/index.md) | Results. |
| `object_info.object_info` | [`ExtObjectInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExtObjectInfo/index.md) | Extended object information. |
| `object_info.object_info.is_visible` | `bool` | True if any version of the object is visible to the caller. |
| `object_info.object_info.object_info` | [`ObjectLevelInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectLevelInfo/index.md) | Object-level information, if `is_visible` is true. |
| `object_info.object_info.is_latest_version_visible` | `bool` | True if the latest version of the object is visible to the caller. |
| `object_info.object_info.latest_version` | [`ObjectVersionExWP`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionExWP/index.md) | The latest version of the object with its properties and ACL, if `is_latest_version_visible` is true. Some methods (for example UndoCheckout) return it without property values. |
| `object_info.object_info.original_obj_ver` | [`ObjVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md) | The object version the request named, as sent. The version part may be unset. |
| `object_info.is_migration_source_object_policy_fulfilled` | `bool` | True if the source object policy has been fulfilled after the migration. |
| `object_info.error_code` | `int32` | Holds an error code if IsMigrationSourceObjectPolicyFulfilled = false. |
