Summary
Add /ping to the HTTP REST API.
Use case
Add a /ping endpoint to the HTTP REST API. This allows operators to perform network testing via the REST API. The option defaults a count to ensure the command never runs endlessly and also supports an optional VRF.
curl -k --location --request POST 'https://vyos/ping' \
--form data='{"op": "ping", "host": "1.1.1.1", "count": 5}' \
--form key='MY-HTTPS-API-PLAINTEXT-KEY'curl -k --location --request POST 'https://vyos/ping' \
--form data='{"op": "ping", "host": "1.1.1.1", "count": 5, "vrf": "test"}' \
--form key='MY-HTTPS-API-PLAINTEXT-KEY'