Use Case Clearing Login Sessions

Clearing login sessions.

WorkStation# curl --noproxy 192.168.1.1 -v -k --cookie "cookie":"<<Session id>>" -X DELETE http://192.168.1.1:80/rest/v1/login-sessions
[root@UbuntuServer54185 ~]# curl --noproxy 192.168.1.1 -v -k --cookie "cookie":"sessionId=wv6Nahl7D7dCw4egR5Nnu2d76qs93Y98g3CCwECmEAX8XkVNQGfV0sYDY4thzyJ" -X DELETE http://192.168.1.1:80/rest/v1/login-sessions * About to connect() to 192.168.1.1 port 80 (#0) * Trying 192.168.1.1... connected > DELETE /rest/v1/login-sessions HTTP/1.1 > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: 192.168.1.1 > Accept: */* > Cookie: cookie:sessionId=wv6Nahl7D7dCw4egR5Nnu2d76qs93Y98g3CCwECmEAX8XkVNQGfV0sYDY4thzyJ > < HTTP/1.1 204 No Content < Server: eHTTP v2.0 < Connection: keep-alive < RequestId: < * Connection #0 to host 192.168.1.1 left intact * Closing connection #0 [root@UbuntuServer54185 ~]# [root@UbuntuServer54185 ~]#

To clear all REST API sessions in switch, use either one of the options.

  • Enable/Disable rest-interface.
  • Reboot the switch.

To clear a specific session id, use the DELETE method in the Service RestLoginSessions.