add history_id query to scan_details method