# Migrate Connection to a Different Virtual Device ![](https://docs.equinix.com/assets/images/MigrateConnectionToDifferentVirtualDevice-c2f98589b6a3ad47dc85d71ac39d316b.jpg) ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. Authenticate - Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to [API Authentication](https://docs.equinix.com/equinix-api/api-authentication.md) for instructions on how to call the OAuth API to validate and authenticate your credentials. 2. Determine the existing connection ID. Use the [Search Connections](https://docs.equinix.com/api-catalog/fabricv4/connections/searchconnections.md) endpoint to retrieve a list of connections and determine the ID of the connection that you want to migrate to a different port. 3. Determine your Network Edge device information. You need a provisioned Equinix Virtual Device/Redundant Devices/Cluster with a registered license. Check your available virtual devices and clusters by calling [Get Virtual Devices](https://docs.equinix.com/api-catalog/network-edgev1/virtual-device/getvirtualdevices.md) or [Get Virtual Device {uuid}](https://docs.equinix.com/api-catalog/network-edgev1/virtual-device/getvirtualdevicebyuuid.md). You may choose any available interface on the device for your connection. However, Equinix will select an interface if you do not specify one. ## Updating the Connection[​](#updating-the-connection "Direct link to Updating the Connection") To update a connection and migrate it to a different virtual device, send a `PATCH` request to the [/fabric/v4/connections/{id}](https://docs.equinix.com/api-catalog/fabricv4/connections/updateconnectionbyuuid.md) endpoint. Specify the connection's a-side ID to the virtual device you are migrating the connection to in the body of the request. | | **PATCH /fabric/v4/connections/{uuid}** | | ---------------- | --------------------------------------- | | Method | PATCH | | URL or Endpoint | `/fabric/v4/connections/{uuid}` | | Headers | `Authorization`, `Content-Type` | | Path Parameters | `uuid` | | Query Parameters | Not applicable | | Body Parameters | op, path, value | To safely validate this request in production without changing any connections, see [Testing in Production (API Dry Run)](https://docs.equinix.com/equinix-api/testing/testing-in-production-dry-run.md). Sample cURL Request: ``` curl -X PATCH 'https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62' -H 'content-type: application/json-patch+json' -H 'authorization: Bearer ' -d '[     {         "op": "replace",         "path": "/aSide/accessPoint",         "value": {             "type": "VD",             "virtualDevice": {                 "type": "EDGE",                 "uuid": "e8b49cd7-9b4c-4123-8bd4-fbead83c3436"             },             "interface": {                 "type": "NETWORK",                 "id": 5             }         }     } ]' ``` **Path parameters** | **Parameter** | **Mandatory** | **Type** | **Example** | **Applicable Values** | **Description** | | ------------- | ------------- | -------- | ------------------------------------ | --------------------- | --------------------------------------- | | uuid | yes | string | 3a58dd05-f46d-4b1d-a154-2e85c396ea62 | - | Equinix-assigned connection identifier. | **Body parameters** | **Parameter** | **Mandatory** | **Type** | **Example** | **Applicable Values** | **Description** | | ------------- | ------------- | -------- | ------------------------------------ | --------------------- | ------------------------------------ | | op | yes | string | replace | replace | Update reqest type. | | path | yes | string | /aSide/accessPoint | /aSide/accessPoint | Parameter path. | | value | yes | object | | - | | | type | yes | string | VD | VD | VD - Virtual Device. | | virtualDevice | yes | object | | - | Virtual Device details. | | type | yes | string | EDGE | EDGE | EDGE. | | uuid | yes | string | 78rtdd05-f46d-4b1d-a154-2e85c396yt56 | | Unique Id of the new Virtual Device. | | interface | no | object | | | Interface details. | | type | no | string | NETWORK | | NETWORK. | | id | no | integer | 5 | | Interface of the Virtual Device. | Sample Response: ``` {     "href": "https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62",     "type": "EVPL_VC",     "uuid": "3a58dd05-f46d-4b1d-a154-2e85c396ea62",     "name": "Conn-Name-2",     "state": "PROVISIONED",     "order": {         "purchaseOrderNumber": "1-129105284100",         "billingTier": "Up to 1 Gbps"     },     "bandwidth": 1000,     "redundancy": {         "group": "m167f685-41b0-1b07-6de0-320a5c00abeu",         "priority": "PRIMARY"     },     “aSide”: {         “accessPoint”: {             "interface": {                 “uuid”: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",                 “id”: 7,                 “type”: "NETWORK"             },             “location”: {                 “metroCode”: "AM"             },             “virtualDevice”: {                 “uuid”: "XXXXXXXXXXXXXXXXXXXXXXXXXX",                  “type”: "EDGE"             }         }     },     "zSide": {         "accessPoint": {             "type": "SP",             "profile": {                 "href": "https://api.equinix.com/fabric/v4/ports/a867f685-41b0-1b07-6de0-320a5c00abdd",                 "type": "L2_Profile",                 "uuid": "20d32a80-0d61-4333-bc03-707b591ae2f4"             },             "location": {                 "href": "https://api.equinix.com/v4/metros/SV",                 "metrocode": "SV",                 "region": "AMER"             }         }     },     "notifications": [         {             "type": "ALL",             "emails": [                 "test@equinix.com",                 "test@equinix.com"             ]         }     ],     "operation": {         "equinixStatus": "PROVISIONED",         "providerStatus": "PROVISIONED"     },     "changeLog": {         "createdDateTime": "2021-07-15T19:30:29.526Z",         "updatedDateTime": "2021-08-15T19:30:29.526Z",     } } ```