<?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 get all the information about a deleted rule in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/148980#M6821</link>
    <description>&lt;P&gt;This is a very old post, but glad to see that it's still useful&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There are actually easier ways to do this in today's latest versions. If you see an audit log for a deleted rule, you can look at the session name, find it in the Revisions view (under "Manage and Settings"), right click and select "Compare with previous".&lt;/P&gt;
&lt;P&gt;That will open a visual change report with the session's changes, including the details of the deleted rule.&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 10:08:04 GMT</pubDate>
    <dc:creator>Tomer_Noy</dc:creator>
    <dc:date>2022-05-19T10:08:04Z</dc:date>
    <item>
      <title>How to get all the information about a deleted rule</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/28924#M1726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With R80.10, an audit log for a deleted&amp;nbsp;Access Control rule contains the name of the rule, and the list of policies and layers that contain it.&lt;/P&gt;&lt;P&gt;If you wish to get all the rule's information: source, destination, everything, you can leverage the&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-changes~v1.1"&gt;show-changes REST API&lt;/A&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This can happen either on the MGMT machine itself, or via outside script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, I did it on the MGMT machine itself because every MGMT machine also has a tool called “JQ” which is preinstalled and allows to filter the results of the command. “show-changes” will show all changes that happened in the given session UID, and I’m sending the results to JQ which then filters them only to deleted access rules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1: get the session ID from the audit log card.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="62993" alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/checkpoint/62993_1 copy session UID.png" style="width: 620px; height: 391px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: On the security management machine, login and save the login details to a text file. We will use this text file to identify for the next command.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;mgmt_cli login user [username] password [password] domain [domain, optional] &amp;gt; sid.txt&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3: Use the show-changes API with filter on deleted access rules and based on the session UID that we copied from step 1.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;mgmt_cli show-changes -s sid.txt to-session 2af63713-ad4e-4e9e-869b-361262810258 details-level full --format json | jq -r '.tasks[]["task-details"][].changes[].operations["deleted-objects"][]|select(.type=="access-rule")'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;result is attached to this&amp;nbsp;thread (big json with all the data that the rule has) (2 rules were deleted in this session)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step 4: logout&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;mgmt_cli logout -s sid.txt&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Feedback is welcome.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 09:59:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/28924#M1726</guid>
      <dc:creator>Tomer_Sole</dc:creator>
      <dc:date>2018-02-12T09:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the information about a deleted rule</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/28925#M1727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's actually a neat trick &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.checkpoint.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 21:01:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/28925#M1727</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-02-12T21:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the information about a deleted rule</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/28926#M1728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like that!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 08:00:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/28926#M1728</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2018-02-15T08:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the information about a deleted rule</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/148970#M6819</link>
      <description>&lt;P&gt;Thank you so much. It 's very useful&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 07:44:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/148970#M6819</guid>
      <dc:creator>PhongNN</dc:creator>
      <dc:date>2022-05-19T07:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the information about a deleted rule</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/148980#M6821</link>
      <description>&lt;P&gt;This is a very old post, but glad to see that it's still useful&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There are actually easier ways to do this in today's latest versions. If you see an audit log for a deleted rule, you can look at the session name, find it in the Revisions view (under "Manage and Settings"), right click and select "Compare with previous".&lt;/P&gt;
&lt;P&gt;That will open a visual change report with the session's changes, including the details of the deleted rule.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 10:08:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/148980#M6821</guid>
      <dc:creator>Tomer_Noy</dc:creator>
      <dc:date>2022-05-19T10:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the information about a deleted rule</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/148983#M6822</link>
      <description>&lt;P&gt;Excuse me&lt;/P&gt;&lt;P&gt;Is this feature available on version R80.30?&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 09:03:56 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/148983#M6822</guid>
      <dc:creator>PhongNN</dc:creator>
      <dc:date>2022-05-19T09:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all the information about a deleted rule</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/148993#M6823</link>
      <description>&lt;P&gt;The "Change Report" feature was added in R81&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 10:07:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-get-all-the-information-about-a-deleted-rule/m-p/148993#M6823</guid>
      <dc:creator>Tomer_Noy</dc:creator>
      <dc:date>2022-05-19T10:07:26Z</dc:date>
    </item>
  </channel>
</rss>

