0 Replies Latest reply on Jan 5, 2016 9:17 AM by madamada16

    web api py script is not working

    madamada16

      Hi,

       

       

      Need help regarding web API.

       

       

      I tried to use the tagging python script but when I modify and run it didn't work as it should be. The assets has no tag.

       

       

      any comment what should be done or to check on my settings?

       

       

      Note: I am running the script on remote computer and mcafee py is on the same folder as the script reside.

       

       

      Script:


      import mcafee


      #initiate connection
      mc = mcafee.client('server_name','8443','username','password')


      #open text file
      file = open(path of the file', 'r')


      #iterate through list and assign tags
      for line in file:
          mc.system.applyTag(line.rstrip('\n'), 'Test-Tag-S')