<?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: Palo Alto REST API - test security-policy-match in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/palo-alto-rest-api-test-security-policy-match/m-p/351346#M2455</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;While running below api i am getting some error and when i am checking XMI API from palo alto i dont see any config&amp;amp;action=show&amp;amp;xptah(showis not present.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://x.x.x.x/api/?type=config&amp;amp;action=show&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='Ping']&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Sep 2020 06:22:21 GMT</pubDate>
    <dc:creator>SameerT</dc:creator>
    <dc:date>2020-09-23T06:22:21Z</dc:date>
    <item>
      <title>Palo Alto REST API - test security-policy-match</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/palo-alto-rest-api-test-security-policy-match/m-p/120405#M1280</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have been trying using the command "test security-policy-match" with REST API. I do get a proper response, but i'm missing some valuable information.&lt;/P&gt;&lt;P&gt;From the CLI i get the following response:&lt;BR /&gt;admin@KAS-PaloAlto&amp;gt; &lt;STRONG&gt;test security-policy-match from KAS- zone-1 to KAS-zone-2 source 10.1.1.25 destination 10.2.2.25 protocol 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Ping {
from KAS-zone-1;
source 10.1.1.25;
source-region none;
to KAS-zone-2;
destination 10.2.2.25;
destination-region none;
user any;
category any;
application/service any/any/any/any;
action allow;
icmp-unreachable: no
terminal yes;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i use the following API:&lt;/P&gt;&lt;PRE&gt;https://x.x.x.x//api/?type=op&amp;amp;cmd=&amp;lt;test&amp;gt;&amp;lt;security-policy-match&amp;gt;&amp;lt;from&amp;gt;KAS-zone-1&amp;lt;/from&amp;gt;&amp;lt;to&amp;gt;KAS-zone-2&amp;lt;/to&amp;gt;&amp;lt;source&amp;gt;10.1.1.25&amp;lt;/source&amp;gt;&amp;lt;destination&amp;gt;10.2.2.25&amp;lt;/destination&amp;gt;&amp;lt;protocol&amp;gt;1&amp;lt;/protocol&amp;gt;&amp;lt;/security-policy-match&amp;gt;&amp;lt;/test&amp;gt;&amp;amp;key=my.key&lt;/PRE&gt;&lt;P&gt;I get the following response:&lt;/P&gt;&lt;PRE&gt;&amp;lt;response cmd="status" status="success"&amp;gt;
&amp;lt;result&amp;gt;
&amp;lt;rules&amp;gt;
&amp;lt;entry&amp;gt;Ping&amp;lt;/entry&amp;gt;
&amp;lt;/rules&amp;gt;
&amp;lt;/result&amp;gt;
&amp;lt;/response&amp;gt;&lt;/PRE&gt;&lt;P&gt;As you see i dont get the information within the brackets, like in the CLI.&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2016 12:28:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/palo-alto-rest-api-test-security-policy-match/m-p/120405#M1280</guid>
      <dc:creator>LarsRugaard</dc:creator>
      <dc:date>2016-10-21T12:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Palo Alto REST API - test security-policy-match</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/palo-alto-rest-api-test-security-policy-match/m-p/121000#M1281</link>
      <description>&lt;P&gt;That additional data in brackets represets the configuration of the security rule. It is pulled via a seperate API call and displayed on the CLI, but when using the API you have to make that API call yourself. For example, this would pull the same information about the rule:&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;https://x.x.x.x/api/?type=config&amp;amp;action=show&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='Ping']&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Response:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;response status="success" code="19"&amp;gt;
&amp;lt;result total-count="1" count="1"&amp;gt;
&amp;lt;entry name="Ping"&amp;gt;
  &amp;lt;from&amp;gt;
    &amp;lt;member&amp;gt;Trust&amp;lt;/member&amp;gt;
  &amp;lt;/from&amp;gt;
  &amp;lt;to&amp;gt;
    &amp;lt;member&amp;gt;Internet&amp;lt;/member&amp;gt;
  &amp;lt;/to&amp;gt;
  &amp;lt;source&amp;gt;
    &amp;lt;member&amp;gt;any&amp;lt;/member&amp;gt;
  &amp;lt;/source&amp;gt;
  &amp;lt;destination&amp;gt;
    &amp;lt;member&amp;gt;any&amp;lt;/member&amp;gt;
  &amp;lt;/destination&amp;gt;
  &amp;lt;source-user&amp;gt;
    &amp;lt;member&amp;gt;any&amp;lt;/member&amp;gt;
  &amp;lt;/source-user&amp;gt;
  &amp;lt;category&amp;gt;
    &amp;lt;member&amp;gt;any&amp;lt;/member&amp;gt;
  &amp;lt;/category&amp;gt;
  &amp;lt;application&amp;gt;
    &amp;lt;member&amp;gt;ping&amp;lt;/member&amp;gt;
  &amp;lt;/application&amp;gt;
  &amp;lt;service&amp;gt;
    &amp;lt;member&amp;gt;any&amp;lt;/member&amp;gt;
  &amp;lt;/service&amp;gt;
  &amp;lt;hip-profiles&amp;gt;
    &amp;lt;member&amp;gt;any&amp;lt;/member&amp;gt;
  &amp;lt;/hip-profiles&amp;gt;
  &amp;lt;action&amp;gt;allow&amp;lt;/action&amp;gt;
  &amp;lt;log-start&amp;gt;no&amp;lt;/log-start&amp;gt;
  &amp;lt;log-end&amp;gt;yes&amp;lt;/log-end&amp;gt;
  &amp;lt;negate-source&amp;gt;no&amp;lt;/negate-source&amp;gt;
  &amp;lt;negate-destination&amp;gt;no&amp;lt;/negate-destination&amp;gt;
  &amp;lt;log-setting&amp;gt;default&amp;lt;/log-setting&amp;gt;
&amp;lt;/entry&amp;gt;
&amp;lt;/result&amp;gt;
&amp;lt;/response&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Oct 2016 02:33:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/palo-alto-rest-api-test-security-policy-match/m-p/121000#M1281</guid>
      <dc:creator>btorresgil</dc:creator>
      <dc:date>2016-10-25T02:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Palo Alto REST API - test security-policy-match</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/palo-alto-rest-api-test-security-policy-match/m-p/351346#M2455</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;While running below api i am getting some error and when i am checking XMI API from palo alto i dont see any config&amp;amp;action=show&amp;amp;xptah(showis not present.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://x.x.x.x/api/?type=config&amp;amp;action=show&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='Ping']&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Sep 2020 06:22:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/palo-alto-rest-api-test-security-policy-match/m-p/351346#M2455</guid>
      <dc:creator>SameerT</dc:creator>
      <dc:date>2020-09-23T06:22:21Z</dc:date>
    </item>
  </channel>
</rss>

