HomeGuidesAPI Reference
API Reference

Get aggregated port statistics for multiple appliances

Retrieves aggregated port statistics for multiple appliances specified in the request body. Data is queried from the 'hourlytopport' ClickHouse table and grouped by is_source, is_known, protocol, and port. Results are sorted by total LAN throughput (LANRX_BYTES + LANTX_BYTES) descending. Use the lastHour parameter for fallback data retrieval when current time range has no data.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
int64
required

Start of time range in seconds since EPOCH. Must be less than endTime. Validated by validateTime() method.

int64
required

End of time range in seconds since EPOCH. Must be greater than startTime. Validated by validateTime() method.

integer
enum

Filter by port direction. 1 = source port, 0 = destination port. Omit to include both directions.

Allowed:
integer
enum

Filter by application classification. 1 = known application port, 0 = unclassified. Omit to include both.

Allowed:
integer
0 to 255

Filter by IP protocol number. Common values: 6 (TCP), 17 (UDP), 1 (ICMP). Omit to include all protocols.

integer
0 to 65535

Filter by specific port number. Omit to include all ports.

integer
≥ 1

Limit results to top N records sorted by total LAN bytes (LANRX_BYTES + LANTX_BYTES) descending.

boolean

When true, results are grouped by appliance (nePk column included in GROUP BY). Each appliance returns separate stats.

boolean

Fallback mechanism: if true and no data found in time range, automatically queries (startTime-3600, endTime-3600). Useful for dashboards.

Body Params

JSON object containing list of appliance IDs. At least one nePk required. Validated by validateNePks() method.

Request body containing the list of appliance identifiers.

nePks
array of objects
required

List of appliance identifiers (nePks).

nePks*
Responses

401

Unauthorized. Missing or invalid authentication token.

403

Forbidden. User lacks READ or READ_WRITE permission for the requested appliances.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json