LYGO P0.4 API Service Ready

LYGO P0.4 API Service Endpoints

        GET /?action=get&key=[key]                     - Get stored data
        POST /?action=set&key=[key]&data=[json]       - Set data (via AJAX)
        GET /?action=news                             - Get news feed
        GET /?action=logs                             - Get system logs
        GET /?action=stats                            - Get portal statistics
        GET /?action=validate&token=[token]           - Validate access token
        GET /?action=ping                             - Service health check
        
        === P0.4 ENHANCED ENDPOINTS ===
        GET /?action=firmware&version=[P0.X]          - Get firmware code
        GET /?action=firmware_versions                - List all firmware versions
        GET /?action=validate_data&data=[encoded]     - Validate sample data
        GET /?action=metrics                          - Get performance metrics
        GET /?action=log&message=[text]&type=[type]   - Add system log
        GET /?action=config&key=[key]                 - Get configuration
        POST /?action=config&key=[key]&value=[value]  - Set configuration
        
        === PARAMETERS ===
        &format=json|jsonp|download                  - Response format
        &callback=[function]                         - JSONP callback
        &debug=1                                     - Enable debug mode
        
        === TOKENS ===
        Valid tokens: LYGO-P0-ACCESS, LYGO-DEV-TOKEN, LYGO-API-KEY