Updated database to api