added fetch url construction routine for an endpoint