getSiteGatewaySessions
POST https://{{host}}/api/v1/sites/:site_id/devices/:device_id/show_session
Get active sessions passing through the Device.
The output will be available through websocket. As there can be multiple command issued against the same device at the same time and the output all goes through the same websocket stream, session
is introduced for demux.
Parameters
Name | Type | Description |
---|---|---|
service_name | string | (Optional) The exact service name for which to display the active sessions |
session_id | string | (Optional) Show session details by session_id |
node | string | (Optional) node0 / node1 for HA |
subscribe to Device Command outputs
{
"subscribe": "/sites/:site_id/devices/:device_id/cmd"
}
Example output from ws stream
dmin@ssr.node# show sessions
Fri 2020-04-17 16:55:34 UTC
Node: node1
====================================== ===== ============= =========== ========== ====== ======= ================= ========== ================= =========== ================= ========== =================== ========= =================
Session Id Dir Service Tenant Dev Name VLAN Proto Src IP Src Port Dest IP Dest Port NAT IP NAT Port Payload Encrypted Timeout Uptime
====================================== ===== ============= =========== ========== ====== ======= ================= ========== ================= =========== ================= ========== =================== ========= =================
01187fb8-765a-45e5-ae90-37d77f15e292 fwd Internet lanSubnet lan 0 udp 192.168.0.28 44674 35.166.173.18 9930 96.230.191.130 19569 false 154 0 days 0:00:28
01187fb8-765a-45e5-ae90-37d77f15e292 rev Internet lanSubnet wan 0 udp 35.166.173.18 9930 96.230.191.130 19569 0.0.0.0 0 false 154 0 days 0:00:28
0859a4ae-bcff-4aa6-b812-79a5236a6c13 fwd Internet lanSubnet lan 0 tcp 192.168.0.41 60843 17.249.171.246 443 96.230.191.130 51941 false 2 0 days 0:00:10
admin@node0.90ec7732e327# show sessions by-id 262900cd-bca8-443a-8aab-e5c93d147ab5
Wed 2024-06-26 20:37:48 UTC
Retrieving session information...
=======================================================================================================================================================================================
90ec7732e327.node0 Session ID: 262900cd-bca8-443a-8aab-e5c93d147ab5
=======================================================================================================================================================================================
Service Name: Internet
Service Route Name: Internet-sr-local-breakout-1-node0
Session Source: SourceType: PUBLIC
Session Type: HTTPS
Service Class: service-class-0-low
Source Tenant: LAN
Peer Name: N/A
Inter Node: N/A
Inter Router: N/A
Ingress Source Nat: N/A
Payload Security Policy: internal
Payload Encrypted: True
Common Name Info: N/A
Tcp Time To Establish: 76
Tls Time To Establish: 76
Domain Name: N/A
Uri: N/A
Category: N/A
...
Request Body
{"service_name"=>"any"}
RESPONSES
status: OK
{"session":"session_id"}