<?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 Is rule part of section? in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Is-rule-part-of-section/m-p/76135#M4430</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;As the Subject says, I would like to check if a specific rule is or is not part of the section.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/4556iE3E03F797E5EF65B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My goal is to check if rule number 3 is part of "access-section" or not.&lt;BR /&gt;I can check all sections and check "from" and "to" and compare it with specific rule. But is there any other solution for that ?&lt;/P&gt;
&lt;P&gt;The main purpose is that in case there is no rule included in section, I need to run API as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.rulebase[].uid&lt;/LI-CODE&gt;
&lt;P&gt;but in case rule is part of a section, then the API call must be modified as:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.rulebase[].rulebase[].uid&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/332"&gt;@Tomer_Sole&lt;/a&gt; and&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/210"&gt;@Nicolas_Boisse&lt;/a&gt;&amp;nbsp;provided some inspiration within &lt;A href="https://github.com/WadesWeaponShed/R80-Rulebase-Copy-and-Paste/blob/master/Rulebase_Paste.sh" target="_blank" rel="noopener"&gt;GitHub&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Feb 2020 23:17:59 GMT</pubDate>
    <dc:creator>JozkoMrkvicka</dc:creator>
    <dc:date>2020-02-23T23:17:59Z</dc:date>
    <item>
      <title>Is rule part of section?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Is-rule-part-of-section/m-p/76135#M4430</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;As the Subject says, I would like to check if a specific rule is or is not part of the section.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/4556iE3E03F797E5EF65B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My goal is to check if rule number 3 is part of "access-section" or not.&lt;BR /&gt;I can check all sections and check "from" and "to" and compare it with specific rule. But is there any other solution for that ?&lt;/P&gt;
&lt;P&gt;The main purpose is that in case there is no rule included in section, I need to run API as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.rulebase[].uid&lt;/LI-CODE&gt;
&lt;P&gt;but in case rule is part of a section, then the API call must be modified as:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.rulebase[].rulebase[].uid&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/332"&gt;@Tomer_Sole&lt;/a&gt; and&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/210"&gt;@Nicolas_Boisse&lt;/a&gt;&amp;nbsp;provided some inspiration within &lt;A href="https://github.com/WadesWeaponShed/R80-Rulebase-Copy-and-Paste/blob/master/Rulebase_Paste.sh" target="_blank" rel="noopener"&gt;GitHub&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2020 23:17:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Is-rule-part-of-section/m-p/76135#M4430</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2020-02-23T23:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is rule part of section?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Is-rule-part-of-section/m-p/76138#M4432</link>
      <description>&lt;P&gt;This looks like jq versus just API calls. Which means we probably need to see the full CLI used (mgmt_cli with pipe to jq).&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 01:07:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Is-rule-part-of-section/m-p/76138#M4432</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-02-24T01:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Is rule part of section?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Is-rule-part-of-section/m-p/76150#M4433</link>
      <description>&lt;P&gt;Indeed, there is a different handling at the API structure for rules that appear inside a section title, and a different handling for a case where the beginning of the rule set consists of rules with no section title.&lt;/P&gt;
&lt;P&gt;But if your purpose is to check whether a rule is a part of a section, you can probably ignore that 2nd case (rules at the beginning of the rule set with no section title).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure if it's relevant but Multi-Domain layers and inline layers also have a bit of a different structure to handle.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/1249"&gt;@Dima_M&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/37502"&gt;@Omer_Kleinstern&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 06:07:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Is-rule-part-of-section/m-p/76150#M4433</guid>
      <dc:creator>Tomer_Sole</dc:creator>
      <dc:date>2020-02-24T06:07:38Z</dc:date>
    </item>
  </channel>
</rss>

