<?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 how do i get rule hits detail(first-date) by using web service ? in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14570#M1023</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. I develop firewall application using Management API&amp;nbsp; Reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in web-service, show-access-rule give us hits Object include first-date, last-date, level, percentage, value.&lt;/P&gt;&lt;P&gt;(&lt;A class="link-titled" href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/show-access-rule~v1.1%20" title="https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/show-access-rule~v1.1%20"&gt;Check Point - Management API reference&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I only received hits Object include percentage, value.&lt;/P&gt;&lt;P&gt;"hits" : {&lt;BR /&gt; "percentage" : "0%",&lt;BR /&gt; "value" : 0&lt;BR /&gt; },&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I get more detail hits Object???&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get last-date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already set arguments like below&lt;/P&gt;&lt;P&gt;show-hits = true&lt;/P&gt;&lt;P&gt;details-level = full&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Dec 2018 10:32:37 GMT</pubDate>
    <dc:creator>yongjun_jin</dc:creator>
    <dc:date>2018-12-10T10:32:37Z</dc:date>
    <item>
      <title>how do i get rule hits detail(first-date) by using web service ?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14570#M1023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. I develop firewall application using Management API&amp;nbsp; Reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in web-service, show-access-rule give us hits Object include first-date, last-date, level, percentage, value.&lt;/P&gt;&lt;P&gt;(&lt;A class="link-titled" href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/show-access-rule~v1.1%20" title="https://sc1.checkpoint.com/documents/latest/APIs/index.html#gui-cli/show-access-rule~v1.1%20"&gt;Check Point - Management API reference&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I only received hits Object include percentage, value.&lt;/P&gt;&lt;P&gt;"hits" : {&lt;BR /&gt; "percentage" : "0%",&lt;BR /&gt; "value" : 0&lt;BR /&gt; },&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I get more detail hits Object???&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get last-date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already set arguments like below&lt;/P&gt;&lt;P&gt;show-hits = true&lt;/P&gt;&lt;P&gt;details-level = full&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 10:32:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14570#M1023</guid>
      <dc:creator>yongjun_jin</dc:creator>
      <dc:date>2018-12-10T10:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get rule hits detail(first-date) by using web service ?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14571#M1024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Moving this to &lt;A href="https://community.checkpoint.com/space/2003"&gt;Developers (Code Hub)&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;What was the full API call you made?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 11:16:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14571#M1024</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-12-10T11:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get rule hits detail(first-date) by using web service ?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14572#M1025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I am reading this correctly, you want to know the last date that the specific rule was hit?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just ran the command below from SmartConsole CLI, within the output I was able to see, for this specific rule, there is a "last-date". Is this what you were looking for? Or did you want to return only the output of the "last-date" value?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;show access-rule layer "&lt;SPAN style="color: #ff0000;"&gt;POLICY_NAME&lt;/SPAN&gt;" name "&lt;SPAN style="color: #ff0000;"&gt;RULE_NAME&lt;/SPAN&gt;" details-level full show-hits true&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hits: &lt;BR /&gt; percentage: "0%"&lt;BR /&gt; level: "low"&lt;BR /&gt; value: 11005459&lt;BR /&gt; first-date: &lt;BR /&gt; posix: 1532439516000&lt;BR /&gt; iso-8601: "2018-07-24T09:38-0400"&lt;BR /&gt; last-date: &lt;BR /&gt; posix: 1541555809000&lt;BR /&gt; iso-8601: "2018-11-06T20:56-0500"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 12:11:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14572#M1025</guid>
      <dc:creator>Mike_A</dc:creator>
      <dc:date>2018-12-10T12:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get rule hits detail(first-date) by using web service ?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14573#M1026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the rule hit value is zero like in your example, how could there ever be a first hit or last hit. Think about it.&lt;BR /&gt;&lt;BR /&gt;Otherwise your using the appropriate command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 13:40:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14573#M1026</guid>
      <dc:creator>Joshua_Hatter</dc:creator>
      <dc:date>2018-12-10T13:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get rule hits detail(first-date) by using web service ?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14574#M1027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your comment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 02:03:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14574#M1027</guid>
      <dc:creator>yongjun_jin</dc:creator>
      <dc:date>2018-12-12T02:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get rule hits detail(first-date) by using web service ?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14575#M1028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think that api response have to include date information even if hit value is zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It depends on the api developer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deleting date information gives us simple view.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But It need more code for json parsing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also It is different from smart console cli response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 02:23:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14575#M1028</guid>
      <dc:creator>yongjun_jin</dc:creator>
      <dc:date>2018-12-12T02:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get rule hits detail(first-date) by using web service ?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14576#M1029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Joshua said, if there were no hits, how would there ever be a value in that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think what you would then need is a "creation-time". I believe the rule creation-time is at the top of the details under meta-info. If hit value = 0, then query the rule creation time, if it is older then say 90 days, with no hit, then disable, or whatever you want to do with it.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 12:13:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14576#M1029</guid>
      <dc:creator>Mike_A</dc:creator>
      <dc:date>2018-12-12T12:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: how do i get rule hits detail(first-date) by using web service ?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14577#M1030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would require the same amount of code. As of now, you can just check if there is any hits. If we included the last-date as a null value, you would have to check if it was null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's cleaner this way with no date on 0 hit in my opinion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 13:57:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/how-do-i-get-rule-hits-detail-first-date-by-using-web-service/m-p/14577#M1030</guid>
      <dc:creator>Joshua_Hatter</dc:creator>
      <dc:date>2018-12-12T13:57:45Z</dc:date>
    </item>
  </channel>
</rss>

