<?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 Adding access rule in security management server through web API (R80.10) - Not multi domain server in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-access-rule-in-security-management-server-through-web-API/m-p/83715#M4799</link>
    <description>&lt;P&gt;I am using python management SDK 1.1.0 for automation. and doing api_calls&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I logged in successfully&amp;nbsp; (with username and password only)&lt;/LI&gt;&lt;LI&gt;added host with ip address&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;when I try to add access rule it showing me error as "Requested object [Network] not found".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here is code -&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def add_access_rule(self, rule_name, action, host_name):
        payload = {'layer': 'Network', 'position': 'top',
                   'name': rule_name, 'action': action, 'source': host_name}
        add_rule_response = self._api_client.api_call('add-access-rule', payload)
        if add_rule_response.success:
            print("The rule: '{}' has been added successfully".format(rule_name))
            self.publish()
        else:
            print("Failed to add the access-rule: '{}', Error:\n{}".format(rule_name,                                                                    add_rule_response.error_message))&lt;/LI-CODE&gt;&lt;P&gt;I am providing ip-address as host_name which is added in step 2&lt;/P&gt;&lt;P&gt;What am I missing? Please help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Apr 2020 10:17:35 GMT</pubDate>
    <dc:creator>appyens</dc:creator>
    <dc:date>2020-04-30T10:17:35Z</dc:date>
    <item>
      <title>Adding access rule in security management server through web API (R80.10) - Not multi domain server</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-access-rule-in-security-management-server-through-web-API/m-p/83715#M4799</link>
      <description>&lt;P&gt;I am using python management SDK 1.1.0 for automation. and doing api_calls&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I logged in successfully&amp;nbsp; (with username and password only)&lt;/LI&gt;&lt;LI&gt;added host with ip address&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;when I try to add access rule it showing me error as "Requested object [Network] not found".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here is code -&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def add_access_rule(self, rule_name, action, host_name):
        payload = {'layer': 'Network', 'position': 'top',
                   'name': rule_name, 'action': action, 'source': host_name}
        add_rule_response = self._api_client.api_call('add-access-rule', payload)
        if add_rule_response.success:
            print("The rule: '{}' has been added successfully".format(rule_name))
            self.publish()
        else:
            print("Failed to add the access-rule: '{}', Error:\n{}".format(rule_name,                                                                    add_rule_response.error_message))&lt;/LI-CODE&gt;&lt;P&gt;I am providing ip-address as host_name which is added in step 2&lt;/P&gt;&lt;P&gt;What am I missing? Please help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 10:17:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-access-rule-in-security-management-server-through-web-API/m-p/83715#M4799</guid>
      <dc:creator>appyens</dc:creator>
      <dc:date>2020-04-30T10:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding access rule in security management server through web API (R80.10) - Not multi domain ser</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-access-rule-in-security-management-server-through-web-API/m-p/83718#M4801</link>
      <description>&lt;P&gt;Network in your example refers to the Policy layer you are trying to create the rule in.&lt;/P&gt;&lt;P&gt;The default layer is called Network, but its usually prefixed by the policy name.&lt;/P&gt;&lt;P&gt;The easiest way to check, is to open "Manage policies and layers (ctrl-o)" in SmartConsole and check the name under the Layers tab. (Uncheck "show only shared layers" if its empty.)&lt;/P&gt;&lt;P&gt;/Sig&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 11:20:58 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-access-rule-in-security-management-server-through-web-API/m-p/83718#M4801</guid>
      <dc:creator>Sigbjorn</dc:creator>
      <dc:date>2020-04-30T11:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding access rule in security management server through web API (R80.10) - Not multi domain ser</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-access-rule-in-security-management-server-through-web-API/m-p/84025#M4813</link>
      <description>&lt;P&gt;Is there any way I can get the layer name through API. I don't have access to the Interface and cannot use CLI. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 11:03:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-access-rule-in-security-management-server-through-web-API/m-p/84025#M4813</guid>
      <dc:creator>appyens</dc:creator>
      <dc:date>2020-05-04T11:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding access rule in security management server through web API (R80.10) - Not multi domain ser</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-access-rule-in-security-management-server-through-web-API/m-p/84800#M4847</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use 'show-packages' to get the policy package names, then 'show-package name &amp;lt;insert name&amp;gt;' to get details including the access-layer names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/show-packages~v1.6%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/show-packages~v1.6%20&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/show-package~v1.6%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/show-package~v1.6%20&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 07:24:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-access-rule-in-security-management-server-through-web-API/m-p/84800#M4847</guid>
      <dc:creator>Sigbjorn</dc:creator>
      <dc:date>2020-05-11T07:24:14Z</dc:date>
    </item>
  </channel>
</rss>

