Is there a way to store an API endpoint in an environment variable and use it in API Query?

Is there a way to store an API endpoint in an environment variable and use it in API Query?