Establishing a WebSocket secure connection using a script
Prerequisites
Access to the switch REST API must be enabled. The REST API access mode can be either read-only or read/write.
Procedure
- If you are using a script, you must include the actions to log in, get the session cookie, store the session cookie, and pass the session cookie with the WebSocket secure connection request.
-
When you create the WebSocket secure connection, use the following URL:
wss://<IP-ADDR>/rest/v1/notification
<IP-ADDR>
is the IP address of the switch.For example:
wss://192.0.2.5/rest/v1/notification
- The exact methods to use to create connections and handle notification messages depend on the scripting language and library module you choose.