Appdaemon - Calling the WS API

Is it possible to call the Websocket API in appdaemon, I have tried calling a service but that does not appear to work:

  def dev(self):
    stats = [{'start': '2022-01-01T00:00:00z','sum': 0},{'start': '2022-01-02T00:00:00z','sum': 10}];
    api = "recorder/import_statistics";
    metadata = {
      "source"              : "external",
      "statistic_id"        : "external:energy_consumption",
      "unit_of_measurement" : "kWh",
      "has_mean"            : False,
      "has_sum"             : True,
    }
    
    self.call_service(api,metadata=metadata,statistics=stats);

>> appdaemon.exceptions.ServiceException: ('Unknown service (%s/%s/%s) in call_service from %s', 'default', 'recorder', 'import_statistics', 'edf_apidev')