{ "total_tests": 24, "passed": 7, "failed": 17, "errors": [ "WebSocket /ws/pose - Exception: server rejected WebSocket connection: HTTP 403", "WebSocket /ws/hardware - Exception: server rejected WebSocket connection: HTTP 403" ], "test_details": [ { "test_name": "GET /health/health", "description": "System health check", "url": "http://localhost:8000/health/health", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1007.28, "response_data": { "status": "unhealthy", "timestamp": "2025-06-07T12:28:55.762672", "uptime_seconds": 0.0, "components": { "hardware": { "name": "Hardware Service", "status": "unhealthy", "message": "Health check failed: 'HardwareService' object has no attribute 'health_check'", "last_check": "2025-06-07T12:28:55.762672", "uptime_seconds": null, "metrics": null }, "pose": { "name": "Pose Service", "status": "healthy", "message": "Service is running normally", "last_check": "2025-06-07T12:28:55.762672", "uptime_seconds": 0.0, "metrics": { "total_processed": 7957, "success_rate": 1.0, "average_processing_time_ms": 0.7798933014955369 } }, "stream": { "name": "Stream Service", "status": "unhealthy", "message": "Health check failed: 'StreamService' object has no attribute 'health_check'", "last_check": "2025-06-07T12:28:55.762672", "uptime_seconds": null, "metrics": null } }, "system_metrics": { "cpu": { "percent": 42.2, "count": 2 }, "memory": { "total_gb": 7.75, "available_gb": 3.4, "used_gb": 3.99, "percent": 56.2 }, "disk": { "total_gb": 31.33, "free_gb": 7.99, "used_gb": 21.72, "percent": 69.34 }, "network": { "bytes_sent": 3735289492, "bytes_recv": 37107794581, "packets_sent": 1163504, "packets_recv": 25763938 } } }, "success": true, "timestamp": "2025-06-07T12:28:56.764536" }, { "test_name": "GET /health/ready", "description": "Readiness check", "url": "http://localhost:8000/health/ready", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 2.54, "response_data": { "ready": false, "timestamp": "2025-06-07T12:28:56.766715", "checks": {}, "message": "Readiness check failed: 'HardwareService' object has no attribute 'is_ready'" }, "success": true, "timestamp": "2025-06-07T12:28:56.767265" }, { "test_name": "POST /api/v1/pose/estimate", "description": "Basic pose estimation", "url": "http://localhost:8000/api/v1/pose/estimate", "method": "POST", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.97, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/pose/estimate" } }, "success": false, "timestamp": "2025-06-07T12:28:56.768369" }, { "test_name": "POST /api/v1/pose/estimate", "description": "Pose estimation with parameters", "url": "http://localhost:8000/api/v1/pose/estimate", "method": "POST", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.87, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/pose/estimate" } }, "success": false, "timestamp": "2025-06-07T12:28:56.769596" }, { "test_name": "POST /api/v1/pose/analyze", "description": "Pose analysis", "url": "http://localhost:8000/api/v1/pose/analyze", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.1, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error", "path": "/api/v1/pose/analyze" } }, "success": false, "timestamp": "2025-06-07T12:28:56.771001" }, { "test_name": "GET /api/v1/pose/zones/zone_1/occupancy", "description": "Zone occupancy", "url": "http://localhost:8000/api/v1/pose/zones/zone_1/occupancy", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.35, "response_data": { "zone_id": "zone_1", "current_occupancy": 1, "max_occupancy": 10, "persons": [ { "person_id": "person_0", "confidence": 0.9419077493534322, "activity": "walking" } ], "timestamp": "2025-06-07T12:28:56.771914" }, "success": true, "timestamp": "2025-06-07T12:28:56.772481" }, { "test_name": "GET /api/v1/pose/zones/summary", "description": "All zones summary", "url": "http://localhost:8000/api/v1/pose/zones/summary", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.21, "response_data": { "timestamp": "2025-06-07T12:28:56.773322", "total_persons": 7, "zones": { "zone_1": { "occupancy": 2, "max_occupancy": 10, "status": "active" }, "zone_2": { "occupancy": 1, "max_occupancy": 10, "status": "active" }, "zone_3": { "occupancy": 2, "max_occupancy": 10, "status": "active" }, "zone_4": { "occupancy": 2, "max_occupancy": 10, "status": "active" } }, "active_zones": 4 }, "success": true, "timestamp": "2025-06-07T12:28:56.774037" }, { "test_name": "GET /api/v1/pose/historical", "description": "Historical pose data", "url": "http://localhost:8000/api/v1/pose/historical", "method": "GET", "expected_status": 200, "actual_status": 405, "response_time_ms": 0.91, "response_data": { "error": { "code": 405, "message": "Method Not Allowed", "type": "http_error", "path": "/api/v1/pose/historical" } }, "success": false, "timestamp": "2025-06-07T12:28:56.775097" }, { "test_name": "GET /api/v1/pose/activities/recent", "description": "Recent activities", "url": "http://localhost:8000/api/v1/pose/activities/recent", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.78, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/pose/activities/recent" } }, "success": false, "timestamp": "2025-06-07T12:28:56.776228" }, { "test_name": "GET /api/v1/calibration/status", "description": "Calibration status", "url": "http://localhost:8000/api/v1/calibration/status", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.9, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/calibration/status" } }, "success": false, "timestamp": "2025-06-07T12:28:56.777282" }, { "test_name": "POST /api/v1/calibration/start", "description": "Start calibration", "url": "http://localhost:8000/api/v1/calibration/start", "method": "POST", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.81, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/calibration/start" } }, "success": false, "timestamp": "2025-06-07T12:28:56.778372" }, { "test_name": "GET /api/v1/statistics", "description": "System statistics", "url": "http://localhost:8000/api/v1/statistics", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.87, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/statistics" } }, "success": false, "timestamp": "2025-06-07T12:28:56.779653" }, { "test_name": "GET /api/v1/hardware/status", "description": "Hardware status", "url": "http://localhost:8000/api/v1/hardware/status", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.9, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/hardware/status" } }, "success": false, "timestamp": "2025-06-07T12:28:56.780706" }, { "test_name": "GET /api/v1/hardware/routers", "description": "Router information", "url": "http://localhost:8000/api/v1/hardware/routers", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.75, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/hardware/routers" } }, "success": false, "timestamp": "2025-06-07T12:28:56.781763" }, { "test_name": "GET /api/v1/hardware/routers/main_router", "description": "Specific router info", "url": "http://localhost:8000/api/v1/hardware/routers/main_router", "method": "GET", "expected_status": 200, "actual_status": 404, "response_time_ms": 0.83, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/hardware/routers/main_router" } }, "success": false, "timestamp": "2025-06-07T12:28:56.782949" }, { "test_name": "GET /api/v1/stream/status", "description": "Stream status", "url": "http://localhost:8000/api/v1/stream/status", "method": "GET", "expected_status": 200, "actual_status": 500, "response_time_ms": 1.2, "response_data": { "error": { "code": 500, "message": "Failed to get stream status: 'is_active'", "type": "http_error", "path": "/api/v1/stream/status" } }, "success": false, "timestamp": "2025-06-07T12:28:56.784463" }, { "test_name": "POST /api/v1/stream/start", "description": "Start streaming", "url": "http://localhost:8000/api/v1/stream/start", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.3, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error", "path": "/api/v1/stream/start" } }, "success": false, "timestamp": "2025-06-07T12:28:56.785880" }, { "test_name": "POST /api/v1/stream/stop", "description": "Stop streaming", "url": "http://localhost:8000/api/v1/stream/stop", "method": "POST", "expected_status": 200, "actual_status": 401, "response_time_ms": 1.27, "response_data": { "error": { "code": 401, "message": "Authentication required", "type": "http_error", "path": "/api/v1/stream/stop" } }, "success": false, "timestamp": "2025-06-07T12:28:56.787501" }, { "test_name": "WebSocket /ws/pose", "description": "Pose data WebSocket", "url": "ws://localhost:8000/ws/pose", "method": "WebSocket", "response_time_ms": null, "response_data": null, "success": false, "error": "server rejected WebSocket connection: HTTP 403", "traceback": "Traceback (most recent call last):\n File \"/workspaces/wifi-densepose/scripts/test_api_endpoints.py\", line 164, in test_websocket_endpoint\n async with websockets.connect(ws_url) as websocket:\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 587, in __aenter__\n return await self\n ^^^^^^^^^^\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 543, in __await_impl__\n await self.connection.handshake(\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 114, in handshake\n raise self.protocol.handshake_exc\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 325, in parse\n self.process_response(response)\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 142, in process_response\n raise InvalidStatus(response)\nwebsockets.exceptions.InvalidStatus: server rejected WebSocket connection: HTTP 403\n", "timestamp": "2025-06-07T12:28:56.810344" }, { "test_name": "WebSocket /ws/hardware", "description": "Hardware status WebSocket", "url": "ws://localhost:8000/ws/hardware", "method": "WebSocket", "response_time_ms": null, "response_data": null, "success": false, "error": "server rejected WebSocket connection: HTTP 403", "traceback": "Traceback (most recent call last):\n File \"/workspaces/wifi-densepose/scripts/test_api_endpoints.py\", line 164, in test_websocket_endpoint\n async with websockets.connect(ws_url) as websocket:\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 587, in __aenter__\n return await self\n ^^^^^^^^^^\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 543, in __await_impl__\n await self.connection.handshake(\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/asyncio/client.py\", line 114, in handshake\n raise self.protocol.handshake_exc\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 325, in parse\n self.process_response(response)\n File \"/usr/local/python/3.12.1/lib/python3.12/site-packages/websockets/client.py\", line 142, in process_response\n raise InvalidStatus(response)\nwebsockets.exceptions.InvalidStatus: server rejected WebSocket connection: HTTP 403\n", "timestamp": "2025-06-07T12:28:56.813660" }, { "test_name": "GET /docs", "description": "API documentation", "url": "http://localhost:8000/docs", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 0.93, "response_data": { "raw_response": "\n \n \n \n \n \n WiFi-DensePose API - Swagger UI\n \n \n
\n
\n \n \n \n \n \n " }, "success": true, "timestamp": "2025-06-07T12:28:56.814706" }, { "test_name": "GET /openapi.json", "description": "OpenAPI schema", "url": "http://localhost:8000/openapi.json", "method": "GET", "expected_status": 200, "actual_status": 200, "response_time_ms": 1.01, "response_data": { "openapi": "3.1.0", "info": { "title": "WiFi-DensePose API", "description": "WiFi-based human pose estimation and activity recognition API", "version": "1.0.0" }, "paths": { "/health/health": { "get": { "tags": [ "Health" ], "summary": "Health Check", "description": "Comprehensive system health check.", "operationId": "health_check_health_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SystemHealth" } } } } } } }, "/health/ready": { "get": { "tags": [ "Health" ], "summary": "Readiness Check", "description": "Check if system is ready to serve requests.", "operationId": "readiness_check_health_ready_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReadinessCheck" } } } } } } }, "/health/live": { "get": { "tags": [ "Health" ], "summary": "Liveness Check", "description": "Simple liveness check for load balancers.", "operationId": "liveness_check_health_live_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/health/metrics": { "get": { "tags": [ "Health" ], "summary": "Get System Metrics", "description": "Get detailed system metrics.", "operationId": "get_system_metrics_health_metrics_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/health/version": { "get": { "tags": [ "Health" ], "summary": "Get Version Info", "description": "Get application version information.", "operationId": "get_version_info_health_version_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/pose/current": { "get": { "tags": [ "Pose Estimation" ], "summary": "Get Current Pose Estimation", "description": "Get current pose estimation from WiFi signals.", "operationId": "get_current_pose_estimation_api_v1_pose_current_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "confidence_threshold", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Confidence Threshold" } }, { "name": "max_persons", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 50, "minimum": 1 }, { "type": "null" } ], "title": "Max Persons" } }, { "name": "include_keypoints", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Include Keypoints" } }, { "name": "include_segmentation", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Segmentation" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "title": "Zone Ids" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoseEstimationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/pose/analyze": { "post": { "tags": [ "Pose Estimation" ], "summary": "Analyze Pose Data", "description": "Trigger pose analysis with custom parameters.", "operationId": "analyze_pose_data_api_v1_pose_analyze_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoseEstimationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoseEstimationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/pose/zones/{zone_id}/occupancy": { "get": { "tags": [ "Pose Estimation" ], "summary": "Get Zone Occupancy", "description": "Get current occupancy for a specific zone.", "operationId": "get_zone_occupancy_api_v1_pose_zones__zone_id__occupancy_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "zone_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Zone Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/pose/zones/summary": { "get": { "tags": [ "Pose Estimation" ], "summary": "Get Zones Summary", "description": "Get occupancy summary for all zones.", "operationId": "get_zones_summary_api_v1_pose_zones_summary_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/pose/historical": { "post": { "tags": [ "Pose Estimation" ], "summary": "Get Historical Data", "description": "Get historical pose estimation data.", "operationId": "get_historical_data_api_v1_pose_historical_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HistoricalDataRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/pose/activities": { "get": { "tags": [ "Pose Estimation" ], "summary": "Get Detected Activities", "description": "Get recently detected activities.", "operationId": "get_detected_activities_api_v1_pose_activities_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "zone_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by zone ID", "title": "Zone Id" }, "description": "Filter by zone ID" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Maximum number of activities", "default": 10, "title": "Limit" }, "description": "Maximum number of activities" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/pose/calibrate": { "post": { "tags": [ "Pose Estimation" ], "summary": "Calibrate Pose System", "description": "Calibrate the pose estimation system.", "operationId": "calibrate_pose_system_api_v1_pose_calibrate_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/pose/calibration/status": { "get": { "tags": [ "Pose Estimation" ], "summary": "Get Calibration Status", "description": "Get current calibration status.", "operationId": "get_calibration_status_api_v1_pose_calibration_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/pose/stats": { "get": { "tags": [ "Pose Estimation" ], "summary": "Get Pose Statistics", "description": "Get pose estimation statistics.", "operationId": "get_pose_statistics_api_v1_pose_stats_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "hours", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 168, "minimum": 1, "description": "Hours of data to analyze", "default": 24, "title": "Hours" }, "description": "Hours of data to analyze" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/stream/status": { "get": { "tags": [ "Streaming" ], "summary": "Get Stream Status", "description": "Get current streaming status.", "operationId": "get_stream_status_api_v1_stream_status_get", "parameters": [ { "name": "websocket_token", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Websocket Token" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StreamStatus" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/stream/start": { "post": { "tags": [ "Streaming" ], "summary": "Start Streaming", "description": "Start the streaming service.", "operationId": "start_streaming_api_v1_stream_start_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/stream/stop": { "post": { "tags": [ "Streaming" ], "summary": "Stop Streaming", "description": "Stop the streaming service.", "operationId": "stop_streaming_api_v1_stream_stop_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/stream/clients": { "get": { "tags": [ "Streaming" ], "summary": "Get Connected Clients", "description": "Get list of connected WebSocket clients.", "operationId": "get_connected_clients_api_v1_stream_clients_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/stream/clients/{client_id}": { "delete": { "tags": [ "Streaming" ], "summary": "Disconnect Client", "description": "Disconnect a specific WebSocket client.", "operationId": "disconnect_client_api_v1_stream_clients__client_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Client Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/stream/broadcast": { "post": { "tags": [ "Streaming" ], "summary": "Broadcast Message", "description": "Broadcast a message to connected WebSocket clients.", "operationId": "broadcast_message_api_v1_stream_broadcast_post", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "stream_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Target stream type", "title": "Stream Type" }, "description": "Target stream type" }, { "name": "zone_ids", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "Target zone IDs", "title": "Zone Ids" }, "description": "Target zone IDs" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Message" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/stream/metrics": { "get": { "tags": [ "Streaming" ], "summary": "Get Streaming Metrics", "description": "Get streaming performance metrics.", "operationId": "get_streaming_metrics_api_v1_stream_metrics_get", "parameters": [ { "name": "websocket_token", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Websocket Token" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/": { "get": { "summary": "Root", "description": "Root endpoint with API information.", "operationId": "root__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/info": { "get": { "summary": "Api Info", "description": "Get detailed API information.", "operationId": "api_info_api_v1_info_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/status": { "get": { "summary": "Api Status", "description": "Get current API status.", "operationId": "api_status_api_v1_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/metrics": { "get": { "summary": "Api Metrics", "description": "Get API metrics.", "operationId": "api_metrics_api_v1_metrics_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/dev/config": { "get": { "summary": "Dev Config", "description": "Get current configuration (development only).", "operationId": "dev_config_api_v1_dev_config_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/dev/reset": { "post": { "summary": "Dev Reset", "description": "Reset services (development only).", "operationId": "dev_reset_api_v1_dev_reset_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } } }, "components": { "schemas": { "ComponentHealth": { "properties": { "name": { "type": "string", "title": "Name", "description": "Component name" }, "status": { "type": "string", "title": "Status", "description": "Health status (healthy, degraded, unhealthy)" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message", "description": "Status message" }, "last_check": { "type": "string", "format": "date-time", "title": "Last Check", "description": "Last health check timestamp" }, "uptime_seconds": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Uptime Seconds", "description": "Component uptime" }, "metrics": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metrics", "description": "Component metrics" } }, "type": "object", "required": [ "name", "status", "last_check" ], "title": "ComponentHealth", "description": "Health status for a system component." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HistoricalDataRequest": { "properties": { "start_time": { "type": "string", "format": "date-time", "title": "Start Time", "description": "Start time for data query" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time", "description": "End time for data query" }, "zone_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Zone Ids", "description": "Filter by specific zones" }, "aggregation_interval": { "anyOf": [ { "type": "integer", "maximum": 3600.0, "minimum": 60.0 }, { "type": "null" } ], "title": "Aggregation Interval", "description": "Aggregation interval in seconds", "default": 300 }, "include_raw_data": { "type": "boolean", "title": "Include Raw Data", "description": "Include raw detection data", "default": false } }, "type": "object", "required": [ "start_time", "end_time" ], "title": "HistoricalDataRequest", "description": "Request model for historical pose data." }, "PersonPose": { "properties": { "person_id": { "type": "string", "title": "Person Id", "description": "Unique person identifier" }, "confidence": { "type": "number", "title": "Confidence", "description": "Detection confidence score" }, "bounding_box": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Bounding Box", "description": "Person bounding box" }, "keypoints": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Keypoints", "description": "Body keypoints with coordinates and confidence" }, "segmentation": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Segmentation", "description": "DensePose segmentation data" }, "zone_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Zone Id", "description": "Zone where person is detected" }, "activity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Activity", "description": "Detected activity" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "Detection timestamp" } }, "type": "object", "required": [ "person_id", "confidence", "bounding_box", "timestamp" ], "title": "PersonPose", "description": "Person pose data model." }, "PoseEstimationRequest": { "properties": { "zone_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Zone Ids", "description": "Specific zones to analyze (all zones if not specified)" }, "confidence_threshold": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Confidence Threshold", "description": "Minimum confidence threshold for detections" }, "max_persons": { "anyOf": [ { "type": "integer", "maximum": 50.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Persons", "description": "Maximum number of persons to detect" }, "include_keypoints": { "type": "boolean", "title": "Include Keypoints", "description": "Include detailed keypoint data", "default": true }, "include_segmentation": { "type": "boolean", "title": "Include Segmentation", "description": "Include DensePose segmentation masks", "default": false } }, "type": "object", "title": "PoseEstimationRequest", "description": "Request model for pose estimation." }, "PoseEstimationResponse": { "properties": { "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "Analysis timestamp" }, "frame_id": { "type": "string", "title": "Frame Id", "description": "Unique frame identifier" }, "persons": { "items": { "$ref": "#/components/schemas/PersonPose" }, "type": "array", "title": "Persons", "description": "Detected persons" }, "zone_summary": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Zone Summary", "description": "Person count per zone" }, "processing_time_ms": { "type": "number", "title": "Processing Time Ms", "description": "Processing time in milliseconds" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "description": "Additional metadata" } }, "type": "object", "required": [ "timestamp", "frame_id", "persons", "zone_summary", "processing_time_ms" ], "title": "PoseEstimationResponse", "description": "Response model for pose estimation." }, "ReadinessCheck": { "properties": { "ready": { "type": "boolean", "title": "Ready", "description": "Whether system is ready to serve requests" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "Readiness check timestamp" }, "checks": { "additionalProperties": { "type": "boolean" }, "type": "object", "title": "Checks", "description": "Individual readiness checks" }, "message": { "type": "string", "title": "Message", "description": "Readiness status message" } }, "type": "object", "required": [ "ready", "timestamp", "checks", "message" ], "title": "ReadinessCheck", "description": "System readiness check result." }, "StreamStatus": { "properties": { "is_active": { "type": "boolean", "title": "Is Active", "description": "Whether streaming is active" }, "connected_clients": { "type": "integer", "title": "Connected Clients", "description": "Number of connected clients" }, "streams": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Streams", "description": "Active streams" }, "uptime_seconds": { "type": "number", "title": "Uptime Seconds", "description": "Stream uptime in seconds" } }, "type": "object", "required": [ "is_active", "connected_clients", "streams", "uptime_seconds" ], "title": "StreamStatus", "description": "Stream status model." }, "SystemHealth": { "properties": { "status": { "type": "string", "title": "Status", "description": "Overall system status" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp", "description": "Health check timestamp" }, "uptime_seconds": { "type": "number", "title": "Uptime Seconds", "description": "System uptime" }, "components": { "additionalProperties": { "$ref": "#/components/schemas/ComponentHealth" }, "type": "object", "title": "Components", "description": "Component health status" }, "system_metrics": { "additionalProperties": true, "type": "object", "title": "System Metrics", "description": "System-level metrics" } }, "type": "object", "required": [ "status", "timestamp", "uptime_seconds", "components", "system_metrics" ], "title": "SystemHealth", "description": "Overall system health status." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } } }, "success": true, "timestamp": "2025-06-07T12:28:56.816300" }, { "test_name": "GET /nonexistent", "description": "Non-existent endpoint", "url": "http://localhost:8000/nonexistent", "method": "GET", "expected_status": 404, "actual_status": 404, "response_time_ms": 0.87, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/nonexistent" } }, "success": true, "timestamp": "2025-06-07T12:28:56.817299" }, { "test_name": "POST /api/v1/pose/estimate", "description": "Invalid request data", "url": "http://localhost:8000/api/v1/pose/estimate", "method": "POST", "expected_status": 422, "actual_status": 404, "response_time_ms": 0.9, "response_data": { "error": { "code": 404, "message": "Not Found", "type": "http_error", "path": "/api/v1/pose/estimate" } }, "success": false, "timestamp": "2025-06-07T12:28:56.818290" } ] }