NSX-T Data Center REST API

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.

Request:

Method:
GET
URI Path(s):
/policy/api/v1/infra/tier-0s/{tier-0-id}/l2vpn-services/{service-id}/sessions/{session-id}/statistics
Request Headers:
n/a
Query Parameters:
PolicyRuntimeRequestParameters+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/tier-0s/ServerT0_AS/l2vpn-services/L2Server/sessions/L2Server/statistics

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AggregateL2VPNSessionStatistics+

Example Response:

{ "results": [ { "traffic_statistics_per_segment": [ { "segment_path": "/infra/segments/vlan-500", "packets_out": 406, "bytes_out": 24620, "packets_in": 154, "bytes_in": 9004, "packets_receive_error": 0, "packets_sent_error": 0, "bum_packets_in": 0, "bum_bytes_in": 0, "bum_bytes_out": 0 }, { "segment_path": "/infra/tier-1s/TLR1_Server/segments/l2vpn-segment", "packets_out": 89, "bytes_out": 5258, "packets_in": 22, "bytes_in": 1372, "packets_receive_error": 0, "packets_sent_error": 0, "bum_packets_in": 0, "bum_bytes_in": 0, "bum_bytes_out": 0 }, { "segment_path": "/infra/segments/VNI-400", "packets_out": 198, "bytes_out": 11960, "packets_in": 150, "bytes_in": 8872, "packets_receive_error": 0, "packets_sent_error": 0, "bum_packets_in": 0, "bum_bytes_in": 0, "bum_bytes_out": 0 }, { "segment_path": "/infra/segments/ServerInfraSegment", "packets_out": 106, "bytes_out": 6806, "packets_in": 34, "bytes_in": 2472, "packets_receive_error": 0, "packets_sent_error": 0, "bum_packets_in": 0, "bum_bytes_in": 0, "bum_bytes_out": 0 } ], "tap_traffic_counters": [ { "packets_out": 18, "bytes_out": 1584, "packets_in": 30, "bytes_in": 1920, "packets_receive_error": 0, "packets_sent_error": 0 } ], "display_name": "L2Server", "enforcement_point_path": "/infra/sites/default/enforcement-points/default", "resource_type": "L2VPNSessionStatisticsNsxT" } ], "intent_path": "/infra/tier-0s/ServerT0_AS/l2vpn-services/L2Server/sessions/L2Server" }

Required Permissions:

read

Feature:

policy_statistics

Additional Errors: