get_flow_data
Query network traffic flows from Firewalla MSP, filter by region, protocol, or status, and paginate results with cursors or streaming sessions.
Instructions
Query network traffic flows from the Firewalla MSP API (GET /v2/flows). Without a ts: qualifier the API covers the last 24 hours. Returns up to limit flows and a cursor for the next page, or groups with groupBy; coverage gives the oldest and newest ts returned and why paging stopped. A limit over 50 is streamed: pass nextContinuationToken back as cursor, or sessionId as streaming_session_id. Scoped to FIREWALLA_BOX_ID when set, otherwise every box.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results (optional, default: 200, at most 1000; read 500 per request, following the cursor) | |
| query | No | Search query for flows. Supports region:US for geographic filtering, protocol:tcp, status:blocked, domain:*, category:social, etc. Terms joined by spaces or AND must all match; OR works between values of one field (sent as a comma list, e.g. region:US,CN) and is refused across fields; NOT or a leading - excludes. | |
| cursor | No | Pagination cursor from a previous response: pagination.cursor, or the nextContinuationToken of a streamed one. Returns the page at that cursor, not streamed. | |
| sortBy | No | Sort flows (default: "ts:desc") | |
| stream | No | true streams any limit, false returns a plain page with pagination.cursor (default: a limit over 50 is streamed) | |
| groupBy | No | Fields to group by, comma-separated, e.g. "category", "domain", "device", "box" or "device,category". The API then returns groups instead of flows: groups of { key, count, download, upload, total }, where key holds the group fields (gid for box; for device the device with its name, but only its id for "device,category") and the rest are the group's summed connection count and bytes. | |
| response_format | No | Response format. 'json' (default): the compact JSON response. 'markdown': the same response as readable markdown, its fields as bullet lists and each list of records as a table of up to 8 columns and DEFAULT_PAGE_SIZE rows (default 100), ending with a line that says what the view leaves out. Omitted or null: 'json'. Errors are JSON either way. | json |
| streaming_session_id | No | The sessionId of a streamed response: returns its next chunk, of the same size. A session expires 10 minutes after its latest chunk. Refused with stream: false; with a cursor, the cursor is read instead. |