<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to get output of 'show rule-hit-count...' via panxapi.py or xapi.py in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-get-output-of-show-rule-hit-count-via-panxapi-py-or/m-p/293235#M2060</link>
    <description>&lt;P&gt;You'll need to specify the XML yourself for that command.&amp;nbsp; There are multiple variables that you're specifying with this command, so the automatic XML-ification that the libraries do will fail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using &lt;CODE&gt;debug cli on&lt;/CODE&gt; specified &lt;A href="https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api.html" target="_self"&gt;here&lt;/A&gt;, the XML the op command is sending on my firewall looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;lt;show&amp;gt;&amp;lt;rule-hit-count&amp;gt;&amp;lt;vsys&amp;gt;&amp;lt;vsys-name&amp;gt;&amp;lt;entry name='vsys1'&amp;gt;&amp;lt;rule-base&amp;gt;&amp;lt;entry name='security'&amp;gt;&amp;lt;rules&amp;gt;&amp;lt;all/&amp;gt;&amp;lt;/rules&amp;gt;&amp;lt;/entry&amp;gt;&amp;lt;/rule-base&amp;gt;&amp;lt;/entry&amp;gt;&amp;lt;/vsys-name&amp;gt;&amp;lt;/vsys&amp;gt;&amp;lt;/rule-hit-count&amp;gt;&amp;lt;/show&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2019 15:22:34 GMT</pubDate>
    <dc:creator>gfreeman</dc:creator>
    <dc:date>2019-10-17T15:22:34Z</dc:date>
    <item>
      <title>Unable to get output of 'show rule-hit-count...' via panxapi.py or xapi.py</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-get-output-of-show-rule-hit-count-via-panxapi-py-or/m-p/293194#M2057</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wondering if anyone has been able to successfully get the output of the following command via either the panxapi.py wrapper or via their own functions that make use of the xapi.py module:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS C:\Program Files (x86)\Python37-32\Scripts&amp;gt; python .\panxapi.py -Xjro 'show rule-hit-count vsys vsys-name vsys1 rule-base security rules all'&lt;BR /&gt;op: error [code="17"]: " show -&amp;gt; rule-hit-count -&amp;gt; vsys -&amp;gt; vsys-name -&amp;gt; vsys1 unexpected here&lt;BR /&gt;show -&amp;gt; rule-hit-count -&amp;gt; vsys -&amp;gt; vsys-name is invalid"&lt;BR /&gt;PS C:\Program Files (x86)\Python37-32\Scripts&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought maybe I was doing something wrong while writing my own wrapper for xapi.py, but after using the panxapi.py wrapper I get the exact same response from a PA 820 running version 8.0.10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is probably also worth mentioning that this exact string can be run as a command on the 820 via SSH, and I receive the expected output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All input welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 23:13:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-get-output-of-show-rule-hit-count-via-panxapi-py-or/m-p/293194#M2057</guid>
      <dc:creator>philiptecklenburg</dc:creator>
      <dc:date>2019-10-16T23:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get output of 'show rule-hit-count...' via panxapi.py or xapi.py</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-get-output-of-show-rule-hit-count-via-panxapi-py-or/m-p/293235#M2060</link>
      <description>&lt;P&gt;You'll need to specify the XML yourself for that command.&amp;nbsp; There are multiple variables that you're specifying with this command, so the automatic XML-ification that the libraries do will fail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using &lt;CODE&gt;debug cli on&lt;/CODE&gt; specified &lt;A href="https://docs.paloaltonetworks.com/pan-os/9-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api.html" target="_self"&gt;here&lt;/A&gt;, the XML the op command is sending on my firewall looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;lt;show&amp;gt;&amp;lt;rule-hit-count&amp;gt;&amp;lt;vsys&amp;gt;&amp;lt;vsys-name&amp;gt;&amp;lt;entry name='vsys1'&amp;gt;&amp;lt;rule-base&amp;gt;&amp;lt;entry name='security'&amp;gt;&amp;lt;rules&amp;gt;&amp;lt;all/&amp;gt;&amp;lt;/rules&amp;gt;&amp;lt;/entry&amp;gt;&amp;lt;/rule-base&amp;gt;&amp;lt;/entry&amp;gt;&amp;lt;/vsys-name&amp;gt;&amp;lt;/vsys&amp;gt;&amp;lt;/rule-hit-count&amp;gt;&amp;lt;/show&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 15:22:34 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-get-output-of-show-rule-hit-count-via-panxapi-py-or/m-p/293235#M2060</guid>
      <dc:creator>gfreeman</dc:creator>
      <dc:date>2019-10-17T15:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get output of 'show rule-hit-count...' via panxapi.py or xapi.py</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-get-output-of-show-rule-hit-count-via-panxapi-py-or/m-p/293236#M2061</link>
      <description>&lt;P&gt;Thanks I'll give this a shot and send it in XML.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 16:15:51 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-get-output-of-show-rule-hit-count-via-panxapi-py-or/m-p/293236#M2061</guid>
      <dc:creator>PhilTecklenburg</dc:creator>
      <dc:date>2019-10-17T16:15:51Z</dc:date>
    </item>
  </channel>
</rss>

