2 Replies Latest reply on Sep 24, 2013 7:07 AM by mrjester

    Policy Auditor API Query

    mrjester

      So I have successfully used the executeQuery command to extract all sorts of other data sets but when I am attempting to query Policy Auditor data I run into a issue. Has anyone else seen this?

       

       

      mc = mcafee.client(address, port, username, password)

      target = 'PAAuditRuleResultView'

      select = '(PAAuditRuleResultView.BenchmarkID PAAuditRuleResultView.RuleID PAXRuleTextView.Title)'

      where = '( where ( and ( eq PAAuditRuleResultView.ActualResult "fail" ) ( eq PAAuditRuleResultView.IsCurrentResult t ) ( eq PAAuditRuleResultView.SystemName "%s" ) ) )' % (systemname)

      order = '(order(asc PAAuditRuleResultView.BenchmarkID))'

      data = mc.core.executeQuery(target=target, select=select, where=where, order=order)

       

       

      When I run this code I get this error

       

      Traceback (most recent call last):

        File "<stdin>", line 1, in <module>

        File "mcafee.py", line 454, in __call__

          raise e

      mcafee.CommandInvokerError: Invalid S-expression in 'select' clause: PAAuditRuleResultView.BenchmarkID

       

      Message was edited by: mrjester on 9/23/13 8:02:23 PM CDT