Management Plane API > Security > Services > Firewall

Get an Existing Section, Including Rules

Returns firewall section information with rules for a section identifier.
When invoked on a section with a large number of rules, this API is supported
only at low rates of invocation (not more than 4-5 times per minute). The
typical latency of this API with about 1024 rules is about 4-5 seconds. This
API should not be invoked with large payloads at automation speeds. More than
50 rules with a large number rule references is not supported.

Instead, to read firewall rules, use:
GET /api/v1/firewall/sections/<section-id>/rules with the appropriate
page_size.

Request:

Method:
POST
URI Path(s):
/api/v1/firewall/sections/<section-id>?action=list_with_rules
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request:

POST https://<nsx-mgr>/api/v1/firewall/sections/65a60890-6f48-418d-a7d5-5aaf65fc4e5b?action=list_with_rules

Successful Response:

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

Example Response:

{ "resource_type": "FirewallSectionRuleList", "description": "protects app VMs", "id": "65a60890-6f48-418d-a7d5-5aaf65fc4e5b", "display_name": "app-firewall", "section_type": "LAYER3", "is_default": false, "stateful": true, "rule_count": 1, "rules": [ { "id": "1932288", "display_name": "block ftp", "notes": "", "destinations_excluded": false, "services": [ { "service": { "resource_type": "ALGTypeNSService", "destination_ports": [ "21" ], "source_ports": [], "alg": "FTP" } } ], "ip_protocol": "IPV4_IPV6", "rule_tag": "", "logged": false, "action": "REJECT", "sources_excluded": false, "disabled": false, "direction": "IN_OUT", "_revision": 1 } ], "locked": true, "comments": "Locked the section", "lock_modified_by": "admin", "lock_modified_time": "1445912484445", "_last_modified_user": "admin", "_last_modified_time": 1445912484450, "_revision": 1 }

Required Permissions:

read

Feature:

firewall_general

Additional Errors: