NSX-T Data Center REST API

Associated URIs:

API Description API Path

Get L2VPN service list result under Tier-0


Get paginated list of all L2VPN services under Tier-0.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services

Delete L2VPN service under Tier-0


Delete L2VPN service for given Tier-0.
DELETE /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}

Get L2VPN service under Tier-0


Get L2VPN service for given Tier-0
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}

Create or patch L2VPN service under Tier-0


Create or patch L2VPN service for given Tier-0
PATCH /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}

Create or fully replace L2VPN service under Tier-0


Create or fully replace L2VPN service for given Tier-0. Revision is optional for creation and required for update.
PUT /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}

Get L2VPN sessions list result under Tier-0


Get paginated list of all L2VPN sessions under Tier-0.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions

Delete L2VPN session under Tier-0


Delete L2VPN session under Tier-0. When L2VPN Service is in CLIENT Mode, the L2VPN Session is deleted along with its transpot tunnels and related resources.
DELETE /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}

Get L2VPN Session under Tier-0


Get L2VPN session under Tier-0.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}

Create or patch an L2VPN session under Tier-0


Create or patch an L2VPN session under Tier-0. API supported
only when L2VPN Service is in Server Mode.
PATCH /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}

Create or patch an L2VPN session under Tier-0 from Peer Codes


Create or patch an L2VPN session under Tier-0 from Peer Codes.
In addition to the L2VPN Session, the IPSec VPN Session, along
with the IKE, Tunnel, and DPD Profiles are created and owned by
the system. IPSec VPN Service and Local Endpoint are created only
when required, i.e., an IPSec VPN Service does not already exist,
or an IPSec VPN Local Endpoint with same local address does not
already exist.
Updating the L2VPN Session can be performed only through this API
by specifying new peer codes. Use of specific APIs to update the
L2VPN Session and the different resources associated with it is
not allowed, except for IPSec VPN Service and Local Endpoint,
resources that are not system owned.
API supported only when L2VPN Service is in Client Mode.
POST /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}?action=create_with_peer_code

Create or fully replace L2VPN session under Tier-0


Create or fully replace L2VPN session under Tier-0. API supported
only when L2VPN Service is in Server Mode.
Revision is optional for creation and required for update.
PUT /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}

Get L2VPN session detailed status under Tier-0


- no enforcement point path specified: detailed tatus is evaluated on each enforcement point.
- an enforcement point path is specified: detailed status is evaluated only on the given
enforcement point.
- source=realtime: detailed tatus is fetched realtime from the enforcement point.
- source=cached: cached detailed status is returned.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}/detailed-status

Get Tier-0 L2VPN session configuration for the peer site


Get peer config for the Tier-0 L2VPN session to configure the remote
side of the tunnel.
- no enforcement point path specified: L2VPN Session Peer Codes
will be evaluated on each enforcement point.
- enforcement point paths specified: L2VPN Session Peer Codes
are evaluated only on the given enforcement points.
API supported only when L2VPN Service is in Server Mode.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}/peer-config

Get L2Vpn session remote mac for logical switch


Returns L2Vpn session remote macs for a logical switch.
Data is fetched from enforcement point.
This API is deprecated. Please use GET /infra/tier-0s/<tier-0-id>/ipsec-vpn-services/<service-id>/
sessions/<session-id>/detailed-status instead.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}/remote-mac

Get L2VPN session statistics under Tier-0


- no enforcement point path specified: statistics are evaluated on each enforcement point.
- an enforcement point path is specified: statistics are evaluated only on the given
enforcement point.
- source=realtime: statistics are fetched realtime from the enforcement point.
- source=cached: cached statistics from the enforcement point are returned.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}/statistics

Get L2VPN service list result under Tier-0


Get paginated list of all L2VPN services under Tier-0.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services (Deprecated)

Delete L2VPN service under Tier-0


Delete L2VPN service for given Tier-0 locale service.
DELETE /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id} (Deprecated)

Get L2VPN service under Tier-0


Get L2VPN service for given Tier-0 locale service.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id} (Deprecated)

Create or patch L2VPN service under Tier-0


Create or patch L2VPN service for given Tier-0 locale service.
PATCH /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id} (Deprecated)

Create or fully replace L2VPN service under Tier-0


Create or fully replace L2VPN service for given Tier-0 locale service.
Revision is optional for creation and required for update.
PUT /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id} (Deprecated)

Get L2VPN sessions list result under Tier-0


Get paginated list of all L2VPN sessions under Tier-0.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions (Deprecated)

Delete L2VPN session under Tier-0


Delete L2VPN session under Tier-0. When L2VPN Service is in CLIENT Mode,
the L2VPN Session is deleted along with its transpot tunnels and related
resources.
DELETE /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id} (Deprecated)

Get L2VPN Session under Tier-0


Get L2VPN session under Tier-0.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id} (Deprecated)

Create or patch an L2VPN session under Tier-0


Create or patch an L2VPN session under Tier-0. API supported
only when L2VPN Service is in Server Mode.
PATCH /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id} (Deprecated)

Create or patch an L2VPN session under Tier-0 from Peer Codes


