1 Reply Latest reply on Oct 18, 2013 6:15 AM by yogi derek

    Web API Query for HF777352

    hansolo32

      Since the VSE Scan Engine 5600 is heading our way soon, I need to know how many systems already have HF777352 for VSE 8.7.  In SQL, I can use this:

       

      SELECT DISTINCTEPOComputerProperties.ComputerName, EPOProductSettings.Value

      FROM         EPOProductProperties LEFT OUTER JOIN

                            EPOLeafNode ONEPOLeafNode.AutoID = EPOProductProperties.ParentID LEFT OUTER JOIN

                            EPOComputerProperties ONEPOComputerProperties.ParentID = EPOLeafNode.AutoID LEFT OUTER JOIN

                            EPOProductFamilies ONEPOProductFamilies.ProductCode = EPOProductProperties.ProductCode LEFT OUTERJOIN

                            EPOSoftware ONEPOSoftware.ProductCode = EPOProductProperties.ProductCode LEFT OUTER JOIN

                            EPOProductSettings ONEPOProductProperties.AutoID = EPOProductSettings.ParentID

      WHERE     (EPOProductSettings.SettingName = 'fixes')AND (EPOProductProperties.ProductCode = N'VIRUSCAN8700')

      ORDER BYEPOComputerProperties.ComputerName

       

      It gives me a simple table of computer name and what hotfixes have been applied.

       

      In the ePO API Explorer I've tried this:

      <?xml version="1.0" encoding="utf-8"?>

      <command command="core.executeQuery" name="List HF Compliant Systems" class="_Queries">

        <parameter name="target1" required="true" description="target:EPOLeafNode">EPOLeafNode</parameter>

        <parameter name="target2" required="true" description="target:EPOComputerProperties">EPOComputerProperties</parameter>

        <parameter name="target3" required="true" description="target:EPOProductFamilies">EPOProductFamilies</parameter>

        <parameter name="target4" required="true" description="target:EPOSoftware">EPOSoftware</parameter>

        <parameter name="target5" required="true" description="target:EPOProductSettings">EPOProductProperties</parameter>

        <parameter name="where" required="false" description="where:( where ( and ( contains EPOProductSettings.SettingName = &quot;fixes&quot; ) ( EPOProductProperties.ProductCode = &quot;VIRUSCAN8700&quot; ) ) )">( where ( and ( contains EPOProductSettings.SettingName = "fixes" ) ( EPOProductProperties.ProductCode = "VIRUSCAN8700" ) ) )</parameter>

        <parameter name="order" required="false" description="" />

        <parameter name="group" required="false" description="" />

        <parameter name="database" required="false" description="" />

        <parameter name="depth" required="false" description="" />

        <parameter name="joinTables" required="true" description="" />

        <usage>Custom Query: HF Compliance</usage> 

        <description />

      </command>

       

      I'm not getting something right.  I'm not sure if I'm joining the tables correctly, not sure if I'm doing the target naming correctly.  I will admit I'm very new to the Web API Explorer and API scripting.  But since I can't get the DBA's to let me have simple read access to the database (I have it on the test server DB) and ePO itself won't tell me this, I figure I have to run a custom script to get the data.

       

      Any suggestions?

       

      Message was edited by: hansolo32 on 4/4/13 10:47:41 AM CDT