Ping a remote server
POST/network/ping
Send a ping to a remote server to verify network connectivity.
Request
- application/json
Body
required
The server to ping.
The IP address of the server to ping. Supports both IPv4 and IPv6.
Responses
- 200
- 400
- 500
Successful ping response.
- application/json
- Schema
- Example (from schema)
Schema
Number of packets sent.
Number of packets received.
Percentage of packet loss.
Minimum round-trip time as a string in Go's time.Duration format.
Average round-trip time as a string in Go's time.Duration format.
Maximum round-trip time as a string in Go's time.Duration format.
{
"packets_sent": 4,
"packets_received": 4,
"packet_loss": 0,
"min_rtt": "14.637103ms",
"avg_rtt": "18.647498ms",
"max_rtt": "24.309240ms"
}
Invalid request payload.
- application/json
- Schema
- Example (from schema)
Schema
A description of the error that occurred.
Additional details about the error, specifying which component failed.
The error code.
{
"error": "Failed to retrieve network status.",
"details": "Failed to get DNS servers 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, specifying which component failed.
The error code.
{
"error": "Failed to retrieve network status.",
"details": "Failed to get DNS servers due to network timeout.",
"code": 500
}