<?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 find &amp;quot;creation-time&amp;quot; when using jq to show access-rulebase in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-find-quot-creation-time-quot-when-using-jq-to-show-access/m-p/120792#M5904</link>
    <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ended up finding a way to do this the correct syntax was:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;,"enabled"&amp;nbsp;,&lt;/SPAN&gt;&lt;STRONG&gt;."meta-info"."creation-time"."iso-8601"&lt;/STRONG&gt;&lt;SPAN&gt;, ."uid"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found this "meta-info" in the following discussion:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-to-show-Custom-Applications-Categories/td-p/47049" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-to-show-Custom-Applications-Categories/td-p/47049&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lior&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 22:31:00 GMT</pubDate>
    <dc:creator>LiorL</dc:creator>
    <dc:date>2021-06-09T22:31:00Z</dc:date>
    <item>
      <title>How to find "creation-time" when using jq to show access-rulebase</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-find-quot-creation-time-quot-when-using-jq-to-show-access/m-p/120682#M5897</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have an issue where we cant find a way to filter "creation-time".&lt;/P&gt;&lt;P&gt;Query we are using :&amp;nbsp;&lt;/P&gt;&lt;P&gt;mgmt_cli -d 1.1.1.1 show access-rulebase name "Network" details-level "full" offset 0 limit 500 use-object-dictionary true show-hits true hits-settings.from-date "2000-01-01" hits-settings.to-date "2021-06-09"&amp;nbsp; --format json -u admin |jq -r '.rulebase[].rulebase[]|select(.hits.value == 0)| [."rule-number", ."name", ."comments", ."enabled", ."uid" ]|@csv' &amp;gt; Unusedrules.csv&lt;/P&gt;&lt;P&gt;When we run this with out the jq output will be:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- uid: "XXXXXXXXXXXXXXX"&lt;/P&gt;&lt;P&gt;&amp;nbsp; name: "XX"&lt;/P&gt;&lt;P&gt;&amp;nbsp; type: "XX"&lt;/P&gt;&lt;P&gt;&amp;nbsp; domain:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uid: "XX"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name: "XX"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; domain-type: ""XX&lt;/P&gt;&lt;P&gt;&amp;nbsp; comments: "XX"&lt;/P&gt;&lt;P&gt;&amp;nbsp; color: "black"&lt;/P&gt;&lt;P&gt;&amp;nbsp; icon: ""&lt;/P&gt;&lt;P&gt;&amp;nbsp; tags: []&lt;/P&gt;&lt;P&gt;&amp;nbsp; meta-info:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lock: "unlocked"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; validation-state: "ok"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; last-modify-time:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; posix: 1496773657035&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iso-8601: "2017-06-07T06:27+1200"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; last-modifier: "System"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;creation-time:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; posix: 1490915014155&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;iso-8601: "2017-03-31T12:03+1300"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; creator: "System"&lt;/P&gt;&lt;P&gt;&amp;nbsp; read-only: false&lt;/P&gt;&lt;P&gt;from: 1&lt;/P&gt;&lt;P&gt;to: 500&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value we would like to add to the jq is the values under "iso-8601" ==&amp;nbsp;"2017-06-07T06:27+1200".&lt;/P&gt;&lt;P&gt;When we tried the following there was no output (as part of the query above with the jq):&amp;nbsp;&lt;/P&gt;&lt;P&gt;,"enabled"&amp;nbsp;,."creation-time", ."uid"&lt;/P&gt;&lt;P&gt;,"enabled"&amp;nbsp;,."&amp;nbsp;iso-8601", ."uid"&lt;/P&gt;&lt;P&gt;,"enabled"&amp;nbsp;,."creation-time"."&amp;nbsp;iso-8601", ."uid"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But nothing works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Version is R80.20 JHF is 188 and it is an MDM&lt;/P&gt;&lt;P&gt;Any ideas?&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW the main purpose is to get the zero hits reports generated with this info, and based on this we can check when the rule was added.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lior&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 03:50:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-find-quot-creation-time-quot-when-using-jq-to-show-access/m-p/120682#M5897</guid>
      <dc:creator>LiorL</dc:creator>
      <dc:date>2021-06-09T03:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to find "creation-time" when using jq to show access-rulebase</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-find-quot-creation-time-quot-when-using-jq-to-show-access/m-p/120792#M5904</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ended up finding a way to do this the correct syntax was:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;,"enabled"&amp;nbsp;,&lt;/SPAN&gt;&lt;STRONG&gt;."meta-info"."creation-time"."iso-8601"&lt;/STRONG&gt;&lt;SPAN&gt;, ."uid"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found this "meta-info" in the following discussion:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-to-show-Custom-Applications-Categories/td-p/47049" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-to-show-Custom-Applications-Categories/td-p/47049&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lior&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 22:31:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-find-quot-creation-time-quot-when-using-jq-to-show-access/m-p/120792#M5904</guid>
      <dc:creator>LiorL</dc:creator>
      <dc:date>2021-06-09T22:31:00Z</dc:date>
    </item>
  </channel>
</rss>

