<?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: How to check if there are changes in the policy? in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-there-are-changes-in-the-policy/m-p/119058#M5859</link>
    <description>&lt;P&gt;There doesn't seem to be a simple way to do this, but I think this would work:&lt;/P&gt;
&lt;P&gt;1) Pull date of last policy install to the gateway with &lt;STRONG&gt;cpstat -f policy fw&lt;/STRONG&gt;, field "Policy Install Time".&amp;nbsp; There doesn't seem to be a way to pull this info directly from the API that I can find; was hoping to get this from the audit logs but they don't seem to be available at all via the API.&amp;nbsp; This policy install date info can be found easily on the Gateways &amp;amp; Servers tab of the SmartConsole GUI, so it may be somehow available through the management API although I couldn't figure out how.&lt;/P&gt;
&lt;P&gt;2) Once you have the last policy install date, invoke the &lt;STRONG&gt;show changes from-date&lt;/STRONG&gt; API call to see a list of changes since last policy install date.&amp;nbsp; Note that similarly to the display on the Install Policy confirmation screen, this shows you the total number of changes since last policy install, but all those changes are not necessarily relevant to the gateway in question.&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 13:36:11 GMT</pubDate>
    <dc:creator>Timothy_Hall</dc:creator>
    <dc:date>2021-05-21T13:36:11Z</dc:date>
    <item>
      <title>How to check if there are changes in the policy?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-there-are-changes-in-the-policy/m-p/106383#M5431</link>
      <description>&lt;P&gt;How to check if there are changes in the policy?&lt;BR /&gt;I only want to install the policy if there have been changes.&lt;/P&gt;&lt;P&gt;Accounts for VPN users can be created during the day. And at the end of the day, I need to apply a policy so that users from home can connect.&lt;/P&gt;&lt;P&gt;I use&amp;nbsp;&lt;STRONG&gt;Management API v1.6.1&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 15:20:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-there-are-changes-in-the-policy/m-p/106383#M5431</guid>
      <dc:creator>CepKpy</dc:creator>
      <dc:date>2020-12-25T15:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if there are changes in the policy?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-there-are-changes-in-the-policy/m-p/106385#M5432</link>
      <description>&lt;P&gt;That means you're on R80.40 with a recent JHF.&lt;BR /&gt;Means you can leverage this:&amp;nbsp;&lt;A href="https://community.checkpoint.com/t5/SmartConsole-Extensions/Change-Report/m-p/87322" target="_blank"&gt;https://community.checkpoint.com/t5/SmartConsole-Extensions/Change-Report/m-p/87322&lt;/A&gt;&lt;BR /&gt;See also discussion about the show-changes API here:&amp;nbsp;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Show-changes-from-session-gt-from-a-single-session/m-p/48854" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Show-changes-from-session-gt-from-a-single-session/m-p/48854&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 16:59:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-there-are-changes-in-the-policy/m-p/106385#M5432</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-12-25T16:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if there are changes in the policy?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-there-are-changes-in-the-policy/m-p/119035#M5858</link>
      <description>&lt;P&gt;it doesn't answer my question. I need to find out via the API: have changes been posted since the last installation of the policies?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 485px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/11765i10A358877CF50BCB/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 10:06:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-there-are-changes-in-the-policy/m-p/119035#M5858</guid>
      <dc:creator>CepKpy</dc:creator>
      <dc:date>2021-05-21T10:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if there are changes in the policy?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-there-are-changes-in-the-policy/m-p/119058#M5859</link>
      <description>&lt;P&gt;There doesn't seem to be a simple way to do this, but I think this would work:&lt;/P&gt;
&lt;P&gt;1) Pull date of last policy install to the gateway with &lt;STRONG&gt;cpstat -f policy fw&lt;/STRONG&gt;, field "Policy Install Time".&amp;nbsp; There doesn't seem to be a way to pull this info directly from the API that I can find; was hoping to get this from the audit logs but they don't seem to be available at all via the API.&amp;nbsp; This policy install date info can be found easily on the Gateways &amp;amp; Servers tab of the SmartConsole GUI, so it may be somehow available through the management API although I couldn't figure out how.&lt;/P&gt;
&lt;P&gt;2) Once you have the last policy install date, invoke the &lt;STRONG&gt;show changes from-date&lt;/STRONG&gt; API call to see a list of changes since last policy install date.&amp;nbsp; Note that similarly to the display on the Install Policy confirmation screen, this shows you the total number of changes since last policy install, but all those changes are not necessarily relevant to the gateway in question.&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 13:36:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-check-if-there-are-changes-in-the-policy/m-p/119058#M5859</guid>
      <dc:creator>Timothy_Hall</dc:creator>
      <dc:date>2021-05-21T13:36:11Z</dc:date>
    </item>
  </channel>
</rss>

