Skip to content

Latest commit

 

History

History
101 lines (79 loc) · 2.37 KB

File metadata and controls

101 lines (79 loc) · 2.37 KB

Data - Firewall Statistics

A HTTP GET to /api/edge/data.json?data=fw_stats can be used to get a JSON formatted list of firewall statistics.

Response

Root

Name Type Values Description

success

String

A boolean encapsulated in a string (e.g. "0" or "1")

Whether the API request was successful.

output

Object

output object

The output to the data request.

output Object

Name Type Values Description

name

Array of Dictionary

firewall-ruleset-stats object(s)

An array of dictionary items of firewall-ruleset-stats objects that contains each of the IPv4 firewall rulesets and their rule statistics.

ipv6-name (Optional)

Array of Dictionary

firewall-ruleset-stats object(s)

An array of dictionary items of firewall-ruleset-stats objects that contains each of the IPv6 firewall rulesets and their rule statistics.

firewall-ruleset-stats Object

Name Type Values Description

Key

String

The unique name of a particular firewall ruleset (e.g. WAN_IN)

A property that represents the unique firewall ruleset name.

Value

Array (Object)

Array of firewall-rule-stats

An object that represents a particular firewall rule’s statistics.

firewall-rule-stats Object

Name Type Values Description

rule

String

A number encapsulated in a string (e.g. "10")

The rule number for this particular firewall entry.

pkts

String

A number encapsulated in a string (e.g. "36837")

The number of packets that this firewall rule has matched.

bytes

String

A number encapsulated in a string (e.g. "6953322")

The number of bytes that this firewall rule has matched.

Examples

Successful Response

GET /api/edge/data.json?data=fw_stats Response
{"success": "1", "output": {"name": [{"WAN_IN": [{"rule": "10", "pkts": "36837", "bytes": "6953322"}, {"rule": "20", "pkts": "0", "bytes": "0"}, {"rule": "21", "pkts": "3", "bytes": "184"}, {"rule": "22", "pkts": "0", "bytes": "0"}, {"rule": "10000", "pkts": "0", "bytes": "0"}], "WAN_LOCAL": [{"rule": "10", "pkts": "3875", "bytes": "589011"}, {"rule": "20", "pkts": "342", "bytes": "21329"}, {"rule": "10000", "pkts": "3236", "bytes": "262149"}]}]}}