Ping a remote server
POST/node/:hostname/network/ping
Send a ping to a remote server to verify network connectivity.
Request
Path Parameters
Possible values: non-empty
Target agent hostname, reserved routing value (_any, _all), or label selector (key:value).
- application/json
Body
required
The server to ping.
The IP address of the server to ping. Supports both IPv4 and IPv6. Also accepts @fact. references that are resolved agent-side.
Responses
- 200
- 400
- 401
- 403
- 500
Successful ping response.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
The job ID used to process this request.
results
object[]
required
The hostname of the agent that executed the ping.
Number of packets sent.
Number of packets received.
Percentage of packet loss.
Minimum round-trip time in Go time.Duration format.
Average round-trip time in Go time.Duration format.
Maximum round-trip time in Go time.Duration format.
Whether the operation modified system state.
Error message if the agent failed.
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"results": [
{
"hostname": "string",
"packets_sent": 4,
"packets_received": 4,
"packet_loss": 0,
"min_rtt": "14.637103ms",
"avg_rtt": "18.647498ms",
"max_rtt": "24.309240ms",
"changed": true,
"error": "string"
}
]
}
Invalid request payload.
- application/json
- Schema
- Example (from schema)
Schema
A description of the error that occurred.
Additional details about the error.
The error code.
{
"error": "Failed to retrieve status.",
"details": "Failed due to network timeout.",
"code": 500
}
Unauthorized - API key required
- application/json
- Schema
- Example (from schema)
Schema
A description of the error that occurred.
Additional details about the error.
The error code.
{
"error": "Failed to retrieve status.",
"details": "Failed due to network timeout.",
"code": 500
}
Forbidden - Insufficient permissions
- application/json
- Schema
- Example (from schema)
Schema
A description of the error that occurred.
Additional details about the error.
The error code.
{
"error": "Failed to retrieve status.",
"details": "Failed due to network timeout.",
"code": 500
}
Error performing the ping operation.
- application/json
- Schema
- Example (from schema)
Schema
A description of the error that occurred.
Additional details about the error.
The error code.
{
"error": "Failed to retrieve status.",
"details": "Failed due to network timeout.",
"code": 500
}