#59 API: List Active Sessions
Description
EditImplement endpoint to list all active sessions for a user or tenant.
Endpoint: GET /api/v1/sessions
Query Parameters:
- user_id: Filter by user (optional, admin only)
- active_only: Only show active sessions (default: true)
- page: Page number (default: 1)
- per_page: Results per page (default: 50)
Response: List of sessions with metadata
Required Permissions: tenant_admin for all sessions, users can see own sessions
Implementation Requirements:
- Show session ID, user, IP address, user agent
- Show last activity timestamp
- Show created timestamp
- Show expiration time
- Highlight current session
- Group by user for admin view
With ultra attention to details and correctness.
Before closing: write comment summarizing implementation with screenshot.
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...