<?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: Workaround - How to list all user-created application sites objects in short time in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Workaround-How-to-list-all-user-created-application-sites/m-p/116962#M5814</link>
    <description>&lt;P&gt;You are right of course and I agree it is probably best solution for simple call. My way is suitable for repeating calls when we want to minimize performance impact to API/database and get result in reasonable time.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Apr 2021 16:20:50 GMT</pubDate>
    <dc:creator>Petr_Hantak</dc:creator>
    <dc:date>2021-04-26T16:20:50Z</dc:date>
    <item>
      <title>Workaround - How to list all user-created application sites objects in short time</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Workaround-How-to-list-all-user-created-application-sites/m-p/116921#M5812</link>
      <description>&lt;P&gt;I would like to share with you small tip how to list all custom application-sites objects via API in reasonable time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Why I need it?&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I personally need to list all custom application site objects for internal auditing purpose. Right now there is no direct call how to list it. You can make listing simply by call &lt;STRONG&gt;"show-application-sites"&amp;nbsp;&lt;/STRONG&gt;and filter result by&amp;nbsp;&lt;STRONG&gt;user-defined&lt;/STRONG&gt; parameter,&amp;nbsp;&lt;STRONG&gt;category&amp;nbsp;&lt;/STRONG&gt;or&amp;nbsp;&lt;STRONG&gt;tag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In that case every simple call could take a long time. There is more than 8K generic application objects in database by default and I noticed such call take me approximatelly 2 minutes. If you need to take it from 30 diferent domains for example, then it could be really time consuming. Administrators don't have thousands of those objects so I don't see reason to load whole big data batch and then just drop 95% of it.&lt;/P&gt;&lt;P&gt;I decided to use workaround in my code to and time went down from minutes to seconds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I'm using call&amp;nbsp;&lt;STRONG&gt;"show-generic-objects" &lt;/STRONG&gt;to get custom sites uids (this is not a standard call so I want to take a minimum only to avoid any unexpected result). Then I'm reading each custom site by &lt;STRONG&gt;"show-application-site"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;mgmt_cli show-generic-objects class-name "com.checkpoint.objects.appfw.dummy.CpmiUserApplication" details-level uid --format json&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;mgmt_cli show-application-site uid "6175850c-9ad5-4f1b-b7d8-e551b4d0f0c2" details-level standard --format json&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Remember to use offset and limit to list all related objects in first call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be nice if we have one day a simple parameter in API to make the same work or related filter in&amp;nbsp;&lt;STRONG&gt;show-objects&lt;/STRONG&gt; call.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 12:38:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Workaround-How-to-list-all-user-created-application-sites/m-p/116921#M5812</guid>
      <dc:creator>Petr_Hantak</dc:creator>
      <dc:date>2021-04-26T12:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround - How to list all user-created application sites objects in short time</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Workaround-How-to-list-all-user-created-application-sites/m-p/116951#M5813</link>
      <description>&lt;P&gt;If you add JQ to the mix you can filter based on who created it (which is one of the fields).&lt;BR /&gt;Included ones will be created by System (or similar).&lt;BR /&gt;But like you said: it’s a lot of calls just to drop most of the results.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 15:36:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Workaround-How-to-list-all-user-created-application-sites/m-p/116951#M5813</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-04-26T15:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround - How to list all user-created application sites objects in short time</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Workaround-How-to-list-all-user-created-application-sites/m-p/116962#M5814</link>
      <description>&lt;P&gt;You are right of course and I agree it is probably best solution for simple call. My way is suitable for repeating calls when we want to minimize performance impact to API/database and get result in reasonable time.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 16:20:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Workaround-How-to-list-all-user-created-application-sites/m-p/116962#M5814</guid>
      <dc:creator>Petr_Hantak</dc:creator>
      <dc:date>2021-04-26T16:20:50Z</dc:date>
    </item>
  </channel>
</rss>

