MCP Gateway
ApiSessions

Get session statistics

Get session statistics including active, expired, and idle session counts. Requires admin role. This is an API-only endpoint for programmatic access — no frontend UI currently consumes it.

GET
/api/v1/sessions/stats

Authorization

User API Key
AuthorizationBearer <token>

User API key (mgw_usr_live_* or mgw_usr_test_*)

In: header

access_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/sessions/stats"
{
  "total_active": 0,
  "server_sessions": 0,
  "bundle_sessions": 0,
  "expired_not_cleaned": 0,
  "idle_sessions": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}