Update API for database