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

Associated URIs:

API Description API Path

List Logical Routers


Returns information about all logical routers, including the UUID, internal
and external transit network addresses, and the router type (TIER0 or
TIER1). You can get information for only TIER0 routers or only the TIER1
routers by including the router_type query parameter.
GET /api/v1/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.
POST /api/v1/logical-routers

Delete a Logical Router


Deletes the specified logical router. You must delete associated logical
router ports before you can delete a logical router. Otherwise use force
delete which will delete all related ports and other entities associated
with that LR. To force delete logical router pass force=true in query param.
DELETE /api/v1/logical-routers/<logical-router-id>

Read Logical Router


Returns information about the specified logical router.
GET /api/v1/logical-routers/<logical-router-id>

Re allocate edge node placement of TIER1 service routers


API to re allocate edge node placement for TIER1 logical router. You can
re-allocate service routers of TIER1 in same edge cluster or different edge
cluster. You can also place edge nodes manually and provide maximum two
indices for HA mode ACTIVE_STANDBY. To re-allocate on new edge cluster you
must have existing edge cluster for TIER1 logical router. This will be
disruptive operation and all existing statistics of logical router will be
remove.
POST /api/v1/logical-routers/<logical-router-id>?action=reallocate

Reprocesses a logical router configuration and publish updates to controller


Reprocess logical router configuration and configuration of related entities like logical router ports, static routing, etc.
Any missing Updates are published to controller.
POST /api/v1/logical-routers/<logical-router-id>?action=reprocess

Update a Logical Router


Modifies the specified logical router. Modifiable attributes include the
internal_transit_network, external_transit_networks, and edge_cluster_id
(for TIER0 routers).
PUT /api/v1/logical-routers/<logical-router-id>

Get BGP neighbor advertised routes


Returns routes advertised by BGP neighbor from all edge transport nodes on which
this neighbor is currently enabled. It always returns realtime response.
GET /api/v1/logical-routers/<logical-router-id>/routing/bgp/neighbors/<neighbor-id>/advertised-routes

Get BGP neighbor advertised routes in CSV format


Returns routes advertised by BGP neighbor from all edge transport
nodes on which this neighbor is currently enabled in CSV format.
It always returns realtime response.
GET /api/v1/logical-routers/<logical-router-id>/routing/bgp/neighbors/<neighbor-id>/advertised-routes?format=csv

Get BGP neighbor learned routes in CSV format


Returns routes learned by BGP neighbor from all edge transport nodes on
which this neighbor is currently enabled in CSV format.
It always returns realtime response.
GET /api/v1/logical-routers/<logical-router-id>/routing/bgp/neighbors/<neighbor-id>/routes?format=csv

Get BGP neighbor learned routes


Returns routes learned by BGP neighbor from all edge transport nodes on which
this neighbor is currently enabled. It always returns realtime response.
GET /api/v1/logical-routers/<logical-router-id>/routing/bgp/neighbors/<neighbor-id>/routes

Get the status of all the BGP neighbors for the Logical Router of the given id


Returns the status of all the BGP neighbors for the Logical Router of the given id. To get BGP neighbors status for the logical router from particular node, parameter "transport_node_id=" needs to be specified. Query parameter "source=realtime" is the only supported source.
GET /api/v1/logical-routers/<logical-router-id>/routing/bgp/neighbors/status

Get FIB table on a specified node for a logical router


Returns the FIB for the logical router on a node of the given transport-node-id.
Query parameter "transport_node_id=" is required.
To filter the result by network address, paramter "network_prefix="
needs to be specified.
Query parameter "source=realtime" is the only supported source.
GET /api/v1/logical-routers/<logical-router-id>/routing/forwarding-table

Get FIB table on a specified node for a logical router


Returns the FIB table in CSV format for the logical router on a node of the given
transport-node-id. Query parameter "transport_node_id=" is required.
To filter the result by network address, paramter "network_prefix="
needs to be specified.
Query parameter "source=realtime" is the only supported source.
GET /api/v1/logical-routers/<logical-router-id>/routing/forwarding-table?format=csv

Get route table on a node for a logical router


Deprecated - Please use /logical-routers//routing/routing-table for RIB and
/logical-routers//routing/forwarding-table for FIB.
Returns the route table in CSV format for the logical router on a node of the given
transport-node-id. Query parameter "transport_node_id=" is required.
Query parameter "source=realtime" is the only supported source.
GET /api/v1/logical-routers/<logical-router-id>/routing/route-table?format=csv (Deprecated)

Get route table on a given node for a logical router


Deprecated - Please use /logical-routers//routing/routing-table for RIB and
/logical-routers//routing/forwarding-table for FIB.
Returns the route table for the logical router on a node of the given transport-node-id.
Query parameter "transport_node_id=" is required.
Query parameter "source=realtime" is the only supported source.
GET /api/v1/logical-routers/<logical-router-id>/routing/route-table (Deprecated)

Get RIB table on a specified node for a logical router


Returns the route table(RIB) for the logical router on a node of the given transport-node-id.
Query parameter "transport_node_id=" is required.
To filter the result by network address, parameter "network_prefix="
needs to be specified.
To filter the result by route source, parameter "route_source=" needs to be specified
where source_type can be BGP, STATIC, CONNECTED, NSX_STATIC, TIER1_NAT or TIER0_NAT.
It is also possible to filter the RIB table using both network address and
route source filter together.
Query parameter "source=realtime" is the only supported source.
GET /api/v1/logical-routers/<logical-router-id>/routing/routing-table

Get RIB table on a specified node for a logical router


Returns the route table in CSV format for the logical router on a node of the given
transport-node-id. Query parameter "transport_node_id=" is required.
To filter the result by network address, paramter "network_prefix="
needs to be specified.
To filter the result by route source, parameter "route_source=" needs to be specified
where source_type can be BGP, STATIC, CONNECTED, NSX_STATIC, TIER1_NAT or TIER0_NAT.
It is also possible to filter the RIB table using both network address and
route source filter together.
Query parameter "source=realtime" is the only supported source.
GET /api/v1/logical-routers/<logical-router-id>/routing/routing-table?format=csv

Get the Realized State of a Logical Service Router Cluster


Return realized state information of a logical service router cluster.
Any configuration update that affects the logical service router cluster can use
this API to get its realized state by passing a request_id returned by the
configuration change operation. e.g. Update configuration of nat, bgp, bfd, etc.

What is a Service Router?
When a service cannot be distributed is enabled on a Logical Router, a Service Router (SR) is instantiated.
Some examples of services that are not distributed are NAT, DHCP server, Metadata Proxy, Edge Firewall,
Load Balancer and so on.
GET /api/v1/logical-routers/<logical-router-id>/service-cluster/state

Get the Realized State of a Logical Router


Return realized state information of a logical router.
Any configuration update that affects the logical router can use this API
to get its realized state by passing a request_id returned by the
configuration change operation. e.g. Update configuration of logical router,
static routes, etc.
GET /api/v1/logical-routers/<logical-router-id>/state

Get the status for the Logical Router of the given id


Returns status for the Logical Router of the given id.
GET /api/v1/logical-routers/<logical-router-id>/status