<?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: where-used and replace question in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162660#M7304</link>
    <description>&lt;P&gt;Like I said earlier, check out xargs. I don't know what your uid.json file contains, but if it's just a list of UUIDs, one per line, you could use it like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;xargs &amp;lt;uid.json -L 1 mgmt_cli -r true where-used uid&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 21 Nov 2022 15:29:54 GMT</pubDate>
    <dc:creator>Bob_Zimmerman</dc:creator>
    <dc:date>2022-11-21T15:29:54Z</dc:date>
    <item>
      <title>where-used and replace question</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162434#M7299</link>
      <description>&lt;P&gt;As Subject&lt;/P&gt;&lt;P&gt;where-used question&lt;/P&gt;&lt;P&gt;I had collected all the objects uid with a json file and run a command, the result show as below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11111.jpg" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/18459i10D1FDAA90B5AE37/image-size/large?v=v2&amp;amp;px=999" role="button" title="11111.jpg" alt="11111.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is it possible execute each line (uid) of the file ?&lt;/P&gt;&lt;P&gt;then replace question&lt;/P&gt;&lt;P&gt;I know a method to replace the object to None (remove item) then delete it manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;object right click &amp;gt; where_used &amp;gt; press "replace" &amp;gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;drop_down_menu select "None(remove item)" &amp;gt; then select objects or policy item&lt;/P&gt;&lt;P&gt;Is there a api command to do this ?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 08:53:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162434#M7299</guid>
      <dc:creator>vavava</dc:creator>
      <dc:date>2022-11-18T08:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: where-used and replace question</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162473#M7300</link>
      <description>&lt;P&gt;Each call to where-used only accepts one UUID. Check out xargs. It can ingest a stream of many lines or fields, carve them up into a series of grouped fields, then run a command separately for each group.&lt;/P&gt;
&lt;P&gt;As for the replacement, I don't know of an API command to do that in one call.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 18:42:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162473#M7300</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-11-18T18:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: where-used and replace question</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162487#M7301</link>
      <description>&lt;P&gt;I believe “none” is merely a specific object reference.&lt;BR /&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/37502"&gt;@Omer_Kleinstern&lt;/a&gt;&amp;nbsp;would know for sure.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 19:49:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162487#M7301</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-11-18T19:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: where-used and replace question</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162495#M7302</link>
      <description>&lt;P&gt;Yes, "None" is just a special object with the UUID&amp;nbsp;&lt;SPAN&gt;97aeb36a-9aea-11d5-bd16-0090272ccb30 and the type "&lt;/SPAN&gt;&lt;SPAN&gt;CpmiAnyObject". It's like "Any" (&lt;/SPAN&gt;&lt;SPAN&gt;97aeb369-9aea-11d5-bd16-0090272ccb30). Their UUIDs only differ in the 8th digit.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 20:13:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162495#M7302</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-11-18T20:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: where-used and replace question</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162621#M7303</link>
      <description>&lt;P&gt;That means it is impossible to replace the objects via api comments.&lt;/P&gt;&lt;P&gt;I also tried the "where-used",&amp;nbsp; it can read each line, but still not work. the command not found.&lt;/P&gt;&lt;P&gt;Any suggestion &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11113.jpg" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/18484i885CAC96C3D91AED/image-size/large?v=v2&amp;amp;px=999" role="button" title="11113.jpg" alt="11113.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 09:25:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162621#M7303</guid>
      <dc:creator>vavava</dc:creator>
      <dc:date>2022-11-21T09:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: where-used and replace question</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162660#M7304</link>
      <description>&lt;P&gt;Like I said earlier, check out xargs. I don't know what your uid.json file contains, but if it's just a list of UUIDs, one per line, you could use it like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;xargs &amp;lt;uid.json -L 1 mgmt_cli -r true where-used uid&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Nov 2022 15:29:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162660#M7304</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-11-21T15:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: where-used and replace question</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162699#M7305</link>
      <description>&lt;P&gt;What you're asking is fairly basic scripting.&lt;BR /&gt;Here's how to do this while minimizing the number of sessions created:&lt;/P&gt;
&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;mgmt_cli -r true login &amp;gt; sid.txt&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;cat uid.json | while read X; do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; mgmt_cli -s sid.txt where-used uid $X&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;done&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;mgmt_cli -s sid.txt logout&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Perhaps xargs can do this a bit more cleanly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 21:15:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/where-used-and-replace-question/m-p/162699#M7305</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-11-21T21:15:07Z</dc:date>
    </item>
  </channel>
</rss>

