Add Secondary Device

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

1) 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.
2) The term length of the secondary must be the same as that of the primary if both the devices belong to the same account.
3) 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.
4) 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."

Step 1: Authenticate

Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication.

See Generating Client id and Client Secret under the Getting Access Token section for instructions to create a client ID and client secret. See Requesting Access and Refresh tokens for instructions to call the Oauth API to validate and authenticate your credentials.

If you are unaware of your user credentials, contact your local Equinix Service Desk.

Step 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
Method POST
URL or End Point /ne/v1/devices
Headers Authorization token, Content-Type
Query Parameters NA
Body Parameters primaryDeviceUuid, 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: Launch Equinix-Configured Device, Launch Self-Configured Device, Launch SDWAN Device, Launch Cluster Device. Below are a few sample requests.

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

Copy
curl -X
POST "https://api.equinix.com/ne/v1/devices?draft=false"
-H "content-type: application/json"
-H "Authorization: Bearer jnSoUKaJHpzMnU0toROpUHmqnwEP"
-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.

Copy
curl -X
POST "https://api.equinix.com/ne/v1/devices?draft=false"
-H "content-type: application/json"
-H "Authorization: Bearer jnSoUKaJHpzMnU0toROpUHmqnwEP"
-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"
  }
}
'

Body parameters:

Body Parameter Name Mandatory Type Example Possible Values Description
primaryDeviceUuid Yes string 08036464-1c51-4190-bec2-b2c46e60046c The unique ID of the device to which you want to add a secondary device.
secondary Yes object The object containing the secondary device details.
accountNumber No string 10478397 Account number. Either an account number or an account referenceId is required to add a device. Note to resellers adding a device for a customer: Your (reseller's) account will get billed, however, you must send the customer's account number to this API to add a device for your customer.
version No string 16.09.03 The version of the software. If you do not provide a version, we will take the version of the primary device.
accountReferenceId No string 791281 Account reference Id. This is a temporary ID that can be used to add a device when your account is still pending, not active. Either an account number or an account referenceId is required to add a virtual device.
hostNamePrefix Yes string mySR Hostname prefix. This gets included as part of an FQDN that ensures the device is reachable from approved sources if desired. Only a-z, A-Z, 0-9, and hyphen(-) are allowed. It should start with a letter and end with a letter or a digit. Also, it should be a minimum of 2 and a maximum of 10 characters long.
virtualDeviceName Yes string CiscoSTROY The virtual device name for identification. This should be a minimum of 3 and a maximum of 50 characters long.
orderingContact No string subuser01 Username of a reseller's customer. This field is mandatory in case a reseller is adding a device for one of its customers. This contact will receive order and cancellation notifications.
metroCode Yes string SV Metro code. The metro code need not be the same as the metro of the primary device. However, if you are a reseller adding a device for your customer, choose a metro in the same country as the primary device. This restriction is necessary as a customer is associated with a reseller's billing account.
notifications Yes array test1@example.com Email addresses for device life-cycle notification. We need a minimum of 1 and no more than 5 email addresses. You do not need to have the same notification list as your primary device.
aclDetails Yes array An array of ACLs.
aclDetails.uuid Yes string 49289456-a63e-47d4-927c-5161cfb77501 The template id of a device ACL template created using Create ACL Template.
aclDetails.interfaceType Yes string WAN Interface type, either WAN or MGMT. Only some device types support MGMT interface ACL.
additionalBandwidth No integer 100 Additional bandwidth. You do not need to have the same additional bandwidth as your primary device.

Sample response.

202: Request accepted.

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

Response payload:

Field Type Example Values Description
uuid string b43ba509-a7d9-4334-8dee-dc4f29bf2e77 Unique identifier of the existing virtual device.
secondaryUuid string 92c2e49d-2c35-432d-a9af-016920bef70c Unique identifier of the newly added secondary virtual device.