use endpoint and url