index.php - API for admin or public