<?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: Using API to dynamically register and tag -- can IP address be a subnet or only individual addre in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/using-api-to-dynamically-register-and-tag-can-ip-address-be-a/m-p/315165#M81215</link>
    <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/9726"&gt;@alterioc&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Because you are utilizing user-id&amp;nbsp; to accomplish this, you'll only ever be able to utilize this via a single IP address at a time.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Mar 2020 05:43:23 GMT</pubDate>
    <dc:creator>BPry</dc:creator>
    <dc:date>2020-03-08T05:43:23Z</dc:date>
    <item>
      <title>Using API to dynamically register and tag -- can IP address be a subnet or only individual address?</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/using-api-to-dynamically-register-and-tag-can-ip-address-be-a/m-p/315054#M81197</link>
      <description>&lt;P&gt;In one of our firewalls we have zone A which has network x.x.x.x/24, and zone B which has network y.y.y.y/24. There is a rule allowing traffic between them. Some high-ranking people at my company need to be able to block this traffic automatically at any time.&amp;nbsp; I wrote a powershell script which is triggered by the incident management system when an authorized person submits a ticket. &amp;nbsp;The PS script uses the API to disable the rule that allows the traffic and then do a commit. It works, but ideally I'd like to use something that does not require a commit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read about dynamic ip address &amp;amp; tag registration via xml api and I want to use this method to populate a dynamic address group, and use that group in a deny rule above the allow rule. The match criteria for the address group will be dynamic tag "blockme"; the api will add tag "blockme" to x.x.x.x/24, that address will get added to the dynamic address group, and access will be blocked. I got it to work but it appears that I can only register one ip address per command (versus x.x.x.x/24).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The command I am using in the PS script is:&lt;/P&gt;&lt;P&gt;$AddTag=Invoke-RestMethod -uri "https://&lt;EM&gt;&amp;lt;firewall&amp;gt;&lt;/EM&gt;/api/?type=user-id&amp;amp;command=&amp;lt;uid-message&amp;gt;&amp;lt;type&amp;gt;update&amp;lt;/type&amp;gt;&amp;lt;payload&amp;gt;&amp;lt;register&amp;gt;&amp;lt;entry ip=`"x.x.x.x`"&amp;gt;&amp;lt;tag&amp;gt;&amp;lt;member&amp;gt;blockme&amp;lt;/member&amp;gt;&amp;lt;/tag&amp;gt;&amp;lt;/entry&amp;gt;&amp;lt;/register&amp;gt;&amp;lt;/payload&amp;gt;&amp;lt;/uid-message&amp;gt;&amp;amp;key=$key"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible to do?&amp;nbsp; My attempts have failed and I can't find an example where it's done.&amp;nbsp; If not, then has anyone else had a need to do something similar, and found a better way than what I'm doing? I looked at auto-tagging but it doesn't seem to be a good fit for this situation.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The firewall is running 8.1.&amp;nbsp; Thank you for reading.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 06:04:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/using-api-to-dynamically-register-and-tag-can-ip-address-be-a/m-p/315054#M81197</guid>
      <dc:creator>alterioc</dc:creator>
      <dc:date>2020-03-07T06:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using API to dynamically register and tag -- can IP address be a subnet or only individual addre</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/using-api-to-dynamically-register-and-tag-can-ip-address-be-a/m-p/315165#M81215</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/9726"&gt;@alterioc&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Because you are utilizing user-id&amp;nbsp; to accomplish this, you'll only ever be able to utilize this via a single IP address at a time.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 05:43:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/using-api-to-dynamically-register-and-tag-can-ip-address-be-a/m-p/315165#M81215</guid>
      <dc:creator>BPry</dc:creator>
      <dc:date>2020-03-08T05:43:23Z</dc:date>
    </item>
  </channel>
</rss>

