Skip to content

View or delete active network flows on the node

Request

Returns the node's active network flow table, optionally filtered by protocol, source/destination IP and port, container, or virtual network. Setting action to delete terminates matching flows instead of returning them.


Requires nodes::service:flows or nodes::remote-execute permission.

Security
JWTAuthorizer
Path
nodeIDstringrequired

Node ID

Query
waitinteger

Pass 1 to block until the node responds and return its output.

Value:1
Bodyapplication/json
actionstring
  • read — return matching flows
  • delete — terminate matching flows
Default:"read"
Enum:"read""delete"
protocolstring

Protocol filter. Omit or use any to match all.

Enum:"icmp""tcp""udp""any"
sourcestring

Source IP or CIDR filter

Example:"10.0.0.0/24"
sourcePortinteger

Source port filter

deststring

Destination IP or CIDR filter

Example:"192.168.1.5"
destPortinteger

Destination port filter

containerIdstring

Filter flows belonging to a specific container

networkIdinteger

Filter flows on a specific virtual network ID

curl -i -X POST \
  'https://apidocs.trustgrid.io/_mock/node/{nodeID}/trigger/flows?wait=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "action": "read",
    "protocol": "icmp",
    "source": "10.0.0.0/24",
    "sourcePort": 0,
    "dest": "192.168.1.5",
    "destPort": 0,
    "containerId": "string",
    "networkId": 0
  }'

Responses

OK

Bodyapplication/json
resultobject or string
One of:

Map of protocol to flow list (action=read)

Response
{ "result": { "icmp": [], "tcp": [], "udp": [] } }