simplify the API gateway endpoint addition code
simplify the API gateway endpoint addition code

calee88/ParlAI,facebookresearch/ParlAI,calee88/ParlAI,facebookresearch/ParlAI,facebookresearch/ParlAI,calee88/ParlAI,facebookresearch/ParlAI,facebookresearch/ParlAI