<?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: Web API - setting track level in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65092#M4027</link>
    <description>try to use "track.accounting true"</description>
    <pubDate>Wed, 16 Oct 2019 11:36:27 GMT</pubDate>
    <dc:creator>Maarten_Sjouw</dc:creator>
    <dc:date>2019-10-16T11:36:27Z</dc:date>
    <item>
      <title>Web API - setting track level</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65090#M4026</link>
      <description>&lt;P&gt;Hi CheckMates,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Encountered an issue with Management API while creating a rule via Web API.&lt;/P&gt;
&lt;P&gt;Trying to set track level according to&amp;nbsp;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/set-access-rule~v1.5%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/set-access-rule~v1.5%20&lt;/A&gt;&amp;nbsp; &amp;nbsp;, track field is able to receive "log"&amp;nbsp; (even though it seems not to be documented).&lt;/P&gt;
&lt;P&gt;However, it automatically switches on "Accounting" log feature as well.&lt;/P&gt;
&lt;P&gt;Trying to adjust the accounting setting results in an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts how it can be resolved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sent payload that creates a rule with logging enabled plus accounting:&lt;/P&gt;
&lt;PRE&gt;payload_For_API = {&lt;BR /&gt;        &lt;SPAN&gt;"layer"&lt;/SPAN&gt;: &lt;SPAN&gt;"Network"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;"position"&lt;/SPAN&gt;: &lt;SPAN&gt;"top"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;"name"&lt;/SPAN&gt;: &lt;SPAN&gt;"API 1"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;"action"&lt;/SPAN&gt;: &lt;SPAN&gt;"Accept"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;"destination"&lt;/SPAN&gt;: &lt;SPAN&gt;"hst_dst_1.10.1.100"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;"service"&lt;/SPAN&gt;: &lt;SPAN&gt;"Kubernetes1"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;"enabled"&lt;/SPAN&gt;: &lt;SPAN&gt;True&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;"source"&lt;/SPAN&gt;: &lt;SPAN&gt;"Any"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;"track"&lt;/SPAN&gt;: &lt;SPAN&gt;"log"&lt;BR /&gt;&lt;/SPAN&gt;}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Trying to use track.type (as in&amp;nbsp;&lt;A href="https://community.checkpoint.com/t5/Policy-Management/change-to-Track-setting-in-policy/m-p/47958#M2929" target="_blank"&gt;https://community.checkpoint.com/t5/Policy-Management/change-to-Track-setting-in-policy/m-p/47958#M2929&lt;/A&gt;) results in&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{'code': 'generic_err_invalid_parameter_name', 'message': 'Unrecognized parameter [track.type]'}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Trying to configure track using additional fields:&lt;/P&gt;
&lt;P&gt;{'code': 'generic_err_invalid_parameter', 'message': 'Invalid parameter for [track]. The invalid value [ "accounting" : False }] should be replaced by one of the following values: [none, log, extended log, detailed log]'}&lt;/P&gt;
&lt;P&gt;or:&lt;/P&gt;
&lt;P&gt;{'code': 'generic_err_invalid_parameter', 'message': 'Invalid parameter for [track]. The invalid value [ "log" , {"accounting" : False }] should be replaced by one of the following values: [none, log, extended log, detailed log]'}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vlad Tonne&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 11:26:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65090#M4026</guid>
      <dc:creator>Vlad_Tonne</dc:creator>
      <dc:date>2019-10-16T11:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Web API - setting track level</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65092#M4027</link>
      <description>try to use "track.accounting true"</description>
      <pubDate>Wed, 16 Oct 2019 11:36:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65092#M4027</guid>
      <dc:creator>Maarten_Sjouw</dc:creator>
      <dc:date>2019-10-16T11:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Web API - setting track level</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65094#M4028</link>
      <description>&lt;P&gt;As Maarten mentioned "&lt;SPAN&gt;track.accounting true&lt;/SPAN&gt;" should work fine.&lt;/P&gt;&lt;P&gt;The documentation mentions that accounting only accepts boolean values; meaning true or false.&lt;/P&gt;&lt;P&gt;The "type" option can only be used with&amp;nbsp;"Log", "Extended Log", "Detailed Log" or "None".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Unbenannt.PNG" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/2753i0BCF41F6E6D22E33/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt.PNG" alt="Unbenannt.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 11:40:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65094#M4028</guid>
      <dc:creator>Maik</dc:creator>
      <dc:date>2019-10-16T11:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Web API - setting track level</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65097#M4029</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Usage of "track.accounting" results in error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;"track"&lt;/SPAN&gt;: &lt;SPAN&gt;"log"&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN&gt;"track.accounting"&lt;/SPAN&gt;: &lt;SPAN&gt;False&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;{'layer': 'Network', 'position': 'top', 'name': 'API 1', 'action': 'Accept', 'destination': 'hst_dst_1.10.1.100', 'service': 'Kubernetes1', 'enabled': True, 'source': 'Any', 'track': 'log', 'track.accounting': False}&lt;/P&gt;
&lt;P&gt;{'code': 'generic_err_invalid_parameter_name', 'message': 'Unrecognized parameter [track.accounting]'}&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Vlad Tonne.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 12:14:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65097#M4029</guid>
      <dc:creator>Vlad_Tonne</dc:creator>
      <dc:date>2019-10-16T12:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Web API - setting track level</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65099#M4030</link>
      <description>&lt;P&gt;Works via management cli:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"add access-rule name 'Test' layer Network position bottom track.accounting true"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My guess is that you cant use both statements with one task:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;"track"&lt;/SPAN&gt;: &lt;SPAN&gt;"log"&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN&gt;"track.accounting"&lt;/SPAN&gt;: &lt;SPAN&gt;False&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try to create the rule with track log first and afterwards use the set access rule command and enable account via&amp;nbsp;&lt;SPAN&gt;"track.accounting"&lt;/SPAN&gt;: &lt;SPAN&gt;True.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 12:25:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65099#M4030</guid>
      <dc:creator>Maik</dc:creator>
      <dc:date>2019-10-16T12:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Web API - setting track level</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65106#M4031</link>
      <description>Already tried that. &lt;BR /&gt;Still same issue when doing the setting via Web API.&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;Vlad</description>
      <pubDate>Wed, 16 Oct 2019 12:46:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65106#M4031</guid>
      <dc:creator>Vlad_Tonne</dc:creator>
      <dc:date>2019-10-16T12:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Web API - setting track level</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65118#M4032</link>
      <description>&lt;P&gt;Maybe &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/186"&gt;@Amiad_Stern&lt;/a&gt;&amp;nbsp;can help.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 14:11:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65118#M4032</guid>
      <dc:creator>Maik</dc:creator>
      <dc:date>2019-10-16T14:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Web API - setting track level</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65158#M4033</link>
      <description>&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/5365"&gt;@Vlad_Tonne&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/23736"&gt;@Maik&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Which version are we talking about?&lt;/P&gt;
&lt;P&gt;Here are commands that worked for me on R80.30.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;mgmt_cli:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;mgmt_cli add access-rule layer "Network" position 1 name "Rule 1" track.type "Log" track.accounting true&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Web Services:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&lt;BR /&gt;"name": "amiad rule1",&lt;BR /&gt;"position" : 1,&lt;BR /&gt;"track": {&lt;BR /&gt;"accounting": true,&lt;BR /&gt;"type": "Log"&lt;BR /&gt;},&lt;BR /&gt;"layer": "Network"&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 07:01:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65158#M4033</guid>
      <dc:creator>Amiad_Stern</dc:creator>
      <dc:date>2019-10-17T07:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Web API - setting track level</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65165#M4034</link>
      <description>Rule creation worked without accounting, upon setting:&lt;BR /&gt;    payload_For_API =  {&lt;BR /&gt;"name": "amiad rule1",&lt;BR /&gt;"position" : 1,&lt;BR /&gt;"track": {&lt;BR /&gt;"accounting": False,&lt;BR /&gt;"type": "Log"&lt;BR /&gt;},&lt;BR /&gt;"layer": "Network"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;It might be worthwhile to add in API documentation "required" for "type" when additional flags like "accounting" are to be used.  &lt;BR /&gt;&lt;BR /&gt;Thanks, &lt;BR /&gt;Vlad</description>
      <pubDate>Thu, 17 Oct 2019 07:53:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-setting-track-level/m-p/65165#M4034</guid>
      <dc:creator>Vlad_Tonne</dc:creator>
      <dc:date>2019-10-17T07:53:09Z</dc:date>
    </item>
  </channel>
</rss>

