<?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: APIs to createmove a security policy at the top of device group pre-rule section and move it up/ in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246547#M1850</link>
    <description>&lt;P&gt;Thanks for your hint. I've just worked out how to&amp;nbsp;&lt;SPAN&gt;do a call to "just give me the names of the rules, not their configurations". This would definitely reduce the processing time.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jan 2019 23:40:06 GMT</pubDate>
    <dc:creator>hstsvn</dc:creator>
    <dc:date>2019-01-17T23:40:06Z</dc:date>
    <item>
      <title>APIs to createmove a security policy at the top of device group pre-rule section and move it up/down</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246027#M1835</link>
      <description>&lt;P&gt;Dear All, on Panorama GUI (version 8.1.3),&amp;nbsp;&amp;nbsp;I am able to move security policies to Top, Bottom, Up and Down in the&amp;nbsp;device group pre-rule section. However I could not find APIs to perform these tasks. The closest one is in here&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/8-0/pan-os-panorama-api/pan-os-xml-api-request-types/configuration-api/move-configuration.html" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/8-0/pan-os-panorama-api/pan-os-xml-api-request-types/configuration-api/move-configuration.html&lt;/A&gt;&amp;nbsp;but it is not enough. Would anyone know?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many thanks for your reponses in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 02:19:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246027#M1835</guid>
      <dc:creator>hstsvn</dc:creator>
      <dc:date>2019-01-15T02:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: APIs to createmove a security policy at the top of device group pre-rule section and move it up/</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246135#M1837</link>
      <description>&lt;P&gt;Yeah, this is the correct thing you want.&amp;nbsp; You'll just need to add in the API key to that request string and&amp;nbsp;the move command will work just fine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;A href="https://docs.paloaltonetworks.com/pan-os/8-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api.html" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/8-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 18:31:33 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246135#M1837</guid>
      <dc:creator>gfreeman</dc:creator>
      <dc:date>2019-01-15T18:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: APIs to createmove a security policy at the top of device group pre-rule section and move it up/</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246198#M1839</link>
      <description>&lt;P&gt;Thanks for your reply, gfreeman. I was posting in hurry so I was not clear. My question was I know API to create the security policy. It is always added to the bottom of the pre-rule section. And I know API to move it above or below a certain rule using the name of that rule or to the top. They are already mentioned here&amp;nbsp;&lt;A href="https://docs.paloaltonetworks.com/pan-os/8-0/pan-os-panorama-api/pan-os-xml-api-request-types/configuration-api/move-configuration.html" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/8-0/pan-os-panorama-api/pan-os-xml-api-request-types/configuration-api/move-configuration.html&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I don't know any API that can&amp;nbsp;move the security policy up or down 1 level from its current position. When I tried "move" API without the "dst" parameter:&amp;nbsp;&lt;SPAN class="hljs-symbol"&gt;https:&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN class="hljs-regexp"&gt;/&lt;/SPAN&gt;&lt;SPAN class="hljs-regexp"&gt;&amp;lt;firewall&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="hljs-regexp"&gt;/api&lt;/SPAN&gt;&lt;SPAN class="hljs-regexp"&gt;/?type=config&amp;amp;action=move&amp;amp;xpath=/config&lt;/SPAN&gt;&lt;SPAN class="hljs-regexp"&gt;/devices/entry&lt;/SPAN&gt;&lt;SPAN class="hljs-regexp"&gt;/vsys/entry&lt;/SPAN&gt;&lt;SPAN&gt;[@name=&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;'vsys1'&lt;/SPAN&gt;&lt;SPAN&gt;]/rulebase/security/rules/entry[@name=&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;'rule1'&lt;/SPAN&gt;&lt;SPAN&gt;]&amp;amp;where=after, I got the following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;response status="error" code="7"&amp;gt;&amp;lt;msg&amp;gt;&amp;lt;line&amp;gt;no target specified in move&amp;lt;/line&amp;gt;&amp;lt;/msg&amp;gt;&amp;lt;/response&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it possible to move the rule up/down 1 level without having to provide the "dst" or "target" rule?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 02:19:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246198#M1839</guid>
      <dc:creator>hstsvn</dc:creator>
      <dc:date>2019-01-16T02:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: APIs to createmove a security policy at the top of device group pre-rule section and move it up/</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246309#M1841</link>
      <description>&lt;P&gt;I see.&amp;nbsp; Unfortunately, no.&amp;nbsp; If you want to move a security&amp;nbsp;rule up or down one, your workflow is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) get list of all rules&lt;/P&gt;
&lt;P&gt;2) see which rule is above/below your current rule&lt;/P&gt;
&lt;P&gt;3) do the move command, having it reference that other rule&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 16:42:29 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246309#M1841</guid>
      <dc:creator>gfreeman</dc:creator>
      <dc:date>2019-01-16T16:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: APIs to createmove a security policy at the top of device group pre-rule section and move it up/</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246383#M1843</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/46544" target="_self"&gt;gfreeman&lt;/A&gt;, that was my thoughts too. However I was expecting something more easily. As the mentioned workflow sounds simple but actually it is not easy as the script needs to read the whole device group pre-rule section in order to be able to extract the above/below rule names. It&amp;nbsp;is more difficult when the the section has large number of rules say 4000 to 5000 rules.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 22:30:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246383#M1843</guid>
      <dc:creator>hstsvn</dc:creator>
      <dc:date>2019-01-16T22:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: APIs to createmove a security policy at the top of device group pre-rule section and move it up/</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246525#M1848</link>
      <description>&lt;P&gt;Yes, that's right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are small xpath tricks you can do in order to speed up the API call (specifically in this case, do a call to "just give me the names of the rules, not their configurations), but the way to accomplish it is the same.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 18:28:28 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246525#M1848</guid>
      <dc:creator>gfreeman</dc:creator>
      <dc:date>2019-01-17T18:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: APIs to createmove a security policy at the top of device group pre-rule section and move it up/</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246547#M1850</link>
      <description>&lt;P&gt;Thanks for your hint. I've just worked out how to&amp;nbsp;&lt;SPAN&gt;do a call to "just give me the names of the rules, not their configurations". This would definitely reduce the processing time.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 23:40:06 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/apis-to-createmove-a-security-policy-at-the-top-of-device-group/m-p/246547#M1850</guid>
      <dc:creator>hstsvn</dc:creator>
      <dc:date>2019-01-17T23:40:06Z</dc:date>
    </item>
  </channel>
</rss>

