{
    "name": "YouTube Recipe Publisher API",
    "version": "1.0.0",
    "description": "API for automated recipe generation from YouTube videos",
    "endpoints": {
        "Authentication": {
            "POST /api/auth.php?action=login": "Login with username/password",
            "GET /api/auth.php?action=me": "Get current user info",
            "POST /api/auth.php?action=change-password": "Change password",
            "POST /api/auth.php?action=create-user": "Create new user (admin only)",
            "GET /api/auth.php?action=users": "Get all users (admin only)",
            "DELETE /api/auth.php?action=delete-user&id=X": "Delete user (admin only)"
        },
        "YouTube Channels": {
            "GET /api/channels.php": "Get all channels",
            "GET /api/channels.php?id=X": "Get single channel",
            "POST /api/channels.php": "Add new channel",
            "PUT /api/channels.php?id=X": "Update channel",
            "DELETE /api/channels.php?id=X": "Delete channel (admin only)"
        },
        "Videos": {
            "GET /api/videos.php": "Get all videos (supports filters: channel_id, status, limit, offset)",
            "GET /api/videos.php?id=X": "Get single video with full details",
            "GET /api/videos.php?action=stats": "Get statistics",
            "POST /api/videos.php?action=check-new": "Check for new videos",
            "POST /api/videos.php?action=process&id=X": "Process a video",
            "POST /api/videos.php?action=retry-failed": "Retry failed videos",
            "DELETE /api/videos.php?id=X": "Delete video (admin only)"
        },
        "Configuration": {
            "GET /api/config.php": "Get all configuration",
            "GET /api/config.php?include_sensitive=1": "Get config with sensitive data (admin only)",
            "PUT /api/config.php": "Update configuration (admin only)",
            "POST /api/config.php?action=test&service=youtube": "Test YouTube API connection",
            "POST /api/config.php?action=test&service=openai": "Test OpenAI API connection",
            "POST /api/config.php?action=test&service=wordpress": "Test WordPress connection"
        },
        "Logs": {
            "GET /api/logs.php": "Get logs (supports filters: type, module, video_id, limit, offset)",
            "GET /api/logs.php?action=stats": "Get log statistics",
            "DELETE /api/logs.php?action=clear-old&days=30": "Clear old logs (admin only)"
        }
    },
    "authentication": "Use Bearer token in Authorization header",
    "documentation": "See README.md for detailed documentation"
}