replace api url with correct url