Skip to content

Run a traceroute from the node

Request

Runs traceroute to the specified host from the node and streams the output. Use ?wait=1 to block and receive the full traceroute output.


Requires nodes::service:tg-traceroute 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

Example:"8.8.8.8"
filterstring

Additional traceroute flags (space-separated)

Default:"-n"
ifacestring

Network interface to route through

Example:"eth0"
curl -i -X POST \
  'https://apidocs.trustgrid.io/_mock/node/{nodeID}/trigger/tg-traceroute?wait=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "host": "8.8.8.8",
    "filter": "-n",
    "iface": "eth0"
  }'

Responses

OK

Bodyapplication/json
boolean
Response
true