Add Api.build_url to javascript.