code: def editUsageReportSettings(self, samplingInterval,
                                  enabled=True, maxHistory=0):
          
          params = {
              "f" : "json",
              "maxHistory" : maxHistory,
              "enabled" : enabled,
              "samplingInterval"  : samplingInterval
          }
          url = self._url + "/settings/edit"
          return self._post(url=url,
                               param_dict=params,
                               securityHandler=self._securityHandler,
                               proxy_url=self._proxy_url,
                               proxy_port=self._proxy_port)
docs: The usage reports settings are applied to the entire site. A POST
          request updates the usage reports settings.
  
          Inputs:
             samplingInterval - Defines the duration (in minutes) for which
               the usage statistics are aggregated or sampled, in-memory,
               before being written out to the statistics database.
             enabled - default True - Can be true or false. When usage
               reports are enabled, service usage statistics are collected
               and persisted to a statistics database. When usage reports are
               disabled, the statistics are not collected.
             maxHistory - default 0 - Represents the number of days after
               which usage statistics are deleted after the statistics
               database. If the maxHistory parameter is set to 0, the
               statistics are persisted forever.