add fetch_records api endpoint