<?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: Script to delete all objects from a tag in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52314#M3400</link>
    <description>Agree on let's see the error. But I threw together a script that will search for a tag name and then generate a set remove on the object type.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/WadesWeaponShed/Globally-Remove-Object-Tags" target="_blank"&gt;https://github.com/WadesWeaponShed/Globally-Remove-Object-Tags&lt;/A&gt;</description>
    <pubDate>Wed, 01 May 2019 15:20:30 GMT</pubDate>
    <dc:creator>Adam_Forester</dc:creator>
    <dc:date>2019-05-01T15:20:30Z</dc:date>
    <item>
      <title>Script to delete a specific tag from all objects</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52131#M3390</link>
      <description>&lt;P&gt;Is there any sort of script in R80.10 to delete a specific tag out of all objects?&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 22:21:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52131#M3390</guid>
      <dc:creator>Christopher_Ric</dc:creator>
      <dc:date>2019-05-03T22:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52277#M3391</link>
      <description>Not sure anyone has created such a script.&lt;BR /&gt;You could iterate through the various object types and remove a specific tag from them, but I don’t believe it’s a single API call.</description>
      <pubDate>Tue, 30 Apr 2019 17:55:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52277#M3391</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-04-30T17:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52298#M3393</link>
      <description>&lt;P&gt;The calls that you need to do in order to achieve the described deletion are nearly the same for all kinds of objects. However, it won't be trivial as you'd still need to specify the object types that should get checked and deleted. If you, for example, just want to check rules, hosts, networks, services this could be done quiet easily. I'd recommend the official &lt;A href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk" target="_self"&gt;Check Point Python SDK&lt;/A&gt; package in order to do this as it contains lots of prewritten functions that help you even more. For example, there is one function ("&lt;SPAN class="pl-en"&gt;api_query&lt;/SPAN&gt;"), that automatically checks all existing objects if more than the default value matches. Therefore you would not need to care regarding the overall return sum etc.&lt;/P&gt;&lt;P&gt;If you are not familiar with python yet you can also take a look at the pre written scripts, that are also placed in the same repository and adjust them for your needs. As far as I remember the script documentation is quite nice, so that you should get the meaning behind each line at ease.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 08:28:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52298#M3393</guid>
      <dc:creator>Maik</dc:creator>
      <dc:date>2019-05-01T08:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52302#M3394</link>
      <description>&lt;P&gt;Hi Christopher,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What if you just delete the Tag itself?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tal&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 12:44:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52302#M3394</guid>
      <dc:creator>Tal_Paz-Fridman</dc:creator>
      <dc:date>2019-05-01T12:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52304#M3395</link>
      <description>&lt;P&gt;Oh **bleep**, seems like I misunderstood the question, I thought the objects that a specific tag is attached to should get deleted.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 13:16:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52304#M3395</guid>
      <dc:creator>Maik</dc:creator>
      <dc:date>2019-05-01T13:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52305#M3396</link>
      <description>&lt;P&gt;I get an error some weird error when trying to delete the tag.&amp;nbsp; Essentially I used smartmove in this scenario and it added a tag to every object I imported into management and I then want to eventually export this package via a python script, but you can't import objects with this python script if it has tags.&amp;nbsp; If there is a way to specify delete tag for other network groups, service groups and hosts, that would be great.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 13:47:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52305#M3396</guid>
      <dc:creator>Christopher_Ric</dc:creator>
      <dc:date>2019-05-01T13:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52306#M3397</link>
      <description>&lt;P&gt;Can you add a screenshot of the error? it sounds as something that we should look at to see if it's a bug.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Tal&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 13:56:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52306#M3397</guid>
      <dc:creator>Tal_Paz-Fridman</dc:creator>
      <dc:date>2019-05-01T13:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52307#M3398</link>
      <description>Can you post the error when you try to delete the tag?</description>
      <pubDate>Wed, 01 May 2019 14:03:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52307#M3398</guid>
      <dc:creator>Adam_Forester</dc:creator>
      <dc:date>2019-05-01T14:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52309#M3399</link>
      <description>&lt;P&gt;Looks like there is no way how to find which objects have a specific tag assigned (via CLI).&lt;BR /&gt;API commands "show tag" nor "show tags" with&amp;nbsp;&lt;SPAN&gt;details-level full are not helpful in this case.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;You can check it via SmartConsole -&amp;gt; Manage and Settings -&amp;gt;Tags -&amp;gt; right click on Tag -&amp;gt; Where Used...&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 14:31:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52309#M3399</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2019-05-01T14:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52314#M3400</link>
      <description>Agree on let's see the error. But I threw together a script that will search for a tag name and then generate a set remove on the object type.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/WadesWeaponShed/Globally-Remove-Object-Tags" target="_blank"&gt;https://github.com/WadesWeaponShed/Globally-Remove-Object-Tags&lt;/A&gt;</description>
      <pubDate>Wed, 01 May 2019 15:20:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52314#M3400</guid>
      <dc:creator>Adam_Forester</dc:creator>
      <dc:date>2019-05-01T15:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52321#M3401</link>
      <description>&lt;P&gt;Below is the error message I receive when attempting to delete the tag.&amp;nbsp; I'll attempt the script you provided and let you know the results.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 594px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/1044i78530C52EAC7C51B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 17:08:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52321#M3401</guid>
      <dc:creator>Christopher_Ric</dc:creator>
      <dc:date>2019-05-01T17:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52325#M3402</link>
      <description>A lot of times that will pop up because a change has been done to an object and then not published. May want to do a publish before attempting the delete tag, and check if your other admins have unpublished changes.</description>
      <pubDate>Wed, 01 May 2019 17:54:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52325#M3402</guid>
      <dc:creator>Adam_Forester</dc:creator>
      <dc:date>2019-05-01T17:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52326#M3403</link>
      <description>&lt;P&gt;There were no pending changes to publish and I'm the only admin of this particular environment.&amp;nbsp; In the process of running this provided script.&amp;nbsp; Unfortunately it looks like it runs a command for each object and then publishes it, so it's probably going to take a while, but better then having to double click every object manually.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 17:56:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52326#M3403</guid>
      <dc:creator>Christopher_Ric</dc:creator>
      <dc:date>2019-05-01T17:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52327#M3404</link>
      <description>Shoot my bad... I will fix that if you want to cancel out of it. Give me 5 min.</description>
      <pubDate>Wed, 01 May 2019 17:58:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52327#M3404</guid>
      <dc:creator>Adam_Forester</dc:creator>
      <dc:date>2019-05-01T17:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52328#M3405</link>
      <description>&lt;P&gt;Ok, thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 17:59:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52328#M3405</guid>
      <dc:creator>Christopher_Ric</dc:creator>
      <dc:date>2019-05-01T17:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script to delete all objects from a tag</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52330#M3406</link>
      <description>Done. I updated on GitHub. Will do it all within a single session now. Sorry about that...</description>
      <pubDate>Wed, 01 May 2019 18:06:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Script-to-delete-a-specific-tag-from-all-objects/m-p/52330#M3406</guid>
      <dc:creator>Adam_Forester</dc:creator>
      <dc:date>2019-05-01T18:06:45Z</dc:date>
    </item>
  </channel>
</rss>

