def fix_apiroot(root):
  """ Add default protocol and hostname to the root path. """
  if '://' in root:
    return root
  if ('/' not in root) or ('.' not in root.split('/')[0]):
    root = "www.pennapps.com/" + root
  return "http://%s" % root