Create or patch an L2VPN session under Tier-0 from Peer Codes.
In addition to the L2VPN Session, the IPSec VPN Session, along
with the IKE, Tunnel, and DPD Profiles are created and owned by
the system. IPSec VPN Service and Local Endpoint are created only
when required, i.e., an IPSec VPN Service does not already exist,
or an IPSec VPN Local Endpoint with same local address does not
already exist.
Updating the L2VPN Session can be performed only through this API
by specifying new peer codes. Use of specific APIs to update the
L2VPN Session and the different resources associated with it is
not allowed, except for IPSec VPN Service and Local Endpoint,
resources that are not system owned.
API supported only when L2VPN Service is in Client Mode.
Note:
Please note that request is validated and any error messages returned from validation may include the new VPN path
instead of the deprecated path. Both new path and old path refer to same resource.
Also VPN path returned in the Alarm, GPRR payload may include the new VPN path.
POST /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}?action=create_with_peer_code (Deprecated)

Create or fully replace L2VPN session under Tier-0


Create or fully replace L2VPN session under Tier-0. API supported
only when L2VPN Service is in Server Mode.
Revision is optional for creation and required for update.
PUT /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id} (Deprecated)

Get L2VPN session detailed status under Tier-0


- no enforcement point path specified: detailed tatus is evaluated on each enforcement point.
- an enforcement point path is specified: detailed status is evaluated only on the given
enforcement point.
- source=realtime: detailed tatus is fetched realtime from the enforcement point.
- source=cached: cached detailed status is returned.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}/detailed-status (Deprecated)

Get Tier-0 L2VPN session configuration for the peer site


Get peer config for the Tier-0 L2VPN session to configure the remote
side of the tunnel.
- no enforcement point path specified: L2VPN Session Peer Codes
will be evaluated on each enforcement point.
- enforcement point paths specified: L2VPN Session Peer Codes
are evaluated only on the given enforcement points.
API supported only when L2VPN Service is in Server Mode.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}/peer-config (Deprecated)

Get L2Vpn session remote mac for logical switch


Returns L2Vpn session remote macs for a logical switch.
Data is fetched from enforcement point.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}/remote-mac (Deprecated)

Get L2VPN session statistics under Tier-0


- no enforcement point path specified: statistics are evaluated on each enforcement point.
- an enforcement point path is specified: statistics are evaluated only on the given
enforcement point.
- source=realtime: statistics are fetched realtime from the enforcement point.
- source=cached: cached statistics from the enforcement point are returned.
GET /policy/api/v1/infra/tier-0s/{tier-0-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}/statistics (Deprecated)

Get L2VPN service list result under Tier-1


Get paginated list of all L2VPN services under Tier-1.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services

Delete L2VPN service under Tier-1


Delete L2VPN service for given Tier-1.
DELETE /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}
DELETE /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}

Get L2VPN service under Tier-1


Get L2VPN service for given Tier-1.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}

Create or patch L2VPN service under Tier-1


Create or patch L2VPN service for given Tier-1.
PATCH /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}
PATCH /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}

Create or fully replace L2VPN service under Tier-1


Create or fully replace L2VPN service for given Tier-1. Revision is optional for creation and required for update.
PUT /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}
PUT /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}

Get L2VPN sessions list result under Tier-1


Get paginated list of all L2VPN sessions under Tier-1.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions

Delete L2VPN session under Tier-1


Delete L2VPN session under Tier-1. When L2VPN Service is in CLIENT Mode, the L2VPN Session is deleted along with its transpot tunnels and related resources.
DELETE /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}
DELETE /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}

Get L2VPN Session under Tier-1


Get L2VPN session under Tier-1.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}

Create or patch an L2VPN session under Tier-1


Create or patch an L2VPN session under Tier-1. API supported
only when L2VPN Service is in Server Mode.
PATCH /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}
PATCH /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}

Create or patch an L2VPN session under Tier-1 from Peer Codes


Create or patch an L2VPN session under Tier-1 from Peer Codes.
In addition to the L2VPN Session, the IPSec VPN Session, along
with the IKE, Tunnel, and DPD Profiles are created and owned by
the system. IPSec VPN Service and Local Endpoint are created only
when required, i.e., an IPSec VPN Service does not already exist,
or an IPSec VPN Local Endpoint with same local address does not
already exist.
Updating the L2VPN Session can be performed only through this API
by specifying new peer codes. Use of specific APIs to update the
L2VPN Session and the different resources associated with it is
not allowed, except for IPSec VPN Service and Local Endpoint,
resources that are not system owned.
API supported only when L2VPN Service is in Client Mode.
POST /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}?action=create_with_peer_code
POST /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}?action=create_with_peer_code

Create or fully replace L2VPN session under Tier-1


Create or fully replace L2VPN session under Tier-1. API supported
only when L2VPN Service is in Server Mode.
Revision is optional for creation and required for update.
PUT /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}
PUT /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}

Get L2VPN session detailed status under Tier-1


- no enforcement point path specified: detailed tatus is evaluated on each enforcement point.
- an enforcement point path is specified: detailed status is evaluated only on the given
enforcement point.
- source=realtime: detailed tatus is fetched realtime from the enforcement point.
- source=cached: cached detailed status is returned.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}/detailed-status
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}/detailed-status

