Yup, that’s a bit of a tough one (;
One solution that comes to my mind I already sort-of described here, in point 4:
i.e., use the /v2/devices endpoint to fetch all your beacons’ data, including their device identifiers and namespace and instances, and cross-reference that.
/v2/devices