<?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: R81 API call for show-gateways-and-servers results in a generic error in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R81-API-call-for-show-gateways-and-servers-results-in-a-generic/m-p/148388#M6812</link>
    <description>&lt;P&gt;I've tried your exact code on an R81 SMS, using curl_cli instead of curl and it worked for show-gateways-and-servers.&lt;/P&gt;&lt;P&gt;Running Take 65 if it makes any difference.&lt;/P&gt;&lt;P&gt;You might have a look at $FWDIR/api.elg and $FWDIR/api.csv where I could see such messages.&lt;/P&gt;&lt;P&gt;2022-05-11,10:34:43 +0200,"curl/7.61.1DEV","&amp;lt;removed&amp;gt;",login,PASSED,747&lt;BR /&gt;2022-05-11,10:34:44 +0200,"curl/7.61.1DEV","&amp;lt;removed&amp;gt;",show-gateways-and-servers,PASSED,1095&lt;BR /&gt;2022-05-11,10:34:48 +0200,"curl/7.61.1DEV","&amp;lt;removed&amp;gt;",show-unused-objects,PASSED,3687&lt;BR /&gt;2022-05-11,10:34:48 +0200,"curl/7.61.1DEV","&amp;lt;removed&amp;gt;",logout,PASSED,492&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If something's wrong there you can try to restart the api service or depending of what happens create an SR.&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2022 08:46:50 GMT</pubDate>
    <dc:creator>Alex-</dc:creator>
    <dc:date>2022-05-11T08:46:50Z</dc:date>
    <item>
      <title>R81 API call for show-gateways-and-servers results in a generic error</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R81-API-call-for-show-gateways-and-servers-results-in-a-generic/m-p/148381#M6811</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we need to fetch the "gateways-and-servers" by an API call.&lt;/P&gt;&lt;P&gt;Actually the reply of the call is "generic error".&lt;/P&gt;&lt;P&gt;To test the API itself we used a different call "show-unused-objects", this returns the values correctly.&lt;/P&gt;&lt;P&gt;Any ideas why the cal results in a generic error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;username="1234"&lt;/P&gt;&lt;P&gt;password="7896"&lt;/P&gt;&lt;P&gt;host="10.10.18.7/"&lt;/P&gt;&lt;P&gt;baseurl=https://$host/web_api&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;curl_cmd="curl --silent --insecure -X POST"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SID=`${curl_cmd} --insecure -H "Content-Type: application/json" -d @- $baseurl/login &amp;lt;&amp;lt;. | awk -F\" '/sid/ {print $4}'&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;"user":"$username" ,&lt;/P&gt;&lt;P&gt;"password":"$password" ,&lt;/P&gt;&lt;P&gt;"session-name":"TACO"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;.`&lt;/P&gt;&lt;P&gt;printf "/n"&lt;BR /&gt;printf $SID&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;outnb=`curl --insecure -XPOST "&lt;A href="https://10.10.18.7/web_api/show-gateways-and-servers" target="_blank"&gt;https://10.10.18.7/web_api/show-gateways-and-servers&lt;/A&gt;" --data-binary "{\"details-level\": \"full\"}" -H "Content-Type: application/json" -H "X-chkp-sid: $SID" -O`&lt;BR /&gt;&lt;STRONG&gt;##Output generic error&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;outnb=`curl --insecure -XPOST "&lt;A href="https://10.10.18.7/web_api/show-unused-objects" target="_blank"&gt;https://10.10.18.7/web_api/show-unused-objects&lt;/A&gt;" --data-binary "{\"details-level\": \"full\"}" -H "Content-Type: application/json" -H "X-chkp-sid: $SID" -O`&lt;BR /&gt;&lt;STRONG&gt;##output ok&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;${curl_cmd} -H "Content-Type: application/json" -H "X-chkp-sid: $SID" -d "{}" $baseurl/logout&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Generated files:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[xxxx ~]$ more show-gateways-and-servers&lt;/EM&gt;&lt;BR /&gt;{&lt;BR /&gt;"code" : "generic_error",&lt;BR /&gt;"message" : ""&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[xxxx ~]$ more show-unused-objects&lt;/EM&gt;&lt;BR /&gt;{&lt;BR /&gt;"objects" : [ {&lt;BR /&gt;"uid" : "726480c6-b5af-44a1-b471-74539cd8e66c",&lt;BR /&gt;"name" : "test network name",&lt;BR /&gt;"type" : "network",&lt;BR /&gt;"domain" : {&lt;BR /&gt;"uid" : "a0eebc99-afed-4ef8-bb6d-fedfedfedfed",&lt;BR /&gt;"name" : "System Data",&lt;BR /&gt;"domain-type" : "mds"&lt;BR /&gt;},&lt;BR /&gt;"broadcast" : "allow",&lt;BR /&gt;"subnet4" : "1.2.3.0",&lt;BR /&gt;"mask-length4" : 24,&lt;BR /&gt;"subnet-mask" : "255.255.255.0",&lt;BR /&gt;"nat-settings" : {&lt;BR /&gt;"auto-rule" : false&lt;BR /&gt;},&lt;BR /&gt;"comments" : "",&lt;BR /&gt;"color" : "black",&lt;BR /&gt;"icon" : "NetworkObjects/network",&lt;BR /&gt;"tags" : [ ],&lt;BR /&gt;"meta-info" : {&lt;BR /&gt;"lock" : "unlocked",&lt;BR /&gt;"validation-state" : "ok",&lt;BR /&gt;"last-modify-time" : {&lt;BR /&gt;"posix" : 1637075180517,&lt;BR /&gt;"iso-8601" : "2021-11-16T16:06+0100"&lt;BR /&gt;},&lt;BR /&gt;"last-modifier" : "avccdj",&lt;BR /&gt;"creation-time" : {&lt;BR /&gt;"posix" : 1637075180517,&lt;BR /&gt;"iso-8601" : "2021-11-16T16:06+0100"&lt;BR /&gt;},&lt;BR /&gt;"creator" : "avccdj"&lt;BR /&gt;},&lt;BR /&gt;"read-only" : true&lt;BR /&gt;} ],&lt;BR /&gt;"from" : 1,&lt;BR /&gt;"to" : 1,&lt;BR /&gt;"total" : 1&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 06:38:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/R81-API-call-for-show-gateways-and-servers-results-in-a-generic/m-p/148381#M6811</guid>
      <dc:creator>schulze1</dc:creator>
      <dc:date>2022-05-11T06:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: R81 API call for show-gateways-and-servers results in a generic error</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R81-API-call-for-show-gateways-and-servers-results-in-a-generic/m-p/148388#M6812</link>
      <description>&lt;P&gt;I've tried your exact code on an R81 SMS, using curl_cli instead of curl and it worked for show-gateways-and-servers.&lt;/P&gt;&lt;P&gt;Running Take 65 if it makes any difference.&lt;/P&gt;&lt;P&gt;You might have a look at $FWDIR/api.elg and $FWDIR/api.csv where I could see such messages.&lt;/P&gt;&lt;P&gt;2022-05-11,10:34:43 +0200,"curl/7.61.1DEV","&amp;lt;removed&amp;gt;",login,PASSED,747&lt;BR /&gt;2022-05-11,10:34:44 +0200,"curl/7.61.1DEV","&amp;lt;removed&amp;gt;",show-gateways-and-servers,PASSED,1095&lt;BR /&gt;2022-05-11,10:34:48 +0200,"curl/7.61.1DEV","&amp;lt;removed&amp;gt;",show-unused-objects,PASSED,3687&lt;BR /&gt;2022-05-11,10:34:48 +0200,"curl/7.61.1DEV","&amp;lt;removed&amp;gt;",logout,PASSED,492&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If something's wrong there you can try to restart the api service or depending of what happens create an SR.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 08:46:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/R81-API-call-for-show-gateways-and-servers-results-in-a-generic/m-p/148388#M6812</guid>
      <dc:creator>Alex-</dc:creator>
      <dc:date>2022-05-11T08:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: R81 API call for show-gateways-and-servers results in a generic error</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R81-API-call-for-show-gateways-and-servers-results-in-a-generic/m-p/149001#M6824</link>
      <description>&lt;P&gt;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk121714&amp;amp;t=1652815593452" target="_blank" rel="nofollow noopener"&gt;https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk121714&amp;amp;t=1652815593452&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Had been the Problem&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 10:48:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/R81-API-call-for-show-gateways-and-servers-results-in-a-generic/m-p/149001#M6824</guid>
      <dc:creator>schulze1</dc:creator>
      <dc:date>2022-05-19T10:48:26Z</dc:date>
    </item>
  </channel>
</rss>

