<?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 rest  is not always working ... in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8589#M698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the code i use&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$curl = curl_init();&lt;BR /&gt; $url = $this-&amp;gt;checkPointMgmntServer.$Name;&lt;BR /&gt; showMsg('running function: ',$Name,'');&lt;BR /&gt; showMsg('running json: ',$json,'');&lt;BR /&gt; #echo $this-&amp;gt;cpSid;&lt;BR /&gt; $ch = curl_init(); // initialize curl handle &lt;BR /&gt; curl_setopt($ch, CURLOPT_URL,$url); // set url to post to &lt;BR /&gt; curl_setopt($ch, CURLOPT_USERPWD, "abc:password");&lt;BR /&gt; curl_setopt($ch, CURLOPT_FAILONERROR, 1); &lt;BR /&gt; curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects &lt;BR /&gt; curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable &lt;BR /&gt; curl_setopt($ch, CURLOPT_TIMEOUT, 10); // times out after 4s &lt;BR /&gt; curl_setopt($ch, CURLOPT_POST, 0); // set POST method &lt;BR /&gt; curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);&lt;BR /&gt; # curl_setopt($ch, CURLOPT_SSL_VERIFYSTATUS , FALSE);&lt;BR /&gt; curl_setopt($ch, CURLOPT_HTTPHEADER, array(&lt;BR /&gt; 'Content-Type: application/json',&lt;BR /&gt; 'Accept: application/json',&lt;BR /&gt; 'x-chkp-sid: '.$this-&amp;gt;cpSid&lt;BR /&gt; &lt;BR /&gt; ));&lt;BR /&gt; &lt;BR /&gt; curl_setopt($ch, CURLOPT_POSTFIELDS, $json); // add POST fields &lt;BR /&gt; //curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json;"));&lt;BR /&gt; try {&lt;BR /&gt; $result = curl_exec($ch);&lt;BR /&gt; }&lt;BR /&gt; catch(Exception $e)&lt;BR /&gt; {&lt;BR /&gt; print_r($e);&lt;BR /&gt; }&lt;BR /&gt; $trimed = json_decode($result, true); &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; return $result ; &lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Nov 2018 04:32:36 GMT</pubDate>
    <dc:creator>yossi_Gross</dc:creator>
    <dc:date>2018-11-25T04:32:36Z</dc:date>
    <item>
      <title>web api rest  is not always working ...</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8588#M697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i use the rest web api using php&amp;nbsp;&lt;/P&gt;&lt;P&gt;mostly when i am using the add access rule , the action does not succeed&amp;nbsp;&lt;/P&gt;&lt;P&gt;i just need to refresh the page few times , sometimes 5 times the action complete successfully&lt;/P&gt;&lt;P&gt;can someone help with the reason for that ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2018 04:29:56 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8588#M697</guid>
      <dc:creator>yossi_Gross</dc:creator>
      <dc:date>2018-11-25T04:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: web api rest  is not always working ...</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8589#M698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the code i use&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$curl = curl_init();&lt;BR /&gt; $url = $this-&amp;gt;checkPointMgmntServer.$Name;&lt;BR /&gt; showMsg('running function: ',$Name,'');&lt;BR /&gt; showMsg('running json: ',$json,'');&lt;BR /&gt; #echo $this-&amp;gt;cpSid;&lt;BR /&gt; $ch = curl_init(); // initialize curl handle &lt;BR /&gt; curl_setopt($ch, CURLOPT_URL,$url); // set url to post to &lt;BR /&gt; curl_setopt($ch, CURLOPT_USERPWD, "abc:password");&lt;BR /&gt; curl_setopt($ch, CURLOPT_FAILONERROR, 1); &lt;BR /&gt; curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects &lt;BR /&gt; curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable &lt;BR /&gt; curl_setopt($ch, CURLOPT_TIMEOUT, 10); // times out after 4s &lt;BR /&gt; curl_setopt($ch, CURLOPT_POST, 0); // set POST method &lt;BR /&gt; curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);&lt;BR /&gt; # curl_setopt($ch, CURLOPT_SSL_VERIFYSTATUS , FALSE);&lt;BR /&gt; curl_setopt($ch, CURLOPT_HTTPHEADER, array(&lt;BR /&gt; 'Content-Type: application/json',&lt;BR /&gt; 'Accept: application/json',&lt;BR /&gt; 'x-chkp-sid: '.$this-&amp;gt;cpSid&lt;BR /&gt; &lt;BR /&gt; ));&lt;BR /&gt; &lt;BR /&gt; curl_setopt($ch, CURLOPT_POSTFIELDS, $json); // add POST fields &lt;BR /&gt; //curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json;"));&lt;BR /&gt; try {&lt;BR /&gt; $result = curl_exec($ch);&lt;BR /&gt; }&lt;BR /&gt; catch(Exception $e)&lt;BR /&gt; {&lt;BR /&gt; print_r($e);&lt;BR /&gt; }&lt;BR /&gt; $trimed = json_decode($result, true); &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; return $result ; &lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2018 04:32:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8589#M698</guid>
      <dc:creator>yossi_Gross</dc:creator>
      <dc:date>2018-11-25T04:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: web api rest  is not always working ...</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8590#M699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On what hardware (CPU type, number of cores, RAM) is the R80.x Management running on?&lt;/P&gt;&lt;P&gt;Also, what exact version of code?&lt;/P&gt;&lt;P&gt;Also, what API call exactly are you making with this code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2018 05:14:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8590#M699</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-11-25T05:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: web api rest  is not always working ...</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8591#M700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the machine is a vm&amp;nbsp; and all functions working but the&amp;nbsp;&lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;add access rule&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;that succeed only once in 5 to 10 refresh of same code&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2018 06:21:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8591#M700</guid>
      <dc:creator>yossi_Gross</dc:creator>
      <dc:date>2018-11-25T06:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: web api rest  is not always working ...</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8592#M701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just to clarify&amp;nbsp;&lt;/P&gt;&lt;P&gt;i use same function to do a lot of action like adding time object adding host etc&amp;nbsp;&lt;/P&gt;&lt;P&gt;on all of them it runs on first time smoothly&amp;nbsp;&lt;/P&gt;&lt;P&gt;only when i am runnig the add access rule it fails and after some trials it is at the end succeed&amp;nbsp;&lt;/P&gt;&lt;P&gt;that means the json i am passing to function is ok....&lt;/P&gt;&lt;P&gt;but still somthing causing it to fail&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2018 07:31:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8592#M701</guid>
      <dc:creator>yossi_Gross</dc:creator>
      <dc:date>2018-11-25T07:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: web api rest  is not always working ...</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8593#M702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This could easily be the result of an underpowered management server, which is why I asked the questions I did.&lt;/P&gt;&lt;P&gt;Please review my questions again and provide answers.&lt;/P&gt;&lt;P&gt;In the case of a VM, please tell me what ram/CPU has been allocated to it,&lt;/P&gt;&lt;P&gt;You also set the timeout really low (10 seconds)—you might try a higher timeout.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2018 17:13:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8593#M702</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-11-25T17:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: web api rest  is not always working ...</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8594#M703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vm with 24 gig memory 12 cpu cores i changed the 10 seconds to 120 sec&amp;nbsp;&lt;/P&gt;&lt;P&gt;no special results&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your response&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2018 20:17:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8594#M703</guid>
      <dc:creator>yossi_Gross</dc:creator>
      <dc:date>2018-11-25T20:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: web api rest  is not always working ...</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8595#M704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure you run latest jumbo fix on your management, at least higher than 142 as there have been multiple fixes for API. Also for larger rule and objects bases switch API java to 64 bit and increase default memory heap&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.checkpoint.com/thread/9495-api-dying-on-mds-take-142-every-few-days" target="_blank"&gt;https://community.checkpoint.com/thread/9495-api-dying-on-mds-take-142-every-few-days&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2019 09:00:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/web-api-rest-is-not-always-working/m-p/8595#M704</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2019-06-21T09:00:50Z</dc:date>
    </item>
  </channel>
</rss>

