Update api.php adding connexion options