Create L2 Network Extensions
Creates Layer 2 network extensions for one or more networks across HCX sites. This is the primary API for extending networks, enabling VMs to maintain their IP addresses and Layer 2 adjacency when migrated between sites. The operation is asynchronous and returns immediately with validation results for each network extension request. Network extensions create secure Layer 2 tunnels using the HCX Network Extension (NE) appliances at both source and destination sites.
Request body containing one or more network extension configurations. Each item in the array represents a single network to be extended with its source network details, destination configuration, gateway settings, and optional feature flags for advanced networking capabilities.
Show optional properties
{
"items": [
{}
]
}
{
"items": [
{
"stretchId": "string",
"vcGuid": "string",
"gateway": "string",
"netmask": "string",
"source": {
"endpointId": "string",
"endpointType": "string",
"endpointName": "string",
"resourceId": "string",
"resourceType": "string",
"resourceName": "string"
},
"destination": {
"endpointId": "string",
"endpointType": "string",
"endpointName": "string",
"resourceId": "string",
"resourceType": "string",
"resourceName": "string"
},
"sourceNetwork": {
"networkId": "string",
"networkType": "string",
"networkName": "string",
"gatewayId": "string",
"accessMode": "string",
"gatewayName": "string",
"layer2Id": "string",
"isDistributedRouter": false,
"trunkMode": false,
"isNsxT": false,
"logicalSwitchId": "string",
"vcGuid": "string",
"dvsType": "string",
"transportZoneId": "string",
"transportZoneName": "string",
"transportZonePath": "string",
"transportZoneType": "string",
"resourceBackingDvpgId": "string",
"vdrMac": "string",
"dvsId": "string",
"dvsName": "string"
},
"destinationNetwork": {
"networkId": "string",
"networkType": "string",
"networkName": "string",
"gatewayId": "string",
"accessMode": "string",
"gatewayName": "string",
"layer2Id": "string",
"isDistributedRouter": false,
"trunkMode": false,
"isNsxT": false,
"logicalSwitchId": "string",
"vcGuid": "string",
"dvsType": "string",
"transportZoneId": "string",
"transportZoneName": "string",
"transportZonePath": "string",
"transportZoneType": "string",
"resourceBackingDvpgId": "string",
"vdrMac": "string",
"dvsId": "string",
"dvsName": "string"
},
"sourceAppliance": {
"applianceId": "string",
"applianceName": "string",
"applianceType": "string",
"clusterId": "string",
"haConfig": {
"haGroupId": "string",
"partnerApplianceId": "string",
"haGroupName": "string"
}
},
"features": {
"proximityRouting": false,
"egressOptimization": false,
"mobilityOptimizedNetworking": false
},
"dns": [
"string"
],
"haGroupId": "string",
"allowOverlappingVLAN": false,
"allowOverlappingSubnets": false,
"overrideNetworkProfileConflict": false,
"allowOverlappingDstVLAN": false,
"allowVlanNetworkCreation": false,
"allowVlanBackedSourceAndDestination": false
}
]
}
items
Network extension request accepted and queued for processing.
{
"data": {
"items": [
{
"stretchId": "string",
"sourceNetworkId": "string",
"warnings": [
{
"code": "string",
"message": "string",
"details": {}
}
],
"errors": [
{
"code": "string",
"message": "string",
"details": {}
}
]
}
]
},
"warnings": [
{
"message": "string"
}
],
"errors": [
{
"code": "string",
"message": "string"
}
]
}
data
warnings
errors
Bad Request - Invalid input parameters or validation failures.
{
"errors": [
{
"code": "string",
"message": "string"
}
]
}
errors
Unauthorized
Forbidden
Internal Server Error
{
"errors": [
{
"code": "string",
"message": "string"
}
]
}
errors
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"items":["object"]}' https://{api_host}/hybridity/api/l2NetworkExtensions