Skip to main content

sessions_handler

Function sessions_handler 

Source
pub(crate) async fn sessions_handler(
    __arg0: State<Arc<SessionManager>>,
) -> Json<Vec<SessionInfo>>
Expand description

REST endpoint to get information about all active sessions.

Returns a JSON array of SessionInfo objects containing:

  • session_id: Unique session identifier
  • connection_count: Number of active WebSocket connections
  • timeout_remaining_secs: Seconds until session cleanup (if disconnected)
  • is_shutting_down: Whether session is marked for shutdown

This endpoint is used by the UI’s session management dialog to display available sessions and allow users to connect to specific ones.