Management Plane API > Networking > Logical Routing And Services > Logical Routers

Create a Logical Router

Creates a logical router. The required parameters are router_type (TIER0 or
TIER1) and edge_cluster_id (TIER0 only). Optional parameters include
internal and external transit network addresses.

Request:

Method:
POST
URI Path(s):
/api/v1/logical-routers
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
LogicalRouter+

Example Request:

POST https://<nsx-mgr>/api/v1/logical-routers { "resource_type": "LogicalRouter", "description": "Router West", "display_name": "tier-0", "edge_cluster_id": "a9dc562c-effd-4225-883d-3f7d2c887c6b", "advanced_config": { "external_transit_networks": [ "100.64.1.0/10" ], "internal_transit_network": "169.254.0.0/28" }, "allocation_profile": { "enable_standby_relocation": false }, "router_type": "TIER0", "high_availability_mode": "ACTIVE_ACTIVE" }

Successful Response:

Response Code:
201 Created
Response Headers:
Location
Content-type: application/json
Response Body:
LogicalRouter+

Example Response:

{ "resource_type": "LogicalRouter", "description": "Router West", "id": "88a3c980-c433-43f7-80b8-987c8f80d9e1", "display_name": "tier-0", "edge_cluster_id": "a9dc562c-effd-4225-883d-3f7d2c887c6b", "advanced_config": { "external_transit_networks": [ "100.64.0.0/10" ], "internal_transit_network": "169.254.0.0/28" }, "allocation_profile": { "enable_standby_relocation": false }, "router_type": "TIER0", "high_availability_mode": "ACTIVE_ACTIVE", "_last_modified_time": 1457550246853, "_create_time": 1457550246853, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 }

Required Permissions:

crud

Feature:

routing_routers

Additional Errors: