<?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 find duplicate host and network and service objects in Checkpoint SMC and delete if not used in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197056#M8156</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like help to&amp;nbsp;find duplicate host and network and service objects in Checkpoint SMC and delete if not used. how can we achieve that using API?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
    <pubDate>Fri, 03 Nov 2023 16:46:42 GMT</pubDate>
    <dc:creator>knassif</dc:creator>
    <dc:date>2023-11-03T16:46:42Z</dc:date>
    <item>
      <title>find duplicate host and network and service objects in Checkpoint SMC and delete if not used</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197056#M8156</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like help to&amp;nbsp;find duplicate host and network and service objects in Checkpoint SMC and delete if not used. how can we achieve that using API?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 16:46:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197056#M8156</guid>
      <dc:creator>knassif</dc:creator>
      <dc:date>2023-11-03T16:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: find duplicate host and network and service objects in Checkpoint SMC and delete if not used</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197072#M8158</link>
      <description>&lt;P&gt;You'd have to pull the entire object database (by type) and find the duplicates manually.&lt;BR /&gt;You can use the 'where-used' API to ensure nothing is using that object before deletion:&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/where-used~v1.9%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/where-used~v1.9%20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 19:23:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197072#M8158</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-11-03T19:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: find duplicate host and network and service objects in Checkpoint SMC and delete if not used</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197075#M8159</link>
      <description>&lt;P&gt;is there a script available that does already that? how do I pull the database with api? we would need to do a duplicate check first how to achive that in api? then we do the where used I think?thx&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 19:32:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197075#M8159</guid>
      <dc:creator>knassif</dc:creator>
      <dc:date>2023-11-03T19:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: find duplicate host and network and service objects in Checkpoint SMC and delete if not used</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197256#M8171</link>
      <description>&lt;P&gt;I haven't seen a script that does that.&lt;BR /&gt;You'd have to pull the different object types, such as:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Hosts:&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-hosts~v1.9%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-hosts~v1.9%20&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Networks:&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-networks~v1.9%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-networks~v1.9%20&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Note that these endpoints will return a limited number of results.&lt;BR /&gt;You may need to iterate with the offset parameter to capture all the results.&lt;/P&gt;
&lt;P&gt;Your script would have to figure out which of the objects are duplicates according to your logic.&lt;BR /&gt;You'd also have to call where-used for each object to see what results are returned.&lt;/P&gt;
&lt;P&gt;Bottom line: this will require some development work.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 23:24:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197256#M8171</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-11-06T23:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: find duplicate host and network and service objects in Checkpoint SMC and delete if not used</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197295#M8176</link>
      <description>&lt;P&gt;Assuming that the use-case is to "tidy" your environment from unused objects, you can use the Object Explorer in the SmartConsole application. Pop out the full dialog via the toolbar button, then select "Unused Objects" in the top left filter.&lt;/P&gt;
&lt;P&gt;This will show all unused objects (it's similar to going through every object and doing "Where Used"). You can verify each one and delete them. It will show both duplicates or unique objects that aren't in use, but you probably want to clean up both types.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ObjectExplorer Pane.png" style="width: 256px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/23083i78493B66830AB485/image-size/large?v=v2&amp;amp;px=999" role="button" title="ObjectExplorer Pane.png" alt="ObjectExplorer Pane.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ObjectExplorer Unused Objects.png" style="width: 931px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/23084i0FCFF071B69A2BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="ObjectExplorer Unused Objects.png" alt="ObjectExplorer Unused Objects.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 10:57:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/find-duplicate-host-and-network-and-service-objects-in/m-p/197295#M8176</guid>
      <dc:creator>Tomer_Noy</dc:creator>
      <dc:date>2023-11-07T10:57:51Z</dc:date>
    </item>
  </channel>
</rss>

