update database on REST API response