def _build_api_url(api_url_template=None, api_base_url=None, api_version=
    None, path=None, query_params=None):
    """construct api URL"""
    url = api_url_template.format(api_base_url, api_version, path)
    if query_params:
        url += '?' + query_params
    return url
