<?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: Security rules via API with two vsys in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185128#M1489</link>
    <description>&lt;P&gt;Sorry...I committed the cardinal sin.&amp;nbsp; Here's what we're working with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All configs are pushed via Panorama.&lt;/P&gt;&lt;P&gt;Panorama and the device in question are both on 7.1.12.&amp;nbsp; I should be looking at the API in Panorama, shouldn't I?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2017 12:53:10 GMT</pubDate>
    <dc:creator>turturici</dc:creator>
    <dc:date>2017-11-02T12:53:10Z</dc:date>
    <item>
      <title>Security rules via API with two vsys</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185125#M1487</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;This morning started with me pulling my hair out...just like yesterday ended.&amp;nbsp; So, here I am.&amp;nbsp; I want to query our Palo Alto firewall via the API to show me security rules...not a big deal.&amp;nbsp; However, the device as two vsys's (or however you write that), and the API query only revealed one security policy, which I know is not right.&amp;nbsp; I've been using the API GUI to poke around, but I keep getting the same results:&lt;/P&gt;&lt;P&gt;/config/devices/entry[@name=&amp;lt;thingy&amp;gt;]/vsys/entry[@name=&lt;STRONG&gt;'vsys1'&lt;/STRONG&gt;]/rulebase/security&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gives me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;response status="success" code="19"&amp;gt;&lt;BR /&gt;&amp;lt;result total-count="1" count="1"&amp;gt;&lt;BR /&gt;&amp;lt;security&amp;gt;&lt;BR /&gt;&amp;lt;rules&amp;gt;&lt;/P&gt;&lt;P&gt;blah blah blah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this can't be right.&amp;nbsp; I've checked the other vsys via this query and it has ZERO results, which is also wrong.&amp;nbsp; Is this, perhaps, a permissions issue?&amp;nbsp; Or, is the way our device is split in to two vsys's causing the problem?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of very interesting note: I exported the running config directly from this device and got&amp;nbsp;&lt;STRONG&gt;the same results!&lt;/STRONG&gt; Only one security policy shows up under vsys1 and ZERO are in vsys2?&amp;nbsp; I don't understand...&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 12:38:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185125#M1487</guid>
      <dc:creator>turturici</dc:creator>
      <dc:date>2017-11-02T12:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Security rules via API with two vsys</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185127#M1488</link>
      <description>&lt;P&gt;Are the ones in question Panorama pushed configuration or local configuration? What code branch and model are you dealing with?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 12:50:25 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185127#M1488</guid>
      <dc:creator>nigelswift</dc:creator>
      <dc:date>2017-11-02T12:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Security rules via API with two vsys</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185128#M1489</link>
      <description>&lt;P&gt;Sorry...I committed the cardinal sin.&amp;nbsp; Here's what we're working with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All configs are pushed via Panorama.&lt;/P&gt;&lt;P&gt;Panorama and the device in question are both on 7.1.12.&amp;nbsp; I should be looking at the API in Panorama, shouldn't I?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 12:53:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185128#M1489</guid>
      <dc:creator>turturici</dc:creator>
      <dc:date>2017-11-02T12:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Security rules via API with two vsys</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185138#M1490</link>
      <description>&lt;P&gt;Exactly. It only shows local configuration where you're looking. Alternatively, you can do type=op and cmd=&amp;lt;show&amp;gt;&amp;lt;running&amp;gt;&amp;lt;security-policy&amp;gt;&amp;lt;/security-policy&amp;gt;&amp;lt;/running&amp;gt;&amp;lt;/show&amp;gt; which should return all the ones in effect if that's what you're after.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 13:23:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185138#M1490</guid>
      <dc:creator>nigelswift</dc:creator>
      <dc:date>2017-11-02T13:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Security rules via API with two vsys</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185146#M1491</link>
      <description>&lt;P&gt;Got it...thx.&lt;/P&gt;&lt;P&gt;Any luck calling an API key via PowerShell instead of embedding it in the request?&amp;nbsp; I wonder if Palo Alto's API can't accept additional headers?&amp;nbsp; I can't seem to find this information anywhere.&amp;nbsp; If I embed my API key in my GET request, I auth successfully.&amp;nbsp; When I call the API key using the "-headers" function in PowerShell, no worky.&amp;nbsp; Thoughts?&amp;nbsp; I know this is a separate concept, but I'm grasping at straws here.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 13:48:41 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/security-rules-via-api-with-two-vsys/m-p/185146#M1491</guid>
      <dc:creator>turturici</dc:creator>
      <dc:date>2017-11-02T13:48:41Z</dc:date>
    </item>
  </channel>
</rss>

