NSX-T Data Center REST API

Associated URIs:

API Description API Path

List all Logical Switches


Returns information about all configured logical switches. This api is now deprecated. Please use new api - /infra/segments
GET /api/v1/logical-switches (Deprecated)

Create a Logical Switch


Creates a new logical switch. The request must include the
transport_zone_id, display_name, and admin_state (UP or DOWN). The
replication_mode (MTEP or SOURCE) is required for overlay logical
switches, but not for VLAN-based logical switches. A vlan needs to be
provided for VLAN-based logical switches. This api is now deprecated.
Please use new api -/infra/segments/<segment-id>
POST /api/v1/logical-switches (Deprecated)

Delete a Logical Switch


Removes a logical switch from the associated overlay or VLAN transport
zone. By default, a logical switch cannot be deleted if there are logical
ports on the switch, or it is added to a NSGroup.
Cascade option can be used to delete all ports and the logical switch.
Detach option can be used to delete the logical switch forcibly. This api is now deprecated.
Please use new api - /infra/segments/<segment-id>
DELETE /api/v1/logical-switches/<lswitch-id> (Deprecated)

Get Logical Switch associated with the provided id (lswitch-id)


Returns information about the specified logical switch Id. This api is now deprecated. Please use new api - /infra/segments/<segment-id>
GET /api/v1/logical-switches/<lswitch-id> (Deprecated)

Update a Logical Switch


Modifies attributes of an existing logical switch. Modifiable
attributes include admin_state, replication_mode, switching_profile_ids
and VLAN spec. You cannot modify the original transport_zone_id.
This api is now deprecated. Please use new api - PATCH /infra/segments/<segment-id>
PUT /api/v1/logical-switches/<lswitch-id> (Deprecated)

Get MAC Table for Logical Switch of the Given ID (lswitch-id)


Returns MAC table of a specified logical switch from the given transport
node if a transport node id is given in the query parameter from the
Central Controller Plane.
The query parameter "source=cached" is not supported.
GET /api/v1/logical-switches/<lswitch-id>/mac-table

Get MAC Table for Logical Switch of the Given ID (lswitch-id)


Returns MAC table of a specified logical switch in CSV format from the given transport
node if a transport node id is given in the query parameter from the
Central Controller Plane.
The query parameter "source=cached" is not supported.
GET /api/v1/logical-switches/<lswitch-id>/mac-table?format=csv

Get the realized state associated with provided logical switch id


Returns current state of the logical switch configuration and details of only
out-of-sync transport nodes. This api is now deprecated. Please use new api -
policy/api/v1/infra/realized-state/realized-entities?intent_path={{intent-path}}
GET /api/v1/logical-switches/<lswitch-id>/state (Deprecated)

Get Statistics for Logical Switch of the Given ID (lswitch-id)


Returns statistics of a specified logical switch.
The query parameter "source=realtime" is not supported.
GET /api/v1/logical-switches/<lswitch-id>/statistics

Get Logical Switch runtime status info for a given logical switch


Returns the number of ports assigned to logical switch. This api is now deprecated Please use new API - GET policy/api/v1/infra/realized-state/status?intent_path={{intent-path}}
GET /api/v1/logical-switches/<lswitch-id>/summary (Deprecated)

Get virtual tunnel endpoint table for logical switch of the given ID (lswitch-id)


Returns the virtual tunnel endpoint table of a specified logical switch
from the given transport node if a transport node id is given in the
query parameter, from the Central Controller Plane.
The query parameter "source=cached" is not supported.
GET /api/v1/logical-switches/<lswitch-id>/vtep-table

Get virtual tunnel endpoint table for logical switch of the given ID (lswitch-id)


Returns virtual tunnel endpoint table of a specified logical switch in
CSV format from the given transport node if a transport node id is
given in the query parameter from the Central Controller Plane.
The query parameter "source=cached" is not supported.
GET /api/v1/logical-switches/<lswitch-id>/vtep-table?format=csv

List logical switches by realized state


Returns a list of logical switches states that have realized state as provided
as query parameter. This api is now deprecated. Please use new api -
policy/api/v1/infra/realized-state/realized-entities?intent_path={{intent-path}}
GET /api/v1/logical-switches/state (Deprecated)

Get Status Summary of All Logical Switches in the System


Returns Operational status of all logical switches.
The query parameter "source=realtime" is not supported.
GET /api/v1/logical-switches/status