Skip to content

Creating a VXC Between Two Ports with the API

This topic steps through the API procedure to create a VXC between two Ports that you own, including how to get the Port IDs, validate the VXC, and order the VXC.

The example in this topic creates a VXC between a Port in Digital Realty, London, UK and another Port in Iron Mountain, Ashburn, US.

To create the VXC, we need the productUid for each Port.

Before you begin, obtain a valid access token. For more information, see Creating an API Key.

To get the productUid for the Ports to connect

  1. In Postman, click Product Details in the left navigation and click GET Product List.

  2. Click Send.

  3. From the returned product details, locate the productUid values for the two Ports you want to connect.
    This example uses these Ports:

    "productName": "API Port London" with "productUid": "7f5f9574-315e-4527-af44-122605a411de"
    "productName": "API Port2 Ashburn" with "productUid": "1f751b96-87c5-4bbf-8a7a-a93a04f71a70",
    

To review pricing details and validate the configuration for the point-to-point VXC

  1. In Postman, expand Connections > Virtual Cross Connects in the left navigation and click POST Validate VXC Order (v3).

  2. Update the Body with the productUids for each end of the connection.
    You can also change additional values, such as name, rate limit, contract term, whether the connection is enabled or shut down, and VLAN ID.

  3. Click Send to make a POST request.

    POST {baseUrl}/v3/networkdesign/validate
    
[
  {
    "productUid": "7f5f9574-315e-4527-af44-122605a411de",
    "associatedVxcs": [
      {
        "productName": "My API created VXC",
        "rateLimit": 500,
        "term":12,
        "shutdown": false,
        "aEnd": {
          "vlan": 102
        },
        "bEnd": {
          "productUid": "1f751b96-87c5-4bbf-8a7a-a93a04f71a70",
          "vlan": 101
        }
      }
    ]
  }
]

After you validate the request and review the pricing details in the response, create the VXC.

To create the VXC between the Ports

  1. Copy the validated Body from POST Validate VXC Order (v3) and paste it into the Body of POST Buy VXC (v3).

  2. Click Send to post the request.

    POST {baseUrl}/v3/networkdesign/buy
    

    The resulting point-to point VXC appears in the Megaport Portal.

Portal view of API Port and VXC


Last update: 2024-04-15