code: def api_request(self, method_name, params):
          
          url = self._method_url(method_name)
          data = json.dumps(params)
          return self._make_request(url=url, method="post", data=data)
docs: Execute an arbitrary method.
  
          Args:
              method_name (str): include the controller name: 'devices/search'
              params (dict): the method parameters
          Returns:
              A dict with the response
          Raises:
              requests.exceptions.HTTPError