NSX-T Data Center REST API

Get security policy statistics

Get statistics of a security policy.
- no enforcement point path specified: Stats will be evaluated on each enforcement
point.
- {enforcement_point_path}: Stats are evaluated only on the given enforcement point.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX.

Request:

Method:
GET
URI Path(s):
/policy/api/v1/orgs/{org-id}/projects/{project-id}/vpcs/{vpc-id}/security-policies/{security-policy-id}/statistics
Request Headers:
n/a
Query Parameters:
StatisticsRequestParameters+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/orgs/org-1/projects/project-1/vpcs/vpc-1/security-policies/sp-1/statistics?enforcement_point_path=/infra/sites/default/enforcement-points/default

Successful Response:

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

Example Response:

{ "results": [ { "enforcement_point": "/infra/sites/default/enforcement-points/default", "statistics": { "internal_section_id": "db344da4-80bc-4a5f-8571-bec298b2eb03", "results": [ { "internal_rule_id": "7168", "packet_count": 57, "byte_count": 6008, "session_count": 4, "hit_count": 5, "l7_accept_count": 0, "l7_reject_count": 0, "l7_reject_with_response_count": 0, "popularity_index": 0, "max_popularity_index": 0, "max_session_count": 0, "total_session_count": 0 } ], "result_count": 1 } } ], "result_count": 1 }

Required Permissions:

read

Feature:

policy_dfw

Additional Errors: