code: def getEndpoint(self):
          
          port = ''
          endpoint = ''
          keyConfig = self.getKeyConfig()
          if 'port' in keyConfig:
              port = ':' + keyConfig['port']
          elif self._data['port'] != self.PORT:
              port = ':' + self._data['port']
          if 'endpoint' in keyConfig:
              endpoint = keyConfig['endpoint']
          else:
              endpoint = self._data['endpoint']
          return 'https://%s%s/%s/' % (endpoint,
                                       port,
                                       self._data['api_version'])
docs: Retrieve the NS1 API Endpoint URL that will be used for requests.
  
          :return: URL of the NS1 API that will be used for requests