Establishing a secure WebSocket connection using a script
Prerequisites
访问开关必须enabl REST APIed. 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 secure WebSocket connection request.
- When you create the secure WebSocket connection, use the following URL:
wss://
/休息/v10.04/notification
is the IP address of the switch.For example:
wss://192.0.2.5/休息/v10.04/notification
- The exact methods to use to create connections and handle notification messages depend on the scripting language and library module you choose.