QAART-164 url builder if instead of hardcoding queries