Connect Network Edge Device Using Service Token
Establish a connection between your Network Edge Device and a network resource on Fabric using the Fabric API using a Service Token.
Fabric API Prerequisites
-
Authenticate - Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to API Authentication for instructions on how to call OAuth API to validate and authenticate your credentials.
-
Retrieve your Network Edge devices information using the Get Virtual Devices or Get Virtual Device {uuid}. In case of a redundant device, choose the unique ID of the primary or the secondary device. Similarly, for a cluster device, choose the unique Id of
node0
ornode1
. There will be just one connection even if your device is redundant/cluster. -
Call the Get All Service Tokens endpoint to get available service tokens along with the allowed connection settings.
Connecting Using a Service Token
To create a connection between your Network Edge virtual device and another network location on Fabric using a Service Token, send a POST
request to the /fabric/v4/connections
endpoint. Specify which virtual device, service token, and connection configuration in the body of the request. The details of the network location are provided by the service token.
A service token can be dispatched to a number of recipients, and it's valid for a single use by any of them.
POST /fabric/v4/connections | |
---|---|
Method | POST |
Endpoint | /fabric/v4/connections |
Headers | Authorization , Content-Type |
Path Parameters | Not applicable |
Query Parameters | Not applicable |
Body Parameters | type , name , order , redundancy , bandwidth , aSide , zSide , notifications |
In this example the a-side is the Network Edge device, and the Service Token is for the z-side destination.
Sample cURL Request:
curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "EVPL_VC",
"name": "Conn-1",
"order": {
"purchaseOrderNumber": "1-129105284100"
},
"bandwidth": 1000,
"aSide": {
"accessPoint": {
"type": "VD",
"virtualDevice": {
"type": "EDGE",
"uuid": "fd5342f3-d067-4683-a24f-be952279630b"
},
"interface": {
"type": "NETWORK",
"id": 5
}
}
},
"zSide": {
"serviceToken": {
"uuid": "20d32a80-0d61-4333-bc03-707b591ae2f4"
}
},
"notifications": [
{
"type": "ALL",
"emails": [
"test@equinix.com",
"test2@equinix.com"
]
}
]
}'
The parameters included in the request body are specific to this example. For a full list of parameters and their descriptions, see the API Reference.
Sample Response:
{
"type": "EVPL_VC",
"href": "https://api.equinix.com/fabric/v4/connections/ebc37e2e-c36b-4e93-86a4-fc4efce7abc8",
"uuid": "ebc37e2e-c36b-4e93-86a4-fc4efce7abc8",
"name": "Test ST",
"state": "ACTIVE",
"operation": {
"providerStatus": "AVAILABLE",
"equinixStatus": "PROVISIONED"
},
"notifications": [
{
"type": "ALL",
"emails": [
"testNEuser2@equinix.com"
]
}
],
"account": {
"accountNumber": 270235,
"orgId": 92794,
"globalOrgId": "0016u000003JZ55AAG"
},
"changeLog": {
"createdBy": "testNEuser2",
"createdDateTime": "2022-10-05T19:37:12.748Z",
"updatedBy": "testNEuser2",
"updatedDateTime": "2022-10-05T19:37:12.748Z"
},
"bandwidth": 50,
"redundancy": {
"group": "b64dad2a-2763-4084-bc50-b36ef4f67137",
"priority": "PRIMARY"
},
"isRemote": true,
"direction": "INTERNAL",
"aSide": {
"accessPoint": {
"interface": {
"uuid": "11fd6067-149f-4142-a5b4-54a8dd6f53fe",
"id": 6,
"type": "CLOUD"
},
"type": "VD",
"account": {
"accountNumber": 270217,
"organizationName": "eqx-nfv"
},
"location": {
"region": "AMER",
"metroName": "Ashburn",
"metroCode": "DC"
},
"virtualDevice": {
"href": "https://api.equinix.com/ne/v1/devices/3539f96c-7f67-4696-90f3-7b6d2fdcde5f",
"uuid": "3539f96c-7f67-4696-90f3-7b6d2fdcde5f",
"name": "testing1234",
"type": "EDGE"
}
}
},
"zSide": {
"serviceToken": {
"uuid": "e05f4f23-d098-4d7c-a9ca-c2897b465107",
"account": {
"orgId": 92794
}
},
"accessPoint": {
"type": "COLO",
"account": {
"accountNumber": 270235,
"organizationName": "testNEuser2-270235"
},
"location": {
"region": "AMER",
"metroName": "Ashburn",
"metroCode": "DC"
},
"port": {
"href": "https://qa3api.corp.equinix.com/fabric/v4/ports/c791f8cb-59d0-9d00-8ce0-306a5c00a4ee",
"uuid": "c791f8cb-59d0-9d00-8ce0-306a5c00a4ee",
"name": "testNEuser2-DC6-NL-Dot1q-STD-SEC-10G-JN-216"
},
"linkProtocol": {
"type": "DOT1Q",
"vlanTag": 553
}
}
}
}
Response payload includes configuration parameters defined in the request body. For a full list of possible parameters and their descriptions, see the API Reference.
Monitoring Your Connection
Use the Get Specified Connection API endpoint to monitor connection status.