code: def restbase(self, endpoint, title):
          
          if not endpoint:
              raise ValueError("invalid endpoint: %s" % endpoint)
  
          route = endpoint
          if title and endpoint != '/page/':
              route = endpoint + safequote_restbase(title)
  
          self.set_status('restbase', route)
  
          return "%s/api/rest_v1/%s" % (self.uri, route[1:])
docs: Returns RESTBase query string