<?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: Retrieving Rule Hit Count and Unused Rules Information via API in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/238154#M8911</link>
    <description>&lt;P&gt;Here is some sample output:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;output removed&amp;gt;
hits:
percentage: "3%"
level: "low"
value: 53680
first-date:
posix: 1735832392000
iso-8601: "2025-01-02T16:39+0100"
last-date:
posix: 1736500492000
iso-8601: "2025-01-10T10:14+0100"
&amp;lt;/output removed&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 10 Jan 2025 10:40:30 GMT</pubDate>
    <dc:creator>Daniel_Kuhl1</dc:creator>
    <dc:date>2025-01-10T10:40:30Z</dc:date>
    <item>
      <title>Retrieving Rule Hit Count and Unused Rules Information via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/191561#M7991</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm working with a Checkpoint Gateway/Management server and I'm interested in retrieving specific information about rule hits and unused rules. I would appreciate your guidance on how to achieve this through the API, including any relevant commands and limitations.&lt;/P&gt;&lt;P&gt;1. **Rule Hit Count Details:**&lt;BR /&gt;- Is there a way to obtain detailed information on rule hit counts?&lt;BR /&gt;- Can I retrieve rule hit counts for various time frames such as the last 24 hours, 7 days, 30 days, 60 days, or a custom range?&lt;BR /&gt;- Please provide the appropriate API commands for retrieving this information.&lt;BR /&gt;- Are there any limitations or considerations I should be aware of when using these commands?&lt;/P&gt;&lt;P&gt;2. **Unused Rules List:**&lt;BR /&gt;- Is there a method to identify and obtain a list of unused rules in the firewall configuration?&lt;BR /&gt;- Similar to rule hit counts, can I obtain information about unused rules for specific time frames (e.g., last 24 hours, 7 days, 30 days, 60 days, or custom)?&lt;BR /&gt;- Please share the relevant API commands for accomplishing this task.&lt;BR /&gt;- Are there any constraints or important details to keep in mind when working with these commands?&lt;/P&gt;&lt;P&gt;I'm eager to enhance my understanding of these functionalities, and your expertise would be invaluable. Thank you in advance for your assistance!&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;M.Veeraselvam&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 10:42:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/191561#M7991</guid>
      <dc:creator>Veeraselvam_man</dc:creator>
      <dc:date>2023-09-05T10:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Rule Hit Count and Unused Rules Information via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/191564#M7992</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;show access-rulebase MGMT API can all hitcount details&lt;BR /&gt;See&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-access-rulebase~v1.9%20" target="_blank"&gt;Check Point - Management API reference&lt;/A&gt;&lt;BR /&gt;In addition - there is a tool in Check Point github that clears/disables unusaed rules-&amp;nbsp;&lt;A href="https://github.com/CheckPointSW/PolicyCleanUp" target="_blank"&gt;GitHub - CheckPointSW/PolicyCleanUp: Check Point PolicyCleanUp tool allows automatic cleanup of your policy based on hits count.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 10:59:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/191564#M7992</guid>
      <dc:creator>Youssef_Obeidal</dc:creator>
      <dc:date>2023-09-05T10:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Rule Hit Count and Unused Rules Information via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/238148#M8909</link>
      <description>&lt;P&gt;Can this be done using REST API calls?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 06:54:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/238148#M8909</guid>
      <dc:creator>Noli_Pineda</dc:creator>
      <dc:date>2025-01-10T06:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Rule Hit Count and Unused Rules Information via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/238153#M8910</link>
      <description>&lt;P&gt;There is an example in the &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-access-rulebase~v1.9%20" target="_self"&gt;Check Point - Management API reference.&lt;/A&gt;&lt;/P&gt;
&lt;PRE class="code"&gt;POST {{server}}/show-access-rulebase
Content-Type: application/json
X-chkp-sid: {{session}}

{
  "offset" : 0,
  "limit" : 20,
  "name" : "Network",
  "details-level" : "standard",
  "use-object-dictionary" : true,
  "show-hits" : true,
  "hits-settings" : {
    "from-date" : "2014-01-01",
    "to-date" : "2014-12-31T23:59",
    "target" : "corporate-gw"
  }
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 10:33:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/238153#M8910</guid>
      <dc:creator>Daniel_Kuhl1</dc:creator>
      <dc:date>2025-01-10T10:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Rule Hit Count and Unused Rules Information via API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/238154#M8911</link>
      <description>&lt;P&gt;Here is some sample output:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;output removed&amp;gt;
hits:
percentage: "3%"
level: "low"
value: 53680
first-date:
posix: 1735832392000
iso-8601: "2025-01-02T16:39+0100"
last-date:
posix: 1736500492000
iso-8601: "2025-01-10T10:14+0100"
&amp;lt;/output removed&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Jan 2025 10:40:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Retrieving-Rule-Hit-Count-and-Unused-Rules-Information-via-API/m-p/238154#M8911</guid>
      <dc:creator>Daniel_Kuhl1</dc:creator>
      <dc:date>2025-01-10T10:40:30Z</dc:date>
    </item>
  </channel>
</rss>

