Use relative URL for api endpoint