{"openapi":"3.1.0","info":{"title":"EventSentinel API","description":"Centralized API for EventSentinel platform — infrastructure monitoring, AI recommendations, and billing. Use JWT for portal access, API Keys for collectors.","version":"1.0.0"},"paths":{"/":{"get":{"tags":["system"],"summary":"Landing","operationId":"landing__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"tags":["system"],"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegister"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_v1_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/api-keys":{"post":{"tags":["auth"],"summary":"Create Api Key","operationId":"create_api_key_v1_auth_api_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["auth"],"summary":"List Api Keys","operationId":"list_api_keys_v1_auth_api_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyResponse"},"title":"Response List Api Keys V1 Auth Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/api-keys/{key_id}":{"delete":{"tags":["auth"],"summary":"Revoke Api Key","operationId":"revoke_api_key_v1_auth_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/clients/me":{"get":{"tags":["clients"],"summary":"Get My Client","operationId":"get_my_client_v1_clients_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["clients"],"summary":"Update My Client","operationId":"update_my_client_v1_clients_me_patch","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/clients/me/devices":{"get":{"tags":["clients"],"summary":"List My Devices","operationId":"list_my_devices_v1_clients_me_devices_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeviceResponse"},"title":"Response List My Devices V1 Clients Me Devices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["clients"],"summary":"Register Device","operationId":"register_device_v1_clients_me_devices_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceRegister"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/clients/me/devices/{device_id}":{"get":{"tags":["clients"],"summary":"Get Device","operationId":"get_device_v1_clients_me_devices__device_id__get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["clients"],"summary":"Delete Device","operationId":"delete_device_v1_clients_me_devices__device_id__delete","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/clients/me/billing":{"get":{"tags":["clients"],"summary":"Get Billing","operationId":"get_billing_v1_clients_me_billing_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/clients/me/payments":{"get":{"tags":["clients"],"summary":"Get Payments","operationId":"get_payments_v1_clients_me_payments_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":24,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter from this ISO datetime","title":"Start Date"},"description":"Filter from this ISO datetime"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter up to this ISO datetime","title":"End Date"},"description":"Filter up to this ISO datetime"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/clients/me/members":{"get":{"tags":["clients"],"summary":"Get Members","operationId":"get_members_v1_clients_me_members_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberResponse"},"title":"Response Get Members V1 Clients Me Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/hardware":{"post":{"tags":["metrics"],"summary":"Submit Hardware","operationId":"submit_hardware_v1_metrics_hardware_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HardwareMetricIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/network":{"post":{"tags":["metrics"],"summary":"Submit Network","operationId":"submit_network_v1_metrics_network_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkMetricIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/batch":{"post":{"tags":["metrics"],"summary":"Submit Batch","operationId":"submit_batch_v1_metrics_batch_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchMetricIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/hardware/{device_id}":{"get":{"tags":["metrics"],"summary":"Get Hardware History","operationId":"get_hardware_history_v1_metrics_hardware__device_id__get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":120,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter metrics from this ISO datetime","title":"Start Date"},"description":"Filter metrics from this ISO datetime"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter metrics up to this ISO datetime","title":"End Date"},"description":"Filter metrics up to this ISO datetime"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/network/{device_id}":{"get":{"tags":["metrics"],"summary":"Get Network History","operationId":"get_network_history_v1_metrics_network__device_id__get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":120,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter metrics from this ISO datetime","title":"Start Date"},"description":"Filter metrics from this ISO datetime"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter metrics up to this ISO datetime","title":"End Date"},"description":"Filter metrics up to this ISO datetime"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/hardware/{device_id}/latest":{"get":{"tags":["metrics"],"summary":"Get Latest Hardware","operationId":"get_latest_hardware_v1_metrics_hardware__device_id__latest_get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/network/{device_id}/latest":{"get":{"tags":["metrics"],"summary":"Get Latest Network","operationId":"get_latest_network_v1_metrics_network__device_id__latest_get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/summary/{device_id}":{"get":{"tags":["metrics"],"summary":"Get Metrics Summary","description":"Aggregated summary of the last N hours.","operationId":"get_metrics_summary_v1_metrics_summary__device_id__get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":24,"title":"Hours"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recommendations":{"post":{"tags":["recommendations"],"summary":"Submit Recommendation","operationId":"submit_recommendation_v1_recommendations_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recommendations/{device_id}":{"get":{"tags":["recommendations"],"summary":"List Recommendations","operationId":"list_recommendations_v1_recommendations__device_id__get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter from this ISO datetime","title":"Start Date"},"description":"Filter from this ISO datetime"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter up to this ISO datetime","title":"End Date"},"description":"Filter up to this ISO datetime"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recommendations/{device_id}/latest":{"get":{"tags":["recommendations"],"summary":"Latest Recommendations","operationId":"latest_recommendations_v1_recommendations__device_id__latest_get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/plans":{"get":{"tags":["billing"],"summary":"Get Plans","operationId":"get_plans_v1_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanInfo"},"type":"array","title":"Response Get Plans V1 Billing Plans Get"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","operationId":"create_checkout_v1_billing_checkout_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Create Portal","operationId":"create_portal_v1_billing_portal_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/subscription":{"get":{"tags":["billing"],"summary":"Get Subscription","operationId":"get_subscription_v1_billing_subscription_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","operationId":"stripe_webhook_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/billing/sync":{"post":{"tags":["billing"],"summary":"Sync Billing","operationId":"sync_billing_v1_billing_sync_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/stats":{"get":{"tags":["admin"],"summary":"Get Stats","operationId":"get_stats_v1_admin_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/clients":{"get":{"tags":["admin"],"summary":"List Clients","operationId":"list_clients_v1_admin_clients_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/versions/{platform}":{"get":{"tags":["versions"],"summary":"Get Latest Version","operationId":"get_latest_version_v1_versions__platform__get","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/versions":{"post":{"tags":["versions"],"summary":"Publish Version","operationId":"publish_version_v1_versions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"APIKeyCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","description":"Permissions for this key","default":["metrics:write","recommendations:write"]}},"type":"object","required":["name"],"title":"APIKeyCreate"},"APIKeyResponse":{"properties":{"key_id":{"type":"string","title":"Key Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["key_id","name","key_prefix","scopes","is_active","created_at"],"title":"APIKeyResponse"},"BatchMetricIn":{"properties":{"hardware":{"anyOf":[{"$ref":"#/components/schemas/HardwareMetricIn"},{"type":"null"}]},"network":{"anyOf":[{"$ref":"#/components/schemas/NetworkMetricIn"},{"type":"null"}]}},"type":"object","title":"BatchMetricIn","description":"Batch payload: hardware + network in one request."},"BillingResponse":{"properties":{"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"},"subscription_status":{"type":"string","title":"Subscription Status","default":"none"},"subscription_plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Plan Id"},"subscription_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Amount"},"subscription_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Currency"},"subscription_interval":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Interval"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"max_devices":{"type":"integer","title":"Max Devices","default":1}},"additionalProperties":true,"type":"object","title":"BillingResponse"},"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan","default":"b2c_monthly"},"success_url":{"type":"string","title":"Success Url","default":"https://eventsentinel.ai/dashboard"},"cancel_url":{"type":"string","title":"Cancel Url","default":"https://eventsentinel.ai/pricing"}},"type":"object","title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["checkout_url","session_id"],"title":"CheckoutResponse"},"ClientResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"plan_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"max_devices":{"type":"integer","title":"Max Devices","default":1},"max_users":{"type":"integer","title":"Max Users","default":50},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"additionalProperties":true,"type":"object","required":["client_id"],"title":"ClientResponse"},"ClientUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"}},"type":"object","title":"ClientUpdate"},"DeviceRegister":{"properties":{"hostname":{"type":"string","title":"Hostname"},"os":{"type":"string","title":"Os"},"os_version":{"type":"string","title":"Os Version"},"arch":{"type":"string","title":"Arch"},"fingerprint":{"type":"string","title":"Fingerprint"},"mac_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mac Address"}},"type":"object","required":["hostname","os","os_version","arch","fingerprint"],"title":"DeviceRegister","description":"Payload from collector when registering a new device."},"DeviceResponse":{"properties":{"device_id":{"type":"string","title":"Device Id"},"client_id":{"type":"string","title":"Client Id"},"fingerprint":{"type":"string","title":"Fingerprint"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"os":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os"},"os_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Version"},"arch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arch"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"additionalProperties":true,"type":"object","required":["device_id","client_id","fingerprint"],"title":"DeviceResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HardwareMetricIn":{"properties":{"cpu_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Percent"},"cpu_per_core":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Cpu Per Core"},"cpu_count_logical":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpu Count Logical"},"cpu_count_physical":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpu Count Physical"},"cpu_freq_current":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Freq Current"},"cpu_freq_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Freq Max"},"cpu_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cpu Brand"},"ram_total_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ram Total Gb"},"ram_used_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ram Used Gb"},"ram_available_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ram Available Gb"},"ram_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ram Percent"},"swap_total_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Swap Total Gb"},"swap_used_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Swap Used Gb"},"swap_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Swap Percent"},"gpus":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Gpus"},"disk_partitions":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Disk Partitions"},"disk_io":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Disk Io"},"temperatures":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Temperatures"},"fans":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Fans"},"cpu_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Temp C"},"gpu_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Name"},"gpu_load":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gpu Load"}},"type":"object","title":"HardwareMetricIn","description":"Payload sent by collectors via POST /metrics/hardware."},"MemberResponse":{"properties":{"id":{"type":"string","title":"Id"},"client_id":{"type":"string","title":"Client Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"invited_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited Email"},"status":{"type":"string","title":"Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"additionalProperties":true,"type":"object","required":["id","client_id","user_id","role","status"],"title":"MemberResponse"},"NetworkMetricIn":{"properties":{"upload_mbps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Upload Mbps"},"download_mbps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Download Mbps"},"bytes_sent_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bytes Sent Total"},"bytes_recv_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bytes Recv Total"},"packets_sent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Packets Sent"},"packets_recv":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Packets Recv"},"errin":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Errin"},"errout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Errout"},"dropin":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dropin"},"dropout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dropout"},"latency_avg_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency Avg Ms"},"latency_min_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency Min Ms"},"latency_max_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latency Max Ms"},"packet_loss_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packet Loss Percent"},"dns_resolve_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dns Resolve Ms"},"wifi":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Wifi"},"connections":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Connections"},"interfaces":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Interfaces"}},"type":"object","title":"NetworkMetricIn","description":"Payload sent by collectors via POST /metrics/network."},"PlanInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"price":{"type":"integer","title":"Price"},"currency":{"type":"string","title":"Currency"},"interval":{"type":"string","title":"Interval"},"features":{"items":{"type":"string"},"type":"array","title":"Features"}},"type":"object","required":["id","name","price","currency","interval","features"],"title":"PlanInfo"},"PortalResponse":{"properties":{"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["portal_url"],"title":"PortalResponse"},"RecommendationIn":{"properties":{"recommendation":{"type":"string","title":"Recommendation"},"category":{"type":"string","title":"Category","default":"general"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}},"type":"object","required":["recommendation"],"title":"RecommendationIn"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"SubscriptionResponse":{"properties":{"status":{"type":"string","title":"Status"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"interval":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interval"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false}},"type":"object","required":["status"],"title":"SubscriptionResponse"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","default":900}},"type":"object","required":["access_token","refresh_token"],"title":"TokenResponse"},"UserLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"UserLogin"},"UserRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"}},"type":"object","required":["email","password"],"title":"UserRegister"},"UserResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"role":{"type":"string","title":"Role","default":"user"}},"type":"object","required":["user_id","email"],"title":"UserResponse"},"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"},"VersionCreate":{"properties":{"platform":{"type":"string","title":"Platform"},"version":{"type":"string","title":"Version"},"build_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Build Number"},"release_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Release Notes"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"is_mandatory":{"type":"boolean","title":"Is Mandatory","default":false}},"type":"object","required":["platform","version"],"title":"VersionCreate"}}}}