<?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: Failed add-access-rule (very weird) in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Failed-add-access-rule-very-weird/m-p/206423#M8349</link>
    <description>&lt;P&gt;I thought I knew the reason, but I still got the discard.&amp;nbsp; Not often, just at times.&lt;/P&gt;&lt;P&gt;I don't believe there were locked objects, yet I still got the below error.&amp;nbsp; If you have any thought, can you please share?&amp;nbsp; It's frustrating to be honest, for something that is not replicated.&lt;/P&gt;&lt;P&gt;Is there a way to check if an object is locked, so that our app can wait for it to be unlocked first before making the&amp;nbsp;&lt;SPAN&gt;add-access-rule api call?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Network access create Failed 400 Client Error: Bad Request for url: &lt;A href="https://olanpn-mdsm00.xyz.com/web_api/discard" target="_blank" rel="noopener"&gt;https://olanpn-mdsm00.xyz.com/web_api/discard&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks much in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Feb 2024 14:29:13 GMT</pubDate>
    <dc:creator>pdn</dc:creator>
    <dc:date>2024-02-19T14:29:13Z</dc:date>
    <item>
      <title>Failed add-access-rule (very weird)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Failed-add-access-rule-very-weird/m-p/197933#M8192</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure this out so weird.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, my python make a POST REST API add-access-rule call to the checkpoint mgmt server, for tcp port 300 (service), and it works fine (ie, I can see the rules published onto the FW).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I made another POST call, same exact source/destination, but a different port, and it fails with the&amp;nbsp;RuntimeError error (below).&amp;nbsp; Please see the body with parameters sent with the POST call.&amp;nbsp; I verified the parameters settings like the access layer, position, source/destination ID's, against the FW, all are good, like with the tcp port 300 request.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am using R81.10, which is&amp;nbsp;&lt;SPAN&gt;Management API Version&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;v1.8.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Appreciate any prompt feedbacks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RuntimeError: 400 Client Error: Bad Request for url: &lt;A href="https://xyx.com/web_api/add-access-rule" target="_blank" rel="noopener"&gt;https://xyx.com/web_api/add-access-rule&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#web/add-access-rule~v1.8.1%20" target="_blank" rel="noopener"&gt;https://sc1.checkpoint.com/documents/latest/APIs/#web/add-access-rule~v1.8.1%20&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 17:35:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Failed-add-access-rule-very-weird/m-p/197933#M8192</guid>
      <dc:creator>pdn</dc:creator>
      <dc:date>2023-11-14T17:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Failed add-access-rule (very weird)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Failed-add-access-rule-very-weird/m-p/197942#M8193</link>
      <description>&lt;P&gt;I got it!&amp;nbsp; One of the API sessions locked some objects.&amp;nbsp; After disconnecting and discard that session, it works!!!&lt;/P&gt;&lt;P&gt;I hope it helps people with similar issue.&amp;nbsp; Stupid thing, it costed me some good troubleshooting hours since yesterday.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 18:32:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Failed-add-access-rule-very-weird/m-p/197942#M8193</guid>
      <dc:creator>pdn</dc:creator>
      <dc:date>2023-11-14T18:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Failed add-access-rule (very weird)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Failed-add-access-rule-very-weird/m-p/206423#M8349</link>
      <description>&lt;P&gt;I thought I knew the reason, but I still got the discard.&amp;nbsp; Not often, just at times.&lt;/P&gt;&lt;P&gt;I don't believe there were locked objects, yet I still got the below error.&amp;nbsp; If you have any thought, can you please share?&amp;nbsp; It's frustrating to be honest, for something that is not replicated.&lt;/P&gt;&lt;P&gt;Is there a way to check if an object is locked, so that our app can wait for it to be unlocked first before making the&amp;nbsp;&lt;SPAN&gt;add-access-rule api call?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Network access create Failed 400 Client Error: Bad Request for url: &lt;A href="https://olanpn-mdsm00.xyz.com/web_api/discard" target="_blank" rel="noopener"&gt;https://olanpn-mdsm00.xyz.com/web_api/discard&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks much in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 14:29:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Failed-add-access-rule-very-weird/m-p/206423#M8349</guid>
      <dc:creator>pdn</dc:creator>
      <dc:date>2024-02-19T14:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Failed add-access-rule (very weird)</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Failed-add-access-rule-very-weird/m-p/206430#M8350</link>
      <description>&lt;P&gt;I just rebooted my test lab mgmt server and worked fine.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 15:16:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Failed-add-access-rule-very-weird/m-p/206430#M8350</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2024-02-19T15:16:43Z</dc:date>
    </item>
  </channel>
</rss>

