def parse_api_config_response(self, body):
    """Parses a json api config and registers methods for dispatch.

    Side effects:
      Parses method name, etc for all methods and updates the indexing
      datastructures with the information.

    Args:
      body: A string, the JSON body of the getApiConfigs response.
    """

    try:
      response_obj = json.loads(body)
    except __HOLE__, unused_err:
      logging.error('Cannot parse BackendService.getApiConfigs response: %s',
                    body)
    else:
      with self._config_lock:
        self._add_discovery_config()
        for api_config_json in response_obj.get('items', []):
          try:
            config = json.loads(api_config_json)
          except ValueError, unused_err:
            logging.error('Can not parse API config: %s',
                          api_config_json)
          else:
            lookup_key = config.get('name', ''), config.get('version', '')
            self._convert_https_to_http(config)
            self.configs[lookup_key] = config

        for config in self.configs.itervalues():
          version = config.get('version', '')
          sorted_methods = self._get_sorted_methods(config.get('methods', {}))

          for method_name, method in sorted_methods:
            self._save_rpc_method(method_name, version, method)
            self._save_rest_method(method_name, version, method)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/endpoints/api_config_manager.py/ApiConfigManager.parse_api_config_response