Example: Ping operations using REST APIs

This example gets ping statistics for the ping target.

Example method and URI:

GET "https://192.168.0.1/rest/v1/ping?
ping_target=192.0.2.10&
is_ipv4=true&
ping_data_size=100&
ping_time_out=2&
ping_repetitions=1&
ping_type_of_service=0&
include_time_stamp=false&
include_time_stamp_address=false&
record_route=false&
mgmt=false"

Example curl command:

$ curl -k --noproxy 192.0.2.5 GET \
-b /tmp/primary_auth_cookie \
"https://192.168.0.1/rest/v1/ping? 

ping_target=192.0.2.10& 
is_ipv4=true&
ping_data_size=100&
ping_time_out=2&
ping_repetitions=1&
ping_type_of_service=0&
include_time_stamp=false&
include_time_stamp_address=false&
record_route=false&
mgmt=false"

On successful completion, the switch returns response code 200 OK and a response body containing the output string produced by the ping operation.