def readFile(self, theFile): with open (theFile, 'r') as fileObj: fileContents = fileObj.read().strip() return fileContents tats .../configuredStats/15 will only enable the stat with object id = 15 .../configuredStats?filter="objectID le 10" will only enable stats with object id s lower or equal to 10 .../configuredStats?filter="caption eq FTP" will only enable stats that contain FTP in their caption name ''' for eachStatName in statNameList: configuredStats = configuredStats + '?filter="caption eq %s"' % eachStatName self.logInfo('\nEnableConfiguredStats: %s' % configuredStats) response = self.patch(configuredStats, data={"enabled": True})