feat(rest): add ability to query by case ids for historic variables

related to #CAM-2843