add log to API call