{"message":"Solar Hub Management API with PUE & Analytics","version":"2.0.0","docs":"/docs","health":"/health","features":{"pue_management":"Productive Use Equipment tracking and rental","data_analytics":"Power usage analytics and rental statistics","enhanced_rentals":"Battery rentals with PUE equipment","flexible_returns":"Comprehensive return system with partial returns and item exchanges","role_based_access":"Fine-grained permission system"},"new_endpoints":{"pue_management":["POST /pue/ - Create PUE equipment","GET /pue/{id} - Get PUE details","PUT /pue/{id} - Update PUE equipment","GET /hubs/{id}/pue - List hub PUE items"],"data_analytics":["GET /analytics/hub-summary - Hub statistics","POST /analytics/power-usage - Power analytics","GET /analytics/battery-performance - Battery performance","POST /analytics/rental-statistics - Rental statistics","GET /analytics/revenue - Revenue analytics","GET /analytics/device-utilization/{hub_id} - Device utilization","GET /analytics/export/{hub_id} - Export analytics data"]},"data_admin_capabilities":{"analytics_access":"Full access to analytics endpoints","restricted_user_data":"Cannot view individual user information","hub_filtering":"Access only to assigned hubs"},"key_endpoints":{"rentals":{"create":"POST /rentals/ - Start a new rental","get":"GET /rentals/{id} - Get rental details","return":"POST /rentals/{id}/return - Return battery/PUE items","add_pue":"POST /rentals/{id}/add-pue - Add PUE items to rental"},"examples":{"full_return":"POST /rentals/1/return with return_battery=true, return_pue_items=null","partial_return":"POST /rentals/1/return with return_battery=true, return_pue_items=[1,2]","exchange_pue":"POST /rentals/1/return with return_pue_items=[1,2], add_pue_items=[3,4]"}},"roles":{"user":"Kiosk operator - can manage users/batteries in their hub","admin":"Full access except webhook data submission","superadmin":"Full access to everything","battery":"Can only submit data to webhook endpoint","data_admin":"Read-only access to analytics and data"},"authentication":{"users":{"login":"POST /auth/token","credentials":"username and password","token_expires_hours":336},"batteries":{"login":"POST /auth/battery-login","refresh":"POST /auth/battery-refresh","credentials":"battery_id and battery_secret","token_expires_hours":8760}}}