pingFromDevice
POST https://{{host}}/api/v1/sites/:site_id/devices/:device_id/ping
Ping from AP, Switch and SSR
Ping can be performed from the Device. The output will be available through websocket. As there can be multiple command issued against the same AP at the same time and the output all goes through the same websocket stream, session
is introduced for demux.
Body Parameters
Name | Type | Description |
---|---|---|
host | string | host name |
count | int | (Optional) Supported only for ping. default is 10 |
size | int | (Optional) default is 56. Range 56-65535 |
egress_interface | string | (Optional) Interface through which packet needs to egress |
node | string | (Optional) node0 / node1 for HA |
Subscribe to Device Command outputs
{
"subscribe": "/sites/:site_id/devices/:device_id/cmd"
}
The Actual Output Data
{
"event": "data",
"channel": "/sites/4ac1dcf4-9d8b-7211-65c4-057819f0862b/devices/00000000-0000-0000-1000-5c5b350e0060/cmd",
"data": {
"session": "session_id",
"raw": "64 bytes from 23.211.0.110: seq=8 ttl=58 time=12.323 ms\n"
}
}
Request Body
{"host"=>"1.1.1.1", "count"=>10}
RESPONSES
status: OK
{"session":"session_id"}