i think we should use this view https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/hqcase/_design/views/by_domain_external_id/map.js and change the API to return all cases