Get Tier-1 L2VPN session configuration for the peer site


Get peer config for the Tier-1 L2VPN session to configure the remote
side of the tunnel.
- no enforcement point path specified: L2VPN Session Peer Codes
will be evaluated on each enforcement point.
- enforcement point paths specified: L2VPN Session Peer Codes
are evaluated only on the given enforcement points.
API supported only when L2VPN Service is in Server Mode.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}/peer-config
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}/peer-config

Get L2Vpn session remote mac for logical switch


Returns L2Vpn session remote macs for a logical switch.
Data is fetched from enforcement point.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}/remote-mac
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}/remote-mac

Get L2VPN session statistics under Tier-1


- no enforcement point path specified: statistics are evaluated on each enforcement point.
- an enforcement point path is specified: statistics are evaluated only on the given
enforcement point.
- source=realtime: statistics are fetched realtime from the enforcement point.
- source=cached: cached statistics from the enforcement point are returned.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}/statistics
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/tier-1s/{tier-1-id}/l2vpn-services/{service-id}/sessions/{session-id}/statistics

Get L2VPN service list result under Tier-1


Get paginated list of all L2VPN services under Tier-1.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services (Deprecated)

Delete L2VPN service under Tier-1


Delete L2VPN service for given Tier-1 locale service.
DELETE /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id} (Deprecated)

Get L2VPN service under Tier-1


Get L2VPN service for given Tier-1 locale service.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id} (Deprecated)

Create or patch L2VPN service under Tier-1


Create or patch L2VPN service for given Tier-1 locale service.
PATCH /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id} (Deprecated)

Create or fully replace L2VPN service under Tier-1


Create or fully replace L2VPN service for given Tier-1 locale service.
Revision is optional for creation and required for update.
PUT /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id} (Deprecated)

Get L2VPN sessions list result under Tier-1


Get paginated list of all L2VPN sessions under Tier-1.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions (Deprecated)

Delete L2VPN session under Tier-1


Delete L2VPN session under Tier-1. When L2VPN Service is
in CLIENT Mode, the L2VPN Session is deleted along with its transpot
tunnels and related resources.
DELETE /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id} (Deprecated)

Get L2VPN Session under Tier-1


Get L2VPN session under Tier-1.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id} (Deprecated)

Create or patch an L2VPN session under Tier-1


Create or patch an L2VPN session under Tier-1. API supported
only when L2VPN Service is in Server Mode.
PATCH /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id} (Deprecated)

Create or patch an L2VPN session under Tier-1 from Peer Codes


Create or patch an L2VPN session under Tier-1 from Peer Codes.
In addition to the L2VPN Session, the IPSec VPN Session, along
with the IKE, Tunnel, and DPD Profiles are created and owned by
the system. IPSec VPN Service and Local Endpoint are created only
when required, i.e., an IPSec VPN Service does not already exist,
or an IPSec VPN Local Endpoint with same local address does not
already exist.
Updating the L2VPN Session can be performed only through this API
by specifying new peer codes. Use of specific APIs to update the
L2VPN Session and the different resources associated with it is
not allowed, except for IPSec VPN Service and Local Endpoint,
resources that are not system owned.
API supported only when L2VPN Service is in Client Mode.
POST /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}?action=create_with_peer_code (Deprecated)

Create or fully replace L2VPN session under Tier-1


Create or fully replace L2VPN session under Tier-1. API supported
only when L2VPN Service is in Server Mode.
Revision is optional for creation and required for update.
PUT /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id} (Deprecated)

Get L2VPN session detailed status under Tier-1


- no enforcement point path specified: detailed tatus is evaluated on each enforcement point.
- an enforcement point path is specified: detailed status is evaluated only on the given
enforcement point.
- source=realtime: detailed tatus is fetched realtime from the enforcement point.
- source=cached: cached detailed status is returned.
sessions/<session-id>/detailed-status instead.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}/detailed-status (Deprecated)

Get Tier-1 L2VPN session configuration for the peer site


Get peer config for the Tier-1 L2VPN session to configure the remote
side of the tunnel.
- no enforcement point path specified: L2VPN Session Peer Codes
will be evaluated on each enforcement point.
- enforcement point paths specified: L2VPN Session Peer Codes
are evaluated only on the given enforcement points.
API supported only when L2VPN Service is in Server Mode.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}/peer-config (Deprecated)

Get L2Vpn session remote mac for logical switch


Returns L2Vpn session remote macs for a logical switch.
Data is fetched from enforcement point.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}/remote-mac (Deprecated)

Get L2VPN session statistics under Tier-1


- no enforcement point path specified: statistics are evaluated on each enforcement point.
- an enforcement point path is specified: statistics are evaluated only on the given
enforcement point.
- source=realtime: statistics are fetched realtime from the enforcement point.
- source=cached: cached statistics from the enforcement point are returned.
GET /policy/api/v1/infra/tier-1s/{tier-1-id}/locale-services/{locale-service-id}/l2vpn-services/{service-id}/sessions/{session-id}/statistics (Deprecated)