dynamic API query conditions for select done