<?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: scripting deleting a host object using python in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/scripting-deleting-a-host-object-using-python/m-p/176288#M7576</link>
    <description>&lt;P&gt;What are the exact API calls being made?&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 12:47:23 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2023-03-27T12:47:23Z</dc:date>
    <item>
      <title>scripting deleting a host object using python</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/scripting-deleting-a-host-object-using-python/m-p/175858#M7571</link>
      <description>&lt;P&gt;I wrote my python script using python3 to script the deletion process of a host object. The &lt;SPAN&gt;error is related to a missing key 'uid' in the rule dictionary of my code. I tried to print my rule but it looks like it is not pulling the uid of the host object but it is pulling uid of the rule and others. how can I correct this so it can also pull the uid for the host object. I will attach the code but also post the error. FYI I am using jupyter notebook as my dev environment.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"Error: Key 'uid' is missing in rule dictionary: {'rule': {'uid': '09bf0dea-5d3c-429d-890f-4bf9b5eb99b5', 'name': 'testaccess', 'type': 'access-rule', 'domain': {'uid': '41e821a0-3720-11e3-aa6e-0800200c9fde', 'name': 'SMC User', 'domain-type': 'domain'}}, 'rule-columns': ['source'], 'position': '13', 'layer': {'uid': 'e062bc425-1f8b-4487-a64f-661f85084a6d', 'name': 'Pennsylvania Security', 'type': 'access-layer', 'domain': {'uid': '41e1821a0-3720-11e3-a1a6e-0800200c9fde', 'name': 'SMC User', 'domain-type': 'domain'}}, 'layer-position': 1, 'package': {'uid': '93b650bc-8b28-4587-8641-73f225d7e3c8c', 'name': 'Pennsylvania', 'type': 'package', 'domain': {'uid': '41e821a0-3720-11e3-aa6e-08010200c9fde', 'name': 'SMC User', 'domain-type': 'domain'}}}" Error: 'object'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am on R840&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 05:47:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/scripting-deleting-a-host-object-using-python/m-p/175858#M7571</guid>
      <dc:creator>scripting_guru</dc:creator>
      <dc:date>2023-03-23T05:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: scripting deleting a host object using python</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/scripting-deleting-a-host-object-using-python/m-p/176288#M7576</link>
      <description>&lt;P&gt;What are the exact API calls being made?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 12:47:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/scripting-deleting-a-host-object-using-python/m-p/176288#M7576</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-03-27T12:47:23Z</dc:date>
    </item>
  </channel>
</rss>

