Skip to main content

Adding Secondary Device

Before adding a secondary device to an existing device, please keep in mind the following:

  • Some attributes of the secondary device must be the same as that of the primary, including the device configuration, licensing, device resources, software package, and license throughput. However, you have the option to select the version, hostname, notification list, list of ssh users, Access IP addresses, and additional bandwidth.

  • The term length of the secondary must be the same as that of the primary if both the devices belong to the same account.

  • The payload to add a secondary will vary based on the device type of the existing device. Check out the sample payloads under Step 3.

  • While the secondary device is being provisioned, the status of the primary device will change to WAITING_FOR_SECONDARY. If the secondary fails to provision, the primary will move back to the provisioned state. If the secondary provisions, then the status of both the devices will change to PROVISIONED.

Prerequisites

  1. Authenticate - Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to API Authentication for instructions on how to call the OAuth API to validate and authenticate your credentials.

  2. Get Primary Device. Call Get Virtual Devices to get the unique ID of the primary device and to check out other attributes.

Step 3: Add Secondary Device

POST /ne/v1/devices
MethodPOST
URL or End Point/ne/v1/devices
HeadersAuthorization token, Content-Type
Query ParametersNA
Body ParametersprimaryDeviceUuid, secondary {accountNumber, version, accountReferenceId, additionalBandwidth, metroCode, notifications[...], aclDetails[{uuid, interfaceType}], termLength, virtualDeviceName, hostNamePrefix}

To add a secondary device to an existing device, find the required fields for your device type by checking out the use cases from when you created the existing device. Below are a few sample requests.

A sample curl request to add a secondary device to a Fortinet device.

curl -X  
POST "https://api.equinix.com/ne/v1/devices?draft=false"
-H "content-type: application/json"
-H "Authorization: Bearer <token>"
-d '
{
    "primaryDeviceUuid": "7e54b32f-53e4-4903-82b8-df0e9d73fae9",
    "secondary": {
    "metroCode": "DC",
    "version": "6.0.4",
    "virtualDeviceName": "fgvm-1-secondary",
    "hostNamePrefix": "test-a23-1-secondary",
    "notifications": [
        "test@equinix.com"
    ],
    "termLength": 1,
    "aclDetails": [
        {
            "uuid": "fb2e69bb-cbd7-40c4-bc01-8bcc5fa741c2",
            "interfaceType": "WAN"
        }
    ],
    "userPublicKey": {
        "username": "testuser1",
        "keyName": "E2E-AutomationDemo-300721012659695"
    },
    "accountNumber": "270217"
    }
}
'

A sample curl request to add a secondary device to a Juniper device.

curl -X  
POST "https://api.equinix.com/ne/v1/devices?draft=false"
-H "content-type: application/json"
-H "Authorization: Bearer <token>"
-d '
{
  "primaryDeviceUuid": "3267e6a9-8391-411e-b347-c9cf9089d2c4",
  "secondary": {
    "metroCode": "DC",

    "version": "19.1R1.6",
    "virtualDeviceName": "vsrx-test-1-secondary",
    "hostNamePrefix": "test-a23-1-secondary",
    "notifications": [
      "test@equinix.com"
    ],
    "termLength": 1,

    "aclDetails": [
       {
         "uuid": "fb2e69bb-cbd7-40c4-bc01-8bcc5fa741c2",
         "interfaceType": "WAN"
       }
    ],
    "userPublicKey": {
      "username": "testuser1",
      "keyName": "E2E-AutomationDemo-300721012659695"
    },
    "licenseFileId": "bcb6bc25-853d-4dbe-8f49-63bac77be9ce",
    "accountNumber": "270217"
  }
}
'

For a complete list of parameters and options, see the API Reference.

Sample response 202: Request accepted.

{  
"uuid": "fabf99bd-044b-4256-bafb-a7e1cd92b608",
"secondaryUuid": "dc9aa21f-a43f-4e55-b40c-26e3f309742f",
"deviceIds": null,
"clusterId": null
}