Skip to content

Ping a host through a virtual network namespace on the node

Request

Runs ip netns exec mgmt-{network} ping {host} on the node, testing reachability from inside the specified virtual network context. Output streams as terminal text.

Use ?wait=1 to block and receive the output.


Requires nodes::service:tg-net-ping 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/jsonrequired
hoststringrequired

Target IP or hostname to ping

Example:"10.0.0.1"
networkstringrequired

Virtual network name to use as the source namespace

Example:"virtual-network"
curl -i -X POST \
  'https://apidocs.trustgrid.io/_mock/node/{nodeID}/trigger/tg-net-ping?wait=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "host": "10.0.0.1",
    "network": "virtual-network"
  }'

Responses

OK

Bodyapplication/json
boolean
Response
true