Duplicating environment-sensitive api host logic.

jira : QUES